configs/beaglebone: Use genimage to produce the SD card image
authorEzequiel Garcia <ezequiel@vanguardiasur.com.ar>
Sat, 4 Jun 2016 21:29:09 +0000 (18:29 -0300)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Mon, 6 Jun 2016 20:38:19 +0000 (22:38 +0200)
Signed-off-by: Ezequiel Garcia <ezequiel@vanguardiasur.com.ar>
[Thomas: added host dosfstools to the defconfig, needed to build a SD
card image with genimage when a FAT partition is listed in the
genimage configuration.]
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
board/beaglebone/post-image.sh
board/beaglebone/readme.txt
configs/beaglebone_defconfig

index 7441d07a005cd5f06313218acd909ced7f7e1571..ceeec685209260233690f0535b3098519ecfec53 100755 (executable)
@@ -2,5 +2,19 @@
 # post-image.sh for BeagleBone
 # 2014, Marcin Jabrzyk <marcin.jabrzyk@gmail.com>
 
+BOARD_DIR="$(dirname $0)"
+
 # copy the uEnv.txt to the output/images directory
 cp board/beaglebone/uEnv.txt $BINARIES_DIR/uEnv.txt
+
+GENIMAGE_CFG="${BOARD_DIR}/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}"
index 089c49a8ef898a4fd2a3887c6c8c63198f1724f6..43ebe53aee1475dc33377b907b73eb71140d9f1e 100644 (file)
@@ -28,35 +28,7 @@ After building, you should get a tree like this:
   ├── am335x-bone.dtb
   ├── MLO
   ├── rootfs.ext2
+  ├── sdcard.img
   ├── u-boot.img
   ├── uEnv.txt
   └── zImage
-
-
-Prepare your SDCard
-===================
-
-You need to prepare first partition in fat32 and marked as bootable,
-and second where you will write rootfs.
-
-Copy the files to boot partition
-
-  $ cp MLO u-boot.img zImage uEnv.txt *.dtb /media/zzzzz
-
-where /media/zzzzz is the mount point.
-Then you need to write the rootfs image onto SDCard:
-
-  # dd if=rootfs.ext2 of=/dev/xxxxx
-
-where /dev/xxxxx is the second partition. Use:
-
-  # fdisk -l
-
-to check for correct one.
-
-Finish
-======
-
-Unmount all mounted SDCard partitions and insert the card to BeagleBone.
-Hold the "BOOT" button and apply power. Then release the "BOOT" button.
-The output is available on the serial console.
index be803b9cce30fb2e0fc8879fcbeabf1f28d2d8c2..99c845d1052ba382fc4c1839396976fe5995a0a9 100644 (file)
@@ -12,6 +12,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
 # filesystem
 BR2_PACKAGE_AM33X_CM3=y
 BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # Linux headers same as kernel, a 3.12 series
@@ -26,6 +27,11 @@ BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
 
+# host packages
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
+
 # kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y