aboutsummaryrefslogtreecommitdiff
path: root/board/zynq
diff options
context:
space:
mode:
authorGravatar Peter Korsgaard <peter@korsgaard.com>2017-12-11 22:35:36 +0100
committerGravatar Peter Korsgaard <peter@korsgaard.com>2017-12-11 22:39:19 +0100
commitd54123d29303850b96c58970b010308388ec898d (patch)
tree1d2a26266d05fcfc56d3846afc035fdab84e46a6 /board/zynq
parent6465e4d34a4c1d94e73ec849297fc77b47b498a6 (diff)
downloadbuildroot-d54123d29303850b96c58970b010308388ec898d.tar.gz
buildroot-d54123d29303850b96c58970b010308388ec898d.tar.bz2
boards/zynq: use genimage to generate a bootable SD card image
[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>
Diffstat (limited to 'board/zynq')
-rw-r--r--board/zynq/genimage.cfg25
-rwxr-xr-xboard/zynq/post-image.sh2
-rw-r--r--board/zynq/readme.txt14
3 files changed, 34 insertions, 7 deletions
diff --git a/board/zynq/genimage.cfg b/board/zynq/genimage.cfg
new file mode 100644
index 0000000000..76e61c3a09
--- /dev/null
+++ b/board/zynq/genimage.cfg
@@ -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"
+ }
+}
diff --git a/board/zynq/post-image.sh b/board/zynq/post-image.sh
index 98b3306a80..0cf92e0aa9 100755
--- a/board/zynq/post-image.sh
+++ b/board/zynq/post-image.sh
@@ -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
diff --git a/board/zynq/readme.txt b/board/zynq/readme.txt
index c5506fe966..162734963a 100644
--- a/board/zynq/readme.txt
+++ b/board/zynq/readme.txt
@@ -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