Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH v1 1/1] configs/zynqmp_kria_kv260_defconfig: use CONFIG_MULTI_DTB_FIT work around
@ 2022-12-16 10:00 Neal Frager via buildroot
  2022-12-20  7:47 ` Luca Ceresoli via buildroot
  0 siblings, 1 reply; 4+ messages in thread
From: Neal Frager via buildroot @ 2022-12-16 10:00 UTC (permalink / raw)
  To: buildroot; +Cc: michal.simek, luca.ceresoli, thomas.petazzoni, Neal Frager

Change work around for kv260 u-boot.itb. Uses CONFIG_MULTI_DTB_FIT for fit-dtb.blob generation.
Adds a delay between fit-dtb.blob generation and building the u-boot.itb due to a build issue
when using the buildroot compiler.

This work around will eventually be replaced when Xilinx u-boot migrates to binman.

Signed-off-by: Neal Frager <neal.frager@amd.com>
---
 board/zynqmp/kria/kv260/kv260.sh              |  2 +-
 ...ile-add-delay-for-buildroot-compiler.patch | 33 +++++++++++++++++++
 board/zynqmp/kria/uboot.fragment              |  1 +
 configs/zynqmp_kria_kv260_defconfig           |  1 +
 4 files changed, 36 insertions(+), 1 deletion(-)
 create mode 100644 board/zynqmp/kria/patches/uboot/v1-0001-Makefile-add-delay-for-buildroot-compiler.patch

diff --git a/board/zynqmp/kria/kv260/kv260.sh b/board/zynqmp/kria/kv260/kv260.sh
index e891852009..e3467f3068 100755
--- a/board/zynqmp/kria/kv260/kv260.sh
+++ b/board/zynqmp/kria/kv260/kv260.sh
@@ -8,5 +8,5 @@
 
 UBOOT_DIR=$4
 
-fdtoverlay -o ${UBOOT_DIR}/arch/arm/dts/zynqmp-smk-k26-revA.dtb -i ${UBOOT_DIR}/arch/arm/dts/zynqmp-smk-k26-revA.dtb ${UBOOT_DIR}/arch/arm/dts/zynqmp-sck-kv-g-revB.dtbo
+fdtoverlay -o ${UBOOT_DIR}/fit-dtb.blob -i ${UBOOT_DIR}/arch/arm/dts/zynqmp-smk-k26-revA.dtb ${UBOOT_DIR}/arch/arm/dts/zynqmp-sck-kv-g-revB.dtbo
 ${UBOOT_DIR}/tools/mkimage -E -f ${UBOOT_DIR}/u-boot.its -B 0x8 ${BINARIES_DIR}/u-boot.itb
diff --git a/board/zynqmp/kria/patches/uboot/v1-0001-Makefile-add-delay-for-buildroot-compiler.patch b/board/zynqmp/kria/patches/uboot/v1-0001-Makefile-add-delay-for-buildroot-compiler.patch
new file mode 100644
index 0000000000..391fa861bd
--- /dev/null
+++ b/board/zynqmp/kria/patches/uboot/v1-0001-Makefile-add-delay-for-buildroot-compiler.patch
@@ -0,0 +1,33 @@
+From 582b52bef69219df678ed04771eb643117cd094a Mon Sep 17 00:00:00 2001
+From: Neal Frager <neal.frager@amd.com>
+Date: Fri, 16 Dec 2022 08:35:41 +0000
+Subject: [PATCH v1 1/1] Makefile: add delay for buildroot compiler
+
+When using the buildroot compiler, it builds the u-boot.itb immediately
+after building the fit-dtb.blob.  This causes a build failure when using
+the CONFIG_MULTI_DTB_FIT build configuration.  This patch forces a minimal
+delay before building the u-boot.itb which works around the problem.
+
+This patch has not been submitted to u-boot mainline as it is a work around
+and not a proper solution.
+
+Signed-off-by: Neal Frager <neal.frager@amd.com>
+---
+ Makefile | 1 +
+ 1 file changed, 1 insertion(+)
+
+diff --git a/Makefile b/Makefile
+index b96e2ffa15..0d3e33704d 100644
+--- a/Makefile
++++ b/Makefile
+@@ -1426,6 +1426,7 @@ ifdef U_BOOT_ITS
+ u-boot.itb: u-boot-nodtb.bin \
+ 		$(if $(CONFIG_OF_SEPARATE)$(CONFIG_OF_EMBED)$(CONFIG_SANDBOX),dts/dt.dtb) \
+ 		$(U_BOOT_ITS) FORCE
++	sleep 1
+ 	$(call if_changed,mkfitimage)
+ 	$(BOARD_SIZE_CHECK)
+ endif
+-- 
+2.17.1
+
diff --git a/board/zynqmp/kria/uboot.fragment b/board/zynqmp/kria/uboot.fragment
index 9e32edfb36..40709549dc 100644
--- a/board/zynqmp/kria/uboot.fragment
+++ b/board/zynqmp/kria/uboot.fragment
@@ -1,4 +1,5 @@
 CONFIG_SYS_SPI_U_BOOT_OFFS=0xF80000
+CONFIG_MULTI_DTB_FIT=y
 CONFIG_DTB_RESELECT=y
 CONFIG_DMA=y
 CONFIG_XILINX_DPDMA=y
diff --git a/configs/zynqmp_kria_kv260_defconfig b/configs/zynqmp_kria_kv260_defconfig
index 5c53122b46..3214d45fa9 100644
--- a/configs/zynqmp_kria_kv260_defconfig
+++ b/configs/zynqmp_kria_kv260_defconfig
@@ -38,3 +38,4 @@ BR2_TARGET_UBOOT_NEEDS_ATF_BL31=y
 BR2_PACKAGE_HOST_DOSFSTOOLS=y
 BR2_PACKAGE_HOST_GENIMAGE=y
 BR2_PACKAGE_HOST_MTOOLS=y
+BR2_GLOBAL_PATCH_DIR="board/zynqmp/kria/patches"
-- 
2.17.1

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2022-12-20  8:17 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-12-16 10:00 [Buildroot] [PATCH v1 1/1] configs/zynqmp_kria_kv260_defconfig: use CONFIG_MULTI_DTB_FIT work around Neal Frager via buildroot
2022-12-20  7:47 ` Luca Ceresoli via buildroot
2022-12-20  7:54   ` Frager, Neal via buildroot
2022-12-20  8:17     ` Frager, Neal via buildroot

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox