]> rtime.felk.cvut.cz Git - coffee/buildroot.git/commitdiff
boards/zynq: use genimage to generate a bootable SD card image
authorPeter Korsgaard <peter@korsgaard.com>
Mon, 11 Dec 2017 21:35:36 +0000 (22:35 +0100)
committerPeter Korsgaard <peter@korsgaard.com>
Mon, 11 Dec 2017 21:39:19 +0000 (22:39 +0100)
[Run-time tested on ZedBoard, build-tested on the other boards]
[Peter: also add host-dosfstools / host-mtools to make vfat images]
Signed-off-by: Luca Ceresoli <luca@lucaceresoli.net>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
board/zynq/genimage.cfg [new file with mode: 0644]
board/zynq/post-image.sh
board/zynq/readme.txt
configs/zynq_microzed_defconfig
configs/zynq_zc706_defconfig
configs/zynq_zed_defconfig

diff --git a/board/zynq/genimage.cfg b/board/zynq/genimage.cfg
new file mode 100644 (file)
index 0000000..76e61c3
--- /dev/null
@@ -0,0 +1,25 @@
+image boot.vfat {
+       vfat {
+               files = {
+                       "boot.bin",
+                       "u-boot.img",
+                       "devicetree.dtb",
+                       "uImage"
+               }
+               file uramdisk.image.gz {
+                       image = "rootfs.cpio.uboot"
+               }
+       }
+       size = 32M
+}
+
+image sdcard.img {
+       hdimage {
+       }
+
+       partition boot {
+               partition-type = 0xC
+               bootable = "true"
+               image = "boot.vfat"
+       }
+}
index 98b3306a80f5188d60a1ef3f3cd770386ee30631..0cf92e0aa98f30a49b8e4fa1f90c8e10693152a7 100755 (executable)
@@ -9,3 +9,5 @@ FIRST_DT=$(sed -n \
            ${BR2_CONFIG})
 
 [ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/devicetree.dtb
+
+support/scripts/genimage.sh -c board/zynq/genimage.cfg
index c5506fe9668cd81cb234bf3f38d69cc60974a87e..162734963a270a6969d0ae9e7c0e6dd0647ebbf9 100644 (file)
@@ -14,13 +14,13 @@ Steps to create a working system for a Zynq board:
     make zynq_microzed_defconfig  (MicroZed)
 2) make
 3) All needed files will be available in the output/images directory.
-   Create a FAT32 partition at the beginning of your SD Card and copy files:
-     - boot.bin
-     - u-boot.img
-     - uImage
-     - uramdisk.image.gz (should be renamed from rootfs.cpio.uboot)
-     - devicetree.dtb (should be renamed from zynq-***.dtb)
-   into your SD card
+   The sdcard.img file is a complete bootable image ready to be written
+   on the boot medium. To install it, simply copy the image to an SD
+   card:
+
+       # dd if=output/images/sdcard.img of=/dev/sdX
+
+   Where 'sdX' is the device node of the uSD.
 4) boot your board
 
 You can alter the booting procedure by creating a file uEnv.txt
index c6685a4bc18988ef41bfec140d1c87c3e5f3edca..a6366ee0c041c41fc786c9c15ba87eeebe8be8dd 100644 (file)
@@ -28,3 +28,6 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
index 0bb8e3ba3d89c0bacc76e394b70d1cc757776403..069034021d8630b200214c63808c04c3fa6e61a9 100644 (file)
@@ -28,3 +28,6 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y
index cfcfdff11c907f5165b0dbdba438856d9b41eef6..d08f83db5993487de4b5ae19c73c479a0ca394f9 100644 (file)
@@ -28,3 +28,6 @@ BR2_TARGET_UBOOT_NEEDS_OPENSSL=y
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="spl/boot.bin"
+BR2_PACKAGE_HOST_DOSFSTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+BR2_PACKAGE_HOST_MTOOLS=y