From: Rasmus Villemoes <ravi@prevas.dk>
To: Simon Glass <sjg@chromium.org>
Cc: u-boot@lists.denx.de,
Anatolij Gustschin <ag.dev.uboot@gmail.com>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Heinrich Schuchardt <xypron.glpk@gmx.de>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Ion Agorria <ion@agorria.com>,
Miquel Raynal <miquel.raynal@bootlin.com>,
Patrice Chotard <patrice.chotard@foss.st.com>,
Sughosh Ganu <sughosh.ganu@arm.com>,
Svyatoslav Ryhel <clamor95@gmail.com>,
Tom Rini <trini@konsulko.com>
Subject: Re: [PATCH v3 2/2] kbuild: Use if_changed for font and splash .incbin rules
Date: Thu, 09 Apr 2026 09:01:22 +0200 [thread overview]
Message-ID: <874ilkpqgt.fsf@prevas.dk> (raw)
In-Reply-To: <20260405104224.530051-2-sjg@chromium.org> (Simon Glass's message of "Sun, 5 Apr 2026 04:42:21 -0600")
On Sun, Apr 05 2026, Simon Glass <sjg@chromium.org> wrote:
> The generated .S files for fonts and splash screens use .incbin with the
> full prerequisite path. When building with O= this bakes an absolute
> path into the .S file. If the build directory is later used on a
> different machine (e.g. in a container), the assembler cannot find the
> source file.
>
> Follow the existing DTB convention: rename the object targets to use
> compound suffixes (.ttf.o, .bmp.o), switch the pattern rules from
> direct $(call cmd,...) to FORCE + $(call if_changed,...), and register
> the new suffixes with intermediate_targets so that kbuild loads their
> .cmd files. This lets if_changed detect when the recorded command
> (including source paths) has changed and regenerate the .S file
> automatically.
>
> The EFI rule is left unchanged since its prerequisite is a generated
> file in the build directory, like the DTB and DTBO rules.
>
> Suggested-by: Rasmus Villemoes <ravi@prevas.dk>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
> Changes in v3:
> - Use if_changed with compound suffixes (.ttf.o, .bmp.o)
>
> Changes in v2:
> - Move U-Boot .incbin rules to Makefile.lib-u-boot first (previous patch)
> - Drop the EFI .incbin change since .efi files are generated, not source
> - Use per-file AFLAGS instead of modifying a_flags in Makefile.lib
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index e625f99986e..067c38c4cdd 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -438,7 +438,9 @@ intermediate_targets = $(foreach sfx, $(2), \
> targets += $(call intermediate_targets, .asn1.o, .asn1.c .asn1.h) \
> $(call intermediate_targets, .dtb.o, .dtb.S .dtb) \
> $(call intermediate_targets, .lex.o, .lex.c) \
> - $(call intermediate_targets, .tab.o, .tab.c .tab.h)
> + $(call intermediate_targets, .tab.o, .tab.c .tab.h) \
> + $(call intermediate_targets, .ttf.o, .ttf.S) \
> + $(call intermediate_targets, .bmp.o, .bmp.S)
Do these extra lines need to go here, causing a conflict with the next
kbuild sync, or could one instead add
targets += $(call intermediate_targets, .ttf.o, .ttf.S) \
$(call intermediate_targets, .bmp.o, .bmp.S)
in the new Makefile.lib-u-boot? I think that would make more sense. But
there may be some ordering of makefile includes that makes that not
posssible.
At the very least, I think the additions to targets should go in a new
'targets +=', just to separate them a little better from upstream and
making it pure code addition instead of having to modify that last line
to add a continuation marker.
Rasmus
prev parent reply other threads:[~2026-04-09 7:01 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-04-05 10:42 [PATCH v3 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Simon Glass
2026-04-05 10:42 ` [PATCH v3 2/2] kbuild: Use if_changed for font and splash .incbin rules Simon Glass
2026-04-09 7:01 ` Rasmus Villemoes [this message]
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=874ilkpqgt.fsf@prevas.dk \
--to=ravi@prevas.dk \
--cc=ag.dev.uboot@gmail.com \
--cc=clamor95@gmail.com \
--cc=dario.binacchi@amarulasolutions.com \
--cc=ilias.apalodimas@linaro.org \
--cc=ion@agorria.com \
--cc=miquel.raynal@bootlin.com \
--cc=patrice.chotard@foss.st.com \
--cc=sjg@chromium.org \
--cc=sughosh.ganu@arm.com \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=xypron.glpk@gmx.de \
/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