diff options
author | Fabio Estevam <fabio.estevam@nxp.com> | 2016-07-26 13:01:51 -0300 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2016-07-27 15:02:36 +0200 |
commit | 4dccfcbdd28ae5feaa827851cb19f67e1478c3d8 (patch) | |
tree | 4489d73da01d634c2a8bc1ed3e86aedb7ebc8a52 /board | |
parent | 389c2cf06de82c45f44cc9a9df05a324d78fdd4c (diff) |
configs/warpboard: Generate an sdcard image
Generate an sdcard.img image to make it easier the deployment of a
Buildroot image.
[Peter: drop unneeded exit statement in post-image script]
Signed-off-by: Fabio Estevam <fabio.estevam@nxp.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/freescale/warpboard/README | 14 | ||||
-rw-r--r-- | board/freescale/warpboard/genimage.cfg | 41 | ||||
-rwxr-xr-x | board/freescale/warpboard/post-image.sh | 14 |
3 files changed, 64 insertions, 5 deletions
diff --git a/board/freescale/warpboard/README b/board/freescale/warpboard/README index 7e6bdc566..871d5cd39 100644 --- a/board/freescale/warpboard/README +++ b/board/freescale/warpboard/README @@ -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 ================ diff --git a/board/freescale/warpboard/genimage.cfg b/board/freescale/warpboard/genimage.cfg new file mode 100644 index 000000000..a22aa2a08 --- /dev/null +++ b/board/freescale/warpboard/genimage.cfg @@ -0,0 +1,41 @@ +# Minimal SD card image for the Warp board +# +# We mimic the .sdcard Freescale's image format for i.MX6SL: +# * the microSD card must have 1 kB free space at the beginning, +# * U-Boot is dumped as is, +# * a FAT partition at offset 8 MB is containing zImage and dtbs, +# * a single root filesystem partition is required (Ext4 in this case). +# + +image boot.vfat { + vfat { + files = { + "imx6sl-warp.dtb", + "zImage" + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + in-partition-table = "no" + image = "u-boot.imx" + offset = 1024 + } + + partition boot { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + offset = 8M + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext4" + } +} diff --git a/board/freescale/warpboard/post-image.sh b/board/freescale/warpboard/post-image.sh new file mode 100755 index 000000000..b4ac4608f --- /dev/null +++ b/board/freescale/warpboard/post-image.sh @@ -0,0 +1,14 @@ +#!/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}" |