[Buildroot] [PATCH v1 1/1] configs/zynq_qmtech_defconfig: move post-image.sh to board/qmtech/zynq
Neal Frager
neal.frager at amd.com
Thu Mar 31 19:20:30 UTC 2022
This patch creates a post-image.sh in the board/qmtech/zynq
directory, so that the zynq_qmtech_defconfig can be updated
independently from the other zynq defconfigs.
Signed-off-by: Neal Frager <neal.frager at amd.com>
---
board/qmtech/zynq/genimage.cfg | 27 +++++++++++++++++++++++++++
board/qmtech/zynq/post-image.sh | 13 +++++++++++++
configs/zynq_qmtech_defconfig | 2 +-
3 files changed, 41 insertions(+), 1 deletion(-)
create mode 100644 board/qmtech/zynq/genimage.cfg
create mode 100755 board/qmtech/zynq/post-image.sh
diff --git a/board/qmtech/zynq/genimage.cfg b/board/qmtech/zynq/genimage.cfg
new file mode 100644
index 0000000000..67baca795e
--- /dev/null
+++ b/board/qmtech/zynq/genimage.cfg
@@ -0,0 +1,27 @@
+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/qmtech/zynq/post-image.sh b/board/qmtech/zynq/post-image.sh
new file mode 100755
index 0000000000..54c5493b4e
--- /dev/null
+++ b/board/qmtech/zynq/post-image.sh
@@ -0,0 +1,13 @@
+#!/bin/sh
+
+# By default U-Boot loads DTB from a file named "devicetree.dtb", so
+# let's use a symlink with that name that points to the *first*
+# devicetree listed in the config.
+
+FIRST_DT=$(sed -n \
+ 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9\-]*\).*"$/\1/p' \
+ ${BR2_CONFIG})
+
+[ -z "${FIRST_DT}" ] || ln -fs ${FIRST_DT}.dtb ${BINARIES_DIR}/devicetree.dtb
+
+support/scripts/genimage.sh -c board/qmtech/zynq/genimage.cfg
diff --git a/configs/zynq_qmtech_defconfig b/configs/zynq_qmtech_defconfig
index 4db3f68b1f..dc3b22c876 100644
--- a/configs/zynq_qmtech_defconfig
+++ b/configs/zynq_qmtech_defconfig
@@ -5,7 +5,7 @@ BR2_ARM_ENABLE_VFP=y
BR2_GLOBAL_PATCH_DIR="board/qmtech/zynq/patches"
BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_19=y
BR2_TARGET_GENERIC_GETTY_PORT="ttyPS0"
-BR2_ROOTFS_POST_IMAGE_SCRIPT="board/zynq/post-image.sh"
+BR2_ROOTFS_POST_IMAGE_SCRIPT="board/qmtech/zynq/post-image.sh"
BR2_LINUX_KERNEL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL=y
BR2_LINUX_KERNEL_CUSTOM_TARBALL_LOCATION="$(call github,Xilinx,linux-xlnx,xilinx-v2019.2.01)/linux-xilinx-v2019.2.01.tar.gz"
--
2.17.1
More information about the buildroot
mailing list