--- /dev/null
+# Minimal SD card image for the Wandboard
+#
+# The SD card must have at least 1 MB free at the beginning.
+# U-Boot and its environment are dumped as is.
+# A single root filesystem partition is required (Ext2 in this case).
+#
+# For details about the layout, see:
+# http://wiki.wandboard.org/index.php/Boot-process
+
+image sdcard.img {
+ hdimage {
+ }
+
+ partition u-boot {
+ in-partition-table = "no"
+ image = "u-boot.imx"
+ offset = 1024
+ }
+
+ partition u-boot-env {
+ in-partition-table = "no"
+ image = "uboot-env.bin"
+ offset = 393216
+ size = 8192
+ }
+
+ partition rootfs {
+ partition-type = 0x83
+ image = "rootfs.ext2"
+ size = 512M
+ }
+}
--- /dev/null
+#!/bin/bash
+
+GENIMAGE_CFG="board/wandboard/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+ --rootpath "${TARGET_DIR}" \
+ --tmppath "${GENIMAGE_TMP}" \
+ --inputpath "${BINARIES_DIR}" \
+ --outputpath "${BINARIES_DIR}" \
+ --config "${GENIMAGE_CFG}"
+
+RET=${?}
+exit ${RET}
-Minimal board support for the Wandboard
+Wandboard
-Wandboard's homepage is here: http://www.wandboard.org/
+http://www.wandboard.org
-This config is only tested with the dual core wandboard.
+To build a minimal support for this board:
-Installing:
+ $ make wandboard_defconfig
+ $ make
-You need a micro SD card and a slot/adapter for your development machine.
-
-Partition the SD card leaving at least 1 MB in front of the first partition.
-
-Partition layout (example):
-
-Disk /dev/sdi: 3965 MB, 3965190144 bytes
-255 heads, 63 sectors/track, 482 cylinders
-Units = cylinders of 16065 * 512 = 8225280 bytes
-Sector size (logical/physical): 512 bytes / 512 bytes
-I/O size (minimum/optimal): 512 bytes / 512 bytes
-Disk identifier: 0x77b47445
-
- Device Boot Start End Blocks Id System
-/dev/sdi1 2 482 3863632+ 83 Linux
-
-Copy u-boot and its environment to the SD card:
-sudo dd if=output/images/u-boot.imx bs=512 seek=2 of=/dev/sd<x>
-sudo dd if=output/images/uboot-env.bin bs=512 seek=768 of=/dev/sd<x>
-
-Copy the root filesystem:
-sudo dd if=output/images/rootfs.ext2 of=/dev/sd<x>1
-
-Alternative commands to copy root filesystem:
-sudo mkfs.ext4 /dev/sd<x>1
-sudo mount /dev/sd<x>1 /mnt
-sudo tar xf output/images/rootfs.tar -C /mnt
-sudo umount /mnt
+Buildroot prepares a bootable "sdcard.img" image in the output/images/
+directory, ready to be dumped on an SD card.
+For details about the medium image layout, see the definition in
+board/wandboard/genimage.cfg.
BR2_DEFAULT_KERNEL_VERSION="3.0.101"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_0=y
BR2_TARGET_GENERIC_GETTY_PORT="ttymxc0"
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/wandboard/post-image.sh"
BR2_TARGET_ROOTFS_EXT2=y
BR2_TARGET_ROOTFS_EXT2_4=y
BR2_TARGET_UBOOT=y