configs/warpboard: Generate an sdcard image
PATCH v3 1/1 configs/warpboard: Generate an sdcard image
From: Fabio Estevam <[email protected]>
Generate an sdcard.img image to make it easier the deployment of a Buildroot image.
---
Changes since v2:
- Fix post-image.sh permission
Changes since v1:
- Adjust the prefix in the Subject
- Adjust the README file to include the eMMC sdcard.img flashing procedure and the new files (rootfs.ext4 and sdcard.img)
board/freescale/warpboard/README | 14 +++++++---- board/freescale/warpboard/genimage.cfg | 41 +++++++++++++++++++++++++++++++++ board/freescale/warpboard/post-image.sh | 16 +++++++++++++ configs/warpboard_defconfig | 10 ++++++++ 4 files changed, 76 insertions(+), 5 deletions(-) create mode 100644 board/freescale/warpboard/genimage.cfg create mode 100755 board/freescale/warpboard/post-image.sh
board/freescale/warpboard/README +9 -5
@@ -9,7 +9,9 @@ Build all components: You will find in ./output/images/ the following files: - imx6sl-warp.dtb + - rootfs.ext4 - rootfs.tar + - sdcard.img - u-boot.imx - zImage
@@ -42,14 +44,16 @@ Update uboot Update linux & rootfs ===================== -Run the 'ums' command from the U-Boot prompt to mount the eMMC as mass -storage and update zImage, device tree (imx6sl-warp.dtb) and rootfs -file (rootfs.tar) : +Run the 'ums' command from the U-Boot prompt to mount the eMMC as USB mass +storage: => ums 0 mmc 0 -Put the zImage and DTB files in the warp-vfat partition and extract as -root the rootfs.tar tarball in the warp-rootfs partition. +And then flash the sdcard.img into the eMMC: + + dd if=output/images/sdcard.img of=/dev/<your-sd-device> + +*** WARNING! This will destroy all the eMMC content. Use it with care! *** Using bluetooth ================
board/freescale/warpboard/genimage.cfg new file +41 -0
41 lines not on this page · raw message
board/freescale/warpboard/post-image.sh new file +16 -0
@@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +BOARD_DIR="$(dirname $0)" +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}" + +exit $?
configs/warpboard_defconfig +10 -0
@@ -37,3 +37,13 @@ BR2_TARGET_UBOOT_FORMAT_IMX=y # host utility BR2_PACKAGE_HOST_DFU_UTIL=y BR2_PACKAGE_HOST_IMX_USB_LOADER=y + +# Filesystem +BR2_ROOTFS_POST_IMAGE_SCRIPT="board/freescale/warpboard/post-image.sh" +BR2_TARGET_ROOTFS_EXT2=y +BR2_TARGET_ROOTFS_EXT2_4=y + +# required tools to create the eMMC image +BR2_PACKAGE_HOST_DOSFSTOOLS=y +BR2_PACKAGE_HOST_GENIMAGE=y +BR2_PACKAGE_HOST_MTOOLS=y
Signature · 1 line
1.9.1
PATCH v3 1/1 configs/warpboard: Generate an sdcard image
Quoted 24 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Fabio" == Fabio Estevam <[email protected]> writes:
From: Fabio Estevam <[email protected]>
Generate an sdcard.img image to make it easier the deployment of a Buildroot image.Signed-off-by Fabio Estevam <[email protected]>---
Changes since v2:
- Fixpost-image.shpermission
Changes since v1:
- Adjust the prefix in the Subject
- Adjust the README file to include the eMMC sdcard.img flashing procedure and the new files (rootfs.ext4 and sdcard.img)+++
b/board/freescale/warpboard/post-image.shboard/freescale/warpboard/post-image.sh new file +6
-0@@ -0,0 +1,16 @@ +#!/usr/bin/env bash + +BOARD_DIR="$(dirname $0)" +GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg" +GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" +
board/freescale/warpboard/post-image.sh line 16
Quoted 10 lines
board/freescale/warpboard/post-image.sh new file +10
-0+rm -rf "${GENIMAGE_TMP}" + +genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + +exit $?
The exit statement isn't needed. Committed after removing it, thanks.
Signature · 1 line
Bye, Peter Korsgaard