[Buildroot] [PATCH v1 1/1] configs/zynqmp_kria_kv260_defconfig: use CONFIG_MULTI_DTB_FIT work around

Luca Ceresoli luca.ceresoli at bootlin.com
Tue Dec 20 07:47:30 UTC 2022


Hello Neal,

On Fri, 16 Dec 2022 10:00:44 +0000
Neal Frager <neal.frager at amd.com> wrote:

> 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 at 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 at 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 at 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

I didn't study the current source code to understand the issue, however
the 'sleep 1' here seems a pretty bad hack and not necessarily solving
the problem in all cases.

As Michal wrote, dependencies must be enforced via makefile rules. Any
reason this cannot be done in this situation?

-- 
Luca Ceresoli, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com



More information about the buildroot mailing list