From: Luca Ceresoli via buildroot <buildroot@buildroot.org>
To: Neal Frager <neal.frager@amd.com>
Cc: michal.simek@amd.com, thomas.petazzoni@bootlin.com,
buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v1 1/1] configs/zynqmp_kria_kv260_defconfig: use CONFIG_MULTI_DTB_FIT work around
Date: Tue, 20 Dec 2022 08:47:30 +0100 [thread overview]
Message-ID: <20221220084730.5acd395d@booty> (raw)
In-Reply-To: <20221216100044.54270-1-neal.frager@amd.com>
Hello Neal,
On Fri, 16 Dec 2022 10:00:44 +0000
Neal Frager <neal.frager@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@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
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
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot
next prev parent reply other threads:[~2022-12-20 7:47 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
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 [this message]
2022-12-20 7:54 ` Frager, Neal via buildroot
2022-12-20 8:17 ` Frager, Neal via buildroot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221220084730.5acd395d@booty \
--to=buildroot@buildroot.org \
--cc=luca.ceresoli@bootlin.com \
--cc=michal.simek@amd.com \
--cc=neal.frager@amd.com \
--cc=thomas.petazzoni@bootlin.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox