* [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot
@ 2026-03-26 11:54 Simon Glass
2026-03-26 11:54 ` [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives Simon Glass
2026-03-26 11:57 ` [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Ilias Apalodimas
0 siblings, 2 replies; 7+ messages in thread
From: Simon Glass @ 2026-03-26 11:54 UTC (permalink / raw)
To: u-boot
Cc: Simon Glass, Tom Rini, Greg Malysa, Ilias Apalodimas,
James Hilliard, Marek Vasut, Philip Molloy, Quentin Schulz,
Sam Edwards, Sughosh Ganu, Tien Fong Chee
The font, splash-screen and EFI .incbin wrapper rules are U-Boot
additions that do not exist in the upstream Linux kbuild. Keeping them
in scripts/Makefile.lib makes re-syncing with Linux harder than it needs
to be, as every sync must manually preserve the U-Boot additions.
Move these rules into a new scripts/Makefile.lib-u-boot and include it
from Makefile.build and Makefile.xpl, right after the existing
Makefile.lib include.
This is a pure code-move with no functional change.
Suggested-by: Tom Rini <trini@konsulko.com>
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Split out of the relative-path patch as requested by Tom Rini
scripts/Makefile.build | 1 +
scripts/Makefile.lib | 94 ------------------------------------
scripts/Makefile.lib-u-boot | 96 +++++++++++++++++++++++++++++++++++++
scripts/Makefile.xpl | 1 +
4 files changed, 98 insertions(+), 94 deletions(-)
create mode 100644 scripts/Makefile.lib-u-boot
diff --git a/scripts/Makefile.build b/scripts/Makefile.build
index 8da9851d430..e625f99986e 100644
--- a/scripts/Makefile.build
+++ b/scripts/Makefile.build
@@ -65,6 +65,7 @@ ccflags-y += $(PLATFORM_CPPFLAGS)
cppflags-y += $(PLATFORM_CPPFLAGS)
include $(srctree)/scripts/Makefile.lib
+include $(srctree)/scripts/Makefile.lib-u-boot
# Do not include hostprogs rules unless needed.
# $(sort ...) is used here to remove duplicated words and excessive spaces.
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7386353e0cc..b8969b7de54 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -508,100 +508,6 @@ $(multi-dtb-y): FORCE
$(call if_changed,fdtoverlay)
$(call multi_depend, $(multi-dtb-y), .dtb, -dtbs)
-# Fonts
-# ---------------------------------------------------------------------------
-
-# Generate an assembly file to wrap the font data
-quiet_cmd_S_ttf= TTF $@
-# Modified for U-Boot
-cmd_S_ttf= \
-( \
- echo '.section .rodata.ttf.init,"a"'; \
- echo '.balign 16'; \
- echo '.global __ttf_$(*F)_begin'; \
- echo '__ttf_$(*F)_begin:'; \
- echo '.incbin "$<" '; \
- echo '__ttf_$(*F)_end:'; \
- echo '.global __ttf_$(*F)_end'; \
- echo '.balign 16'; \
-) > $@
-
-$(obj)/%.S: $(src)/%.ttf
- $(call cmd,S_ttf)
-
-# Splash logos
-# ---------------------------------------------------------------------------
-
-# Generate an assembly file to wrap the splash data
-quiet_cmd_S_splash= TTF $@
-# Modified for U-Boot
-cmd_S_splash= \
-( \
- echo '.section .rodata.splash.init,"a"'; \
- echo '.balign 16'; \
- echo '.global __splash_$(*F)_begin'; \
- echo '__splash_$(*F)_begin:'; \
- echo '.incbin "$<" '; \
- echo '__splash_$(*F)_end:'; \
- echo '.global __splash_$(*F)_end'; \
- echo '.balign 16'; \
-) > $@
-
-$(obj)/%.S: $(src)/%.bmp
- $(call cmd,S_splash)
-
-# EFI applications
-# A Makefile target *.efi is built as EFI application.
-# A Makefile target *_efi.S wraps *.efi as built-in EFI application.
-# ---------------------------------------------------------------------------
-
-# Generate an assembly file to wrap the EFI app
-cmd_S_efi= \
-( \
- echo '.section .rodata.$*.init,"a"'; \
- echo '.balign 16'; \
- echo '.global __efi_$*_begin'; \
- echo '__efi_$*_begin:'; \
- echo '.incbin "$<" '; \
- echo '__efi_$*_end:'; \
- echo '.global __efi_$*_end'; \
- echo '.balign 16'; \
-) > $@
-
-$(obj)/%_efi.S: $(obj)/%.efi
- $(call cmd,S_efi)
-
-quiet_cmd_efi_objcopy = OBJCOPY $@
-cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \
- -j .dynamic -j .dynstr -j .dynsym -j .rel* -j .reloc \
- $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@
-
-$(obj)/%.efi: $(obj)/%_efi.so
- $(call cmd,efi_objcopy)
-
-KBUILD_EFILDFLAGS = -nostdlib -zexecstack -znocombreloc -znorelro
-KBUILD_EFILDFLAGS += $(call ld-option,--no-warn-rwx-segments)
-quiet_cmd_efi_ld = LD $@
-cmd_efi_ld = $(LD) $(KBUILD_EFILDFLAGS) -L $(srctree) -T $(EFI_LDS_PATH) \
- -shared -Bsymbolic -s $^ $(PLATFORM_LIBGCC) -o $@
-
-EFI_LDS_PATH = arch/$(ARCH)/lib/$(EFI_LDS)
-
-$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S) FORCE
- $(call if_changed_dep,as_o_S)
-
-$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
- $(call cmd,force_checksrc)
- $(call if_changed_rule,cc_o_c)
-
-$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
- $(call cmd,efi_ld)
-
-targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
-
-CFLAGS_REMOVE_efi_reloc.o := $(LTO_CFLAGS)
-CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS)
-
# ACPI
# ---------------------------------------------------------------------------
#
diff --git a/scripts/Makefile.lib-u-boot b/scripts/Makefile.lib-u-boot
new file mode 100644
index 00000000000..c55f8d8e0c3
--- /dev/null
+++ b/scripts/Makefile.lib-u-boot
@@ -0,0 +1,96 @@
+# SPDX-License-Identifier: GPL-2.0
+#
+# U-Boot-specific rules for embedding binary data via .incbin
+# These are split out of Makefile.lib to simplify kbuild re-syncs.
+
+# Fonts
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the font data
+quiet_cmd_S_ttf= TTF $@
+cmd_S_ttf= \
+( \
+ echo '.section .rodata.ttf.init,"a"'; \
+ echo '.balign 16'; \
+ echo '.global __ttf_$(*F)_begin'; \
+ echo '__ttf_$(*F)_begin:'; \
+ echo '.incbin "$<" '; \
+ echo '__ttf_$(*F)_end:'; \
+ echo '.global __ttf_$(*F)_end'; \
+ echo '.balign 16'; \
+) > $@
+
+$(obj)/%.S: $(src)/%.ttf
+ $(call cmd,S_ttf)
+
+# Splash logos
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the splash data
+quiet_cmd_S_splash= TTF $@
+cmd_S_splash= \
+( \
+ echo '.section .rodata.splash.init,"a"'; \
+ echo '.balign 16'; \
+ echo '.global __splash_$(*F)_begin'; \
+ echo '__splash_$(*F)_begin:'; \
+ echo '.incbin "$<" '; \
+ echo '__splash_$(*F)_end:'; \
+ echo '.global __splash_$(*F)_end'; \
+ echo '.balign 16'; \
+) > $@
+
+$(obj)/%.S: $(src)/%.bmp
+ $(call cmd,S_splash)
+
+# EFI applications
+# A Makefile target *.efi is built as EFI application.
+# A Makefile target *_efi.S wraps *.efi as built-in EFI application.
+# ---------------------------------------------------------------------------
+
+# Generate an assembly file to wrap the EFI app
+cmd_S_efi= \
+( \
+ echo '.section .rodata.$*.init,"a"'; \
+ echo '.balign 16'; \
+ echo '.global __efi_$*_begin'; \
+ echo '__efi_$*_begin:'; \
+ echo '.incbin "$<" '; \
+ echo '__efi_$*_end:'; \
+ echo '.global __efi_$*_end'; \
+ echo '.balign 16'; \
+) > $@
+
+$(obj)/%_efi.S: $(obj)/%.efi
+ $(call cmd,S_efi)
+
+quiet_cmd_efi_objcopy = OBJCOPY $@
+cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \
+ -j .dynamic -j .dynstr -j .dynsym -j .rel* -j .reloc \
+ $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@
+
+$(obj)/%.efi: $(obj)/%_efi.so
+ $(call cmd,efi_objcopy)
+
+KBUILD_EFILDFLAGS = -nostdlib -zexecstack -znocombreloc -znorelro
+KBUILD_EFILDFLAGS += $(call ld-option,--no-warn-rwx-segments)
+quiet_cmd_efi_ld = LD $@
+cmd_efi_ld = $(LD) $(KBUILD_EFILDFLAGS) -L $(srctree) -T $(EFI_LDS_PATH) \
+ -shared -Bsymbolic -s $^ $(PLATFORM_LIBGCC) -o $@
+
+EFI_LDS_PATH = arch/$(ARCH)/lib/$(EFI_LDS)
+
+$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S) FORCE
+ $(call if_changed_dep,as_o_S)
+
+$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
+ $(call cmd,force_checksrc)
+ $(call if_changed_rule,cc_o_c)
+
+$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
+ $(call cmd,efi_ld)
+
+targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
+
+CFLAGS_REMOVE_efi_reloc.o := $(LTO_CFLAGS)
+CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS)
diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl
index c5ddf64c73f..862a8e6f231 100644
--- a/scripts/Makefile.xpl
+++ b/scripts/Makefile.xpl
@@ -88,6 +88,7 @@ include $(srctree)/config.mk
include $(srctree)/arch/$(ARCH)/Makefile
include $(srctree)/scripts/Makefile.lib
+include $(srctree)/scripts/Makefile.lib-u-boot
# Enable garbage collection of un-used sections for SPL
KBUILD_CFLAGS += -ffunction-sections -fdata-sections
--
2.43.0
base-commit: 1ffc541eafc96d5eebcf837ab892dccec3b93568
branch: font-us2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives
2026-03-26 11:54 [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Simon Glass
@ 2026-03-26 11:54 ` Simon Glass
2026-03-27 8:12 ` Rasmus Villemoes
2026-03-26 11:57 ` [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Ilias Apalodimas
1 sibling, 1 reply; 7+ messages in thread
From: Simon Glass @ 2026-03-26 11:54 UTC (permalink / raw)
To: u-boot
Cc: Simon Glass, Anatolij Gustschin, Dario Binacchi,
Heinrich Schuchardt, Ion Agorria, Miquel Raynal, Patrice Chotard,
Svyatoslav Ryhel, Tom Rini
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.
Use $(src)/$(notdir $<) instead of $< so the .incbin directive contains
a source-relative path like drivers/video/fonts/nimbus_sans_l_regular.ttf
rather than an absolute one. Add per-file AFLAGS with -Wa,-I$(srctree)
in the subdirectory Makefiles so the assembler can resolve these paths,
keeping scripts/Makefile.lib free of U-Boot-specific changes.
The EFI rule is left unchanged since its prerequisite is a generated
file in the build directory, like the DTB and DTBO rules.
Signed-off-by: Simon Glass <sjg@chromium.org>
---
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
drivers/video/Makefile | 1 +
drivers/video/fonts/Makefile | 8 ++++++++
scripts/Makefile.lib-u-boot | 4 ++--
3 files changed, 11 insertions(+), 2 deletions(-)
diff --git a/drivers/video/Makefile b/drivers/video/Makefile
index 984768ea156..020b6680345 100644
--- a/drivers/video/Makefile
+++ b/drivers/video/Makefile
@@ -25,6 +25,7 @@ obj-$(CONFIG_PANEL_HX8238D) += hx8238d.o
obj-$(CONFIG_$(PHASE_)SIMPLE_PANEL) += simple_panel.o
obj-$(CONFIG_VIDEO_LOGO) += u_boot_logo.o
+AFLAGS_u_boot_logo.o += -Wa,-I$(srctree)
obj-$(CONFIG_$(PHASE_)BMP) += bmp.o
endif
diff --git a/drivers/video/fonts/Makefile b/drivers/video/fonts/Makefile
index 1111f92a2c6..a2ac4bd40b3 100644
--- a/drivers/video/fonts/Makefile
+++ b/drivers/video/fonts/Makefile
@@ -8,3 +8,11 @@ obj-$(CONFIG_CONSOLE_TRUETYPE_ANKACODER) += ankacoder_c75_r.o
obj-$(CONFIG_CONSOLE_TRUETYPE_RUFSCRIPT) += rufscript010.o
obj-$(CONFIG_CONSOLE_TRUETYPE_CANTORAONE) += cantoraone_regular.o
obj-$(CONFIG_CONSOLE_TRUETYPE_DEJAVU) += dejavu_mono.o
+
+# The .S files generated from .ttf fonts use .incbin with a source-relative
+# path, so tell the assembler where to find the source tree.
+AFLAGS_nimbus_sans_l_regular.o += -Wa,-I$(srctree)
+AFLAGS_ankacoder_c75_r.o += -Wa,-I$(srctree)
+AFLAGS_rufscript010.o += -Wa,-I$(srctree)
+AFLAGS_cantoraone_regular.o += -Wa,-I$(srctree)
+AFLAGS_dejavu_mono.o += -Wa,-I$(srctree)
diff --git a/scripts/Makefile.lib-u-boot b/scripts/Makefile.lib-u-boot
index c55f8d8e0c3..4c4de359fe5 100644
--- a/scripts/Makefile.lib-u-boot
+++ b/scripts/Makefile.lib-u-boot
@@ -14,7 +14,7 @@ cmd_S_ttf= \
echo '.balign 16'; \
echo '.global __ttf_$(*F)_begin'; \
echo '__ttf_$(*F)_begin:'; \
- echo '.incbin "$<" '; \
+ echo '.incbin "$(src)/$(notdir $<)" '; \
echo '__ttf_$(*F)_end:'; \
echo '.global __ttf_$(*F)_end'; \
echo '.balign 16'; \
@@ -34,7 +34,7 @@ cmd_S_splash= \
echo '.balign 16'; \
echo '.global __splash_$(*F)_begin'; \
echo '__splash_$(*F)_begin:'; \
- echo '.incbin "$<" '; \
+ echo '.incbin "$(src)/$(notdir $<)" '; \
echo '__splash_$(*F)_end:'; \
echo '.global __splash_$(*F)_end'; \
echo '.balign 16'; \
--
2.43.0
base-commit: 1ffc541eafc96d5eebcf837ab892dccec3b93568
branch: font-us2
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives
2026-03-26 11:54 ` [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives Simon Glass
@ 2026-03-27 8:12 ` Rasmus Villemoes
2026-03-27 10:27 ` Rasmus Villemoes
0 siblings, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2026-03-27 8:12 UTC (permalink / raw)
To: Simon Glass
Cc: u-boot, Anatolij Gustschin, Dario Binacchi, Heinrich Schuchardt,
Ion Agorria, Miquel Raynal, Patrice Chotard, Svyatoslav Ryhel,
Tom Rini
On Thu, Mar 26 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.
I must be missing something, because I can't see how this can be a
problem, while all the other absolute paths to the source dir that go
into files generated in the build directory is not. For example, there's
a top-level "source -> /path/to/u-boot" symlink created, and as far as I
can tell, all the .foo.o.cmd files end up full of such references as
well, e.g. $BUILD/lib/.vsprintf.o.cmd contains
source_lib/vsprintf.o := /path/to/u-boot/lib/vsprintf.c
Also, in practice, I'd expect the .o file to be generated from the .S
file immediately, so make should never even invoke the assembler to
build the .o from the .S that has a "stale" reference to the source dir
- though you can of course explicitly make the .S file in one container,
then try to do the full build in another, which would IMO be solidly in
"don't do that then" land.
So can you show me an actual sequence of commands and container
invocations where building a u-boot configuration without any of these
font files in play works, but those absolute paths in the generated .S
files breaks? I.e., which paths are the source and build dirs mapped to
in the two containers, how and where do you invoke make (make O=... in
the source tree or just make in the build dir?), etc.
Rasmus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives
2026-03-27 8:12 ` Rasmus Villemoes
@ 2026-03-27 10:27 ` Rasmus Villemoes
2026-03-27 12:44 ` Simon Glass
0 siblings, 1 reply; 7+ messages in thread
From: Rasmus Villemoes @ 2026-03-27 10:27 UTC (permalink / raw)
To: Simon Glass
Cc: u-boot, Anatolij Gustschin, Dario Binacchi, Heinrich Schuchardt,
Ion Agorria, Miquel Raynal, Patrice Chotard, Svyatoslav Ryhel,
Tom Rini
On Fri, Mar 27 2026, Rasmus Villemoes <ravi@prevas.dk> wrote:
> On Thu, Mar 26 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.
>
> I must be missing something, because I can't see how this can be a
> problem, while all the other absolute paths to the source dir that go
> into files generated in the build directory is not. For example, there's
> a top-level "source -> /path/to/u-boot" symlink created, and as far as I
> can tell, all the .foo.o.cmd files end up full of such references as
> well, e.g. $BUILD/lib/.vsprintf.o.cmd contains
>
> source_lib/vsprintf.o := /path/to/u-boot/lib/vsprintf.c
OK, I can sort-of reproduce, though I don't know if what I did is
representable for your use case. No containers involved, just moved the
source directory.
# original source dir
$ cd /tmp/u-boot
$ make O=/tmp/build sandbox_defconfig
$ make O=/tmp/build -j7
$ cd /tmp ; mv u-boot u-boot-new ; cd u-boot-new
$ make O=/tmp/build -j7
This breaks as you describe, but most files simply get rebuilt due to
their .cmd files containing stale references to /tmp/u-boot/. Which
suggests that the bug is really the lack of a .S.cmd file describing how
the .S file was created in the first place.
This seems to be a better fix, which also causes the .S files to be
generated anew if one does some actual change to the rule:
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
index 7386353e0cc..b2441080e7e 100644
--- a/scripts/Makefile.lib
+++ b/scripts/Makefile.lib
@@ -526,8 +526,8 @@ cmd_S_ttf= \
echo '.balign 16'; \
) > $@
-$(obj)/%.S: $(src)/%.ttf
- $(call cmd,S_ttf)
+$(obj)/%.S: $(src)/%.ttf FORCE
+ $(call if_changed,S_ttf)
# Splash logos
# ---------------------------------------------------------------------------
@@ -547,8 +547,8 @@ cmd_S_splash= \
echo '.balign 16'; \
) > $@
-$(obj)/%.S: $(src)/%.bmp
- $(call cmd,S_splash)
+$(obj)/%.S: $(src)/%.bmp FORCE
+ $(call if_changed,S_splash)
# EFI applications
# A Makefile target *.efi is built as EFI application.
See e.g. kernel commit a7f9241909 which did essentially the same change
to the .dtb -> .S rule back in 2018.
It still makes sense to put these rules in a u-boot specific makefile,
but this should avoid the need for each font .o file to need those
AFLAGS changes.
Rasmus
^ permalink raw reply related [flat|nested] 7+ messages in thread
* Re: [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives
2026-03-27 10:27 ` Rasmus Villemoes
@ 2026-03-27 12:44 ` Simon Glass
2026-03-27 14:46 ` Rasmus Villemoes
0 siblings, 1 reply; 7+ messages in thread
From: Simon Glass @ 2026-03-27 12:44 UTC (permalink / raw)
To: Rasmus Villemoes
Cc: u-boot, Anatolij Gustschin, Dario Binacchi, Heinrich Schuchardt,
Ion Agorria, Miquel Raynal, Patrice Chotard, Svyatoslav Ryhel,
Tom Rini
Hi Rasmus,
On Fri, 27 Mar 2026 at 04:27, Rasmus Villemoes <ravi@prevas.dk> wrote:
>
> On Fri, Mar 27 2026, Rasmus Villemoes <ravi@prevas.dk> wrote:
>
> > On Thu, Mar 26 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.
> >
> > I must be missing something, because I can't see how this can be a
> > problem, while all the other absolute paths to the source dir that go
> > into files generated in the build directory is not. For example, there's
> > a top-level "source -> /path/to/u-boot" symlink created, and as far as I
> > can tell, all the .foo.o.cmd files end up full of such references as
> > well, e.g. $BUILD/lib/.vsprintf.o.cmd contains
> >
> > source_lib/vsprintf.o := /path/to/u-boot/lib/vsprintf.c
Thanks for looking at this.
When I build outside the container and then build inside I get:
$ um -n b sandbox
buildman -L -I -w -W --boards sandbox -o /tmp/b/sandbox
$ um b sandbox
drivers/video/fonts/cantoraone_regular.S: Assembler messages:
drivers/video/fonts/cantoraone_regular.S:5: Error: file not found:
/home/sglass/files.local/u-boot/drivers/video/fonts/cantoraone_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/cantoraone_regular.o] Error 1
drivers/video/fonts/nimbus_sans_l_regular.S: Assembler messages:
drivers/video/fonts/nimbus_sans_l_regular.S:5: Error: file not found:
/home/sglass/files.local/u-boot/drivers/video/fonts/nimbus_sans_l_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/nimbus_sans_l_regular.o] Error 1
make[3]: *** [scripts/Makefile.build:492: drivers/video/fonts] Error 2
drivers/video/u_boot_logo.S: Assembler messages:
drivers/video/u_boot_logo.S:5: Error: file not found:
/home/sglass/files.local/u-boot/drivers/video/u_boot_logo.bmp
make[3]: *** [scripts/Makefile.build:344: drivers/video/u_boot_logo.o] Error 1
make[2]: *** [scripts/Makefile.build:492: drivers/video] Error 2
make[1]: *** [Makefile:2201: drivers] Error 2
make: *** [Makefile:189: __sub-make] Error 2
drivers/video/fonts/cantoraone_regular.S: Assembler messages:
drivers/video/fonts/cantoraone_regular.S:5: Error: file not found:
/home/sglass/files.local/u-boot/drivers/video/fonts/cantoraone_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/cantoraone_regular.o] Error 1
drivers/video/fonts/nimbus_sans_l_regular.S: Assembler messages:
drivers/video/fonts/nimbus_sans_l_regular.S:5: Error: file not found:
/home/sglass/files.local/u-boot/drivers/video/fonts/nimbus_sans_l_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/nimbus_sans_l_regular.o] Error 1
make[3]: *** [scripts/Makefile.build:492: drivers/video/fonts] Error 2
drivers/video/u_boot_logo.S: Assembler messages:
drivers/video/u_boot_logo.S:5: Error: file not found:
/home/sglass/files.local/u-boot/drivers/video/u_boot_logo.bmp
make[3]: *** [scripts/Makefile.build:344: drivers/video/u_boot_logo.o] Error 1
make[2]: *** [scripts/Makefile.build:492: drivers/video] Error 2
make[1]: *** [Makefile:2201: drivers] Error 2
make: *** [Makefile:189: __sub-make] Error 2
If I then do a fresh build inside the container, then build outside, I get:
$ um b sandbox
drivers/video/fonts/cantoraone_regular.S: Assembler messages:
drivers/video/fonts/cantoraone_regular.S:5: Error: file not found:
/home/ubuntu/project/drivers/video/fonts/cantoraone_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/cantoraone_regular.o] Error 1
drivers/video/fonts/nimbus_sans_l_regular.S: Assembler messages:
drivers/video/fonts/nimbus_sans_l_regular.S:5: Error: file not found:
/home/ubuntu/project/drivers/video/fonts/nimbus_sans_l_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/nimbus_sans_l_regular.o] Error 1
make[3]: *** [scripts/Makefile.build:492: drivers/video/fonts] Error 2
make[2]: *** [scripts/Makefile.build:492: drivers/video] Error 2
make[1]: *** [Makefile:2201: drivers] Error 2
make: *** [Makefile:189: __sub-make] Error 2
drivers/video/fonts/cantoraone_regular.S: Assembler messages:
drivers/video/fonts/cantoraone_regular.S:5: Error: file not found:
/home/ubuntu/project/drivers/video/fonts/cantoraone_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/cantoraone_regular.o] Error 1
drivers/video/fonts/nimbus_sans_l_regular.S: Assembler messages:
drivers/video/fonts/nimbus_sans_l_regular.S:5: Error: file not found:
/home/ubuntu/project/drivers/video/fonts/nimbus_sans_l_regular.ttf
make[4]: *** [scripts/Makefile.build:344:
drivers/video/fonts/nimbus_sans_l_regular.o] Error 1
make[3]: *** [scripts/Makefile.build:492: drivers/video/fonts] Error 2
make[2]: *** [scripts/Makefile.build:492: drivers/video] Error 2
make[1]: *** [Makefile:2201: drivers] Error 2
make: *** [Makefile:189: __sub-make] Error 2
>
> OK, I can sort-of reproduce, though I don't know if what I did is
> representable for your use case. No containers involved, just moved the
> source directory.
>
> # original source dir
> $ cd /tmp/u-boot
> $ make O=/tmp/build sandbox_defconfig
> $ make O=/tmp/build -j7
> $ cd /tmp ; mv u-boot u-boot-new ; cd u-boot-new
> $ make O=/tmp/build -j7
>
> This breaks as you describe, but most files simply get rebuilt due to
> their .cmd files containing stale references to /tmp/u-boot/. Which
> suggests that the bug is really the lack of a .S.cmd file describing how
> the .S file was created in the first place.
>
> This seems to be a better fix, which also causes the .S files to be
> generated anew if one does some actual change to the rule:
>
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 7386353e0cc..b2441080e7e 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -526,8 +526,8 @@ cmd_S_ttf= \
> echo '.balign 16'; \
> ) > $@
>
> -$(obj)/%.S: $(src)/%.ttf
> - $(call cmd,S_ttf)
> +$(obj)/%.S: $(src)/%.ttf FORCE
> + $(call if_changed,S_ttf)
>
> # Splash logos
> # ---------------------------------------------------------------------------
> @@ -547,8 +547,8 @@ cmd_S_splash= \
> echo '.balign 16'; \
> ) > $@
>
> -$(obj)/%.S: $(src)/%.bmp
> - $(call cmd,S_splash)
> +$(obj)/%.S: $(src)/%.bmp FORCE
> + $(call if_changed,S_splash)
>
> # EFI applications
> # A Makefile target *.efi is built as EFI application.
>
> See e.g. kernel commit a7f9241909 which did essentially the same change
> to the .dtb -> .S rule back in 2018.
>
> It still makes sense to put these rules in a u-boot specific makefile,
> but this should avoid the need for each font .o file to need those
> AFLAGS changes.
Sure, but it causes the font/logo .S files to be rebuilt on every make
invocation. How did you test this?
It would be nice to use if_changed though. It needs the .cmd file to
be loaded via -include, which only happens for files in the targets
variable. The generated .S files are never added to targets, so cmd_$@
is always empty and if_changed always rebuilds.
The kernel commit you referenced (a7f9241909) works for DTB because
.dtb.o has a compound suffix with a matching intermediate_targets
entry. We could follow the same convention, renaming to .ttf.o/.bmp.o
and adding:
targets += $(call intermediate_targets, .ttf.o, .ttf.S) \
$(call intermediate_targets, .bmp.o, .bmp.S)
The pattern stem stays the same, so symbol names are unaffected. What
do you think?
Regards,
Simon
^ permalink raw reply [flat|nested] 7+ messages in thread* Re: [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives
2026-03-27 12:44 ` Simon Glass
@ 2026-03-27 14:46 ` Rasmus Villemoes
0 siblings, 0 replies; 7+ messages in thread
From: Rasmus Villemoes @ 2026-03-27 14:46 UTC (permalink / raw)
To: Simon Glass
Cc: u-boot, Anatolij Gustschin, Dario Binacchi, Heinrich Schuchardt,
Ion Agorria, Miquel Raynal, Patrice Chotard, Svyatoslav Ryhel,
Tom Rini
On Fri, Mar 27 2026, Simon Glass <sjg@chromium.org> wrote:
> Hi Rasmus,
>
> On Fri, 27 Mar 2026 at 04:27, Rasmus Villemoes <ravi@prevas.dk> wrote:
>>
>> On Fri, Mar 27 2026, Rasmus Villemoes <ravi@prevas.dk> wrote:
>>
>> > On Thu, Mar 26 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.
>> >
>> > I must be missing something, because I can't see how this can be a
>> > problem, while all the other absolute paths to the source dir that go
>> > into files generated in the build directory is not. For example, there's
>> > a top-level "source -> /path/to/u-boot" symlink created, and as far as I
>> > can tell, all the .foo.o.cmd files end up full of such references as
>> > well, e.g. $BUILD/lib/.vsprintf.o.cmd contains
>> >
>> > source_lib/vsprintf.o := /path/to/u-boot/lib/vsprintf.c
>
>>
>> OK, I can sort-of reproduce, though I don't know if what I did is
>> representable for your use case. No containers involved, just moved the
>> source directory.
>>
>> # original source dir
>> $ cd /tmp/u-boot
>> $ make O=/tmp/build sandbox_defconfig
>> $ make O=/tmp/build -j7
>> $ cd /tmp ; mv u-boot u-boot-new ; cd u-boot-new
>> $ make O=/tmp/build -j7
>>
>> This breaks as you describe, but most files simply get rebuilt due to
>> their .cmd files containing stale references to /tmp/u-boot/. Which
>> suggests that the bug is really the lack of a .S.cmd file describing how
>> the .S file was created in the first place.
>>
>> This seems to be a better fix, which also causes the .S files to be
>> generated anew if one does some actual change to the rule:
>>
>> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
>> index 7386353e0cc..b2441080e7e 100644
>> --- a/scripts/Makefile.lib
>> +++ b/scripts/Makefile.lib
>> @@ -526,8 +526,8 @@ cmd_S_ttf= \
>> echo '.balign 16'; \
>> ) > $@
>>
>> -$(obj)/%.S: $(src)/%.ttf
>> - $(call cmd,S_ttf)
>> +$(obj)/%.S: $(src)/%.ttf FORCE
>> + $(call if_changed,S_ttf)
>>
>> # Splash logos
>> # ---------------------------------------------------------------------------
>> @@ -547,8 +547,8 @@ cmd_S_splash= \
>> echo '.balign 16'; \
>> ) > $@
>>
>> -$(obj)/%.S: $(src)/%.bmp
>> - $(call cmd,S_splash)
>> +$(obj)/%.S: $(src)/%.bmp FORCE
>> + $(call if_changed,S_splash)
>>
>> # EFI applications
>> # A Makefile target *.efi is built as EFI application.
>>
>> See e.g. kernel commit a7f9241909 which did essentially the same change
>> to the .dtb -> .S rule back in 2018.
>>
>> It still makes sense to put these rules in a u-boot specific makefile,
>> but this should avoid the need for each font .o file to need those
>> AFLAGS changes.
>
> Sure, but it causes the font/logo .S files to be rebuilt on every make
> invocation. How did you test this?
I didn't really test it beyond what I wrote, and I saw that the .cmd
file got rewritten and the whole second build succeeded. I did not think
to run the build twice from the same, unmoved, source repo.
> It would be nice to use if_changed though. It needs the .cmd file to
> be loaded via -include, which only happens for files in the targets
> variable. The generated .S files are never added to targets, so cmd_$@
> is always empty and if_changed always rebuilds.
Ah, yes, I did look at the logic for which .cmd files got included, but
yes, I didn't really think about whether the new ones would be or think
to test whether they were.
> The kernel commit you referenced (a7f9241909) works for DTB because
> .dtb.o has a compound suffix with a matching intermediate_targets
> entry. We could follow the same convention, renaming to .ttf.o/.bmp.o
> and adding:
>
> targets += $(call intermediate_targets, .ttf.o, .ttf.S) \
> $(call intermediate_targets, .bmp.o, .bmp.S)
>
> The pattern stem stays the same, so symbol names are unaffected. What
> do you think?
Yes, that definitely seems to be the right approach, because it follows
the existing pattern for .dtb -> .dtb.S -> .dtb.o and similar.
Rasmus
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot
2026-03-26 11:54 [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Simon Glass
2026-03-26 11:54 ` [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives Simon Glass
@ 2026-03-26 11:57 ` Ilias Apalodimas
1 sibling, 0 replies; 7+ messages in thread
From: Ilias Apalodimas @ 2026-03-26 11:57 UTC (permalink / raw)
To: Simon Glass
Cc: u-boot, Tom Rini, Greg Malysa, James Hilliard, Marek Vasut,
Philip Molloy, Quentin Schulz, Sam Edwards, Sughosh Ganu,
Tien Fong Chee
On Thu, 26 Mar 2026 at 13:55, Simon Glass <sjg@chromium.org> wrote:
>
> The font, splash-screen and EFI .incbin wrapper rules are U-Boot
> additions that do not exist in the upstream Linux kbuild. Keeping them
> in scripts/Makefile.lib makes re-syncing with Linux harder than it needs
> to be, as every sync must manually preserve the U-Boot additions.
>
> Move these rules into a new scripts/Makefile.lib-u-boot and include it
> from Makefile.build and Makefile.xpl, right after the existing
> Makefile.lib include.
>
> This is a pure code-move with no functional change.
>
> Suggested-by: Tom Rini <trini@konsulko.com>
> Signed-off-by: Simon Glass <sjg@chromium.org>
> ---
>
Acked-by: Ilias Apalodimas <ilias.apalodimas@linaro.org>
> Changes in v2:
> - Split out of the relative-path patch as requested by Tom Rini
>
> scripts/Makefile.build | 1 +
> scripts/Makefile.lib | 94 ------------------------------------
> scripts/Makefile.lib-u-boot | 96 +++++++++++++++++++++++++++++++++++++
> scripts/Makefile.xpl | 1 +
> 4 files changed, 98 insertions(+), 94 deletions(-)
> create mode 100644 scripts/Makefile.lib-u-boot
>
> diff --git a/scripts/Makefile.build b/scripts/Makefile.build
> index 8da9851d430..e625f99986e 100644
> --- a/scripts/Makefile.build
> +++ b/scripts/Makefile.build
> @@ -65,6 +65,7 @@ ccflags-y += $(PLATFORM_CPPFLAGS)
> cppflags-y += $(PLATFORM_CPPFLAGS)
>
> include $(srctree)/scripts/Makefile.lib
> +include $(srctree)/scripts/Makefile.lib-u-boot
>
> # Do not include hostprogs rules unless needed.
> # $(sort ...) is used here to remove duplicated words and excessive spaces.
> diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
> index 7386353e0cc..b8969b7de54 100644
> --- a/scripts/Makefile.lib
> +++ b/scripts/Makefile.lib
> @@ -508,100 +508,6 @@ $(multi-dtb-y): FORCE
> $(call if_changed,fdtoverlay)
> $(call multi_depend, $(multi-dtb-y), .dtb, -dtbs)
>
> -# Fonts
> -# ---------------------------------------------------------------------------
> -
> -# Generate an assembly file to wrap the font data
> -quiet_cmd_S_ttf= TTF $@
> -# Modified for U-Boot
> -cmd_S_ttf= \
> -( \
> - echo '.section .rodata.ttf.init,"a"'; \
> - echo '.balign 16'; \
> - echo '.global __ttf_$(*F)_begin'; \
> - echo '__ttf_$(*F)_begin:'; \
> - echo '.incbin "$<" '; \
> - echo '__ttf_$(*F)_end:'; \
> - echo '.global __ttf_$(*F)_end'; \
> - echo '.balign 16'; \
> -) > $@
> -
> -$(obj)/%.S: $(src)/%.ttf
> - $(call cmd,S_ttf)
> -
> -# Splash logos
> -# ---------------------------------------------------------------------------
> -
> -# Generate an assembly file to wrap the splash data
> -quiet_cmd_S_splash= TTF $@
> -# Modified for U-Boot
> -cmd_S_splash= \
> -( \
> - echo '.section .rodata.splash.init,"a"'; \
> - echo '.balign 16'; \
> - echo '.global __splash_$(*F)_begin'; \
> - echo '__splash_$(*F)_begin:'; \
> - echo '.incbin "$<" '; \
> - echo '__splash_$(*F)_end:'; \
> - echo '.global __splash_$(*F)_end'; \
> - echo '.balign 16'; \
> -) > $@
> -
> -$(obj)/%.S: $(src)/%.bmp
> - $(call cmd,S_splash)
> -
> -# EFI applications
> -# A Makefile target *.efi is built as EFI application.
> -# A Makefile target *_efi.S wraps *.efi as built-in EFI application.
> -# ---------------------------------------------------------------------------
> -
> -# Generate an assembly file to wrap the EFI app
> -cmd_S_efi= \
> -( \
> - echo '.section .rodata.$*.init,"a"'; \
> - echo '.balign 16'; \
> - echo '.global __efi_$*_begin'; \
> - echo '__efi_$*_begin:'; \
> - echo '.incbin "$<" '; \
> - echo '__efi_$*_end:'; \
> - echo '.global __efi_$*_end'; \
> - echo '.balign 16'; \
> -) > $@
> -
> -$(obj)/%_efi.S: $(obj)/%.efi
> - $(call cmd,S_efi)
> -
> -quiet_cmd_efi_objcopy = OBJCOPY $@
> -cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \
> - -j .dynamic -j .dynstr -j .dynsym -j .rel* -j .reloc \
> - $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@
> -
> -$(obj)/%.efi: $(obj)/%_efi.so
> - $(call cmd,efi_objcopy)
> -
> -KBUILD_EFILDFLAGS = -nostdlib -zexecstack -znocombreloc -znorelro
> -KBUILD_EFILDFLAGS += $(call ld-option,--no-warn-rwx-segments)
> -quiet_cmd_efi_ld = LD $@
> -cmd_efi_ld = $(LD) $(KBUILD_EFILDFLAGS) -L $(srctree) -T $(EFI_LDS_PATH) \
> - -shared -Bsymbolic -s $^ $(PLATFORM_LIBGCC) -o $@
> -
> -EFI_LDS_PATH = arch/$(ARCH)/lib/$(EFI_LDS)
> -
> -$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S) FORCE
> - $(call if_changed_dep,as_o_S)
> -
> -$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
> - $(call cmd,force_checksrc)
> - $(call if_changed_rule,cc_o_c)
> -
> -$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
> - $(call cmd,efi_ld)
> -
> -targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
> -
> -CFLAGS_REMOVE_efi_reloc.o := $(LTO_CFLAGS)
> -CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS)
> -
> # ACPI
> # ---------------------------------------------------------------------------
> #
> diff --git a/scripts/Makefile.lib-u-boot b/scripts/Makefile.lib-u-boot
> new file mode 100644
> index 00000000000..c55f8d8e0c3
> --- /dev/null
> +++ b/scripts/Makefile.lib-u-boot
> @@ -0,0 +1,96 @@
> +# SPDX-License-Identifier: GPL-2.0
> +#
> +# U-Boot-specific rules for embedding binary data via .incbin
> +# These are split out of Makefile.lib to simplify kbuild re-syncs.
> +
> +# Fonts
> +# ---------------------------------------------------------------------------
> +
> +# Generate an assembly file to wrap the font data
> +quiet_cmd_S_ttf= TTF $@
> +cmd_S_ttf= \
> +( \
> + echo '.section .rodata.ttf.init,"a"'; \
> + echo '.balign 16'; \
> + echo '.global __ttf_$(*F)_begin'; \
> + echo '__ttf_$(*F)_begin:'; \
> + echo '.incbin "$<" '; \
> + echo '__ttf_$(*F)_end:'; \
> + echo '.global __ttf_$(*F)_end'; \
> + echo '.balign 16'; \
> +) > $@
> +
> +$(obj)/%.S: $(src)/%.ttf
> + $(call cmd,S_ttf)
> +
> +# Splash logos
> +# ---------------------------------------------------------------------------
> +
> +# Generate an assembly file to wrap the splash data
> +quiet_cmd_S_splash= TTF $@
> +cmd_S_splash= \
> +( \
> + echo '.section .rodata.splash.init,"a"'; \
> + echo '.balign 16'; \
> + echo '.global __splash_$(*F)_begin'; \
> + echo '__splash_$(*F)_begin:'; \
> + echo '.incbin "$<" '; \
> + echo '__splash_$(*F)_end:'; \
> + echo '.global __splash_$(*F)_end'; \
> + echo '.balign 16'; \
> +) > $@
> +
> +$(obj)/%.S: $(src)/%.bmp
> + $(call cmd,S_splash)
> +
> +# EFI applications
> +# A Makefile target *.efi is built as EFI application.
> +# A Makefile target *_efi.S wraps *.efi as built-in EFI application.
> +# ---------------------------------------------------------------------------
> +
> +# Generate an assembly file to wrap the EFI app
> +cmd_S_efi= \
> +( \
> + echo '.section .rodata.$*.init,"a"'; \
> + echo '.balign 16'; \
> + echo '.global __efi_$*_begin'; \
> + echo '__efi_$*_begin:'; \
> + echo '.incbin "$<" '; \
> + echo '__efi_$*_end:'; \
> + echo '.global __efi_$*_end'; \
> + echo '.balign 16'; \
> +) > $@
> +
> +$(obj)/%_efi.S: $(obj)/%.efi
> + $(call cmd,S_efi)
> +
> +quiet_cmd_efi_objcopy = OBJCOPY $@
> +cmd_efi_objcopy = $(OBJCOPY) -j .header -j .text -j .sdata -j .data \
> + -j .dynamic -j .dynstr -j .dynsym -j .rel* -j .reloc \
> + $(if $(EFI_TARGET),$(EFI_TARGET),-O binary) $^ $@
> +
> +$(obj)/%.efi: $(obj)/%_efi.so
> + $(call cmd,efi_objcopy)
> +
> +KBUILD_EFILDFLAGS = -nostdlib -zexecstack -znocombreloc -znorelro
> +KBUILD_EFILDFLAGS += $(call ld-option,--no-warn-rwx-segments)
> +quiet_cmd_efi_ld = LD $@
> +cmd_efi_ld = $(LD) $(KBUILD_EFILDFLAGS) -L $(srctree) -T $(EFI_LDS_PATH) \
> + -shared -Bsymbolic -s $^ $(PLATFORM_LIBGCC) -o $@
> +
> +EFI_LDS_PATH = arch/$(ARCH)/lib/$(EFI_LDS)
> +
> +$(obj)/efi_crt0.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_CRT0:.o=.S) FORCE
> + $(call if_changed_dep,as_o_S)
> +
> +$(obj)/efi_reloc.o: $(srctree)/arch/$(ARCH)/lib/$(EFI_RELOC:.o=.c) $(recordmcount_source) FORCE
> + $(call cmd,force_checksrc)
> + $(call if_changed_rule,cc_o_c)
> +
> +$(obj)/%_efi.so: $(obj)/%.o $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
> + $(call cmd,efi_ld)
> +
> +targets += $(obj)/efi_crt0.o $(obj)/efi_reloc.o $(obj)/efi_freestanding.o
> +
> +CFLAGS_REMOVE_efi_reloc.o := $(LTO_CFLAGS)
> +CFLAGS_REMOVE_efi_freestanding.o := $(LTO_CFLAGS)
> diff --git a/scripts/Makefile.xpl b/scripts/Makefile.xpl
> index c5ddf64c73f..862a8e6f231 100644
> --- a/scripts/Makefile.xpl
> +++ b/scripts/Makefile.xpl
> @@ -88,6 +88,7 @@ include $(srctree)/config.mk
> include $(srctree)/arch/$(ARCH)/Makefile
>
> include $(srctree)/scripts/Makefile.lib
> +include $(srctree)/scripts/Makefile.lib-u-boot
>
> # Enable garbage collection of un-used sections for SPL
> KBUILD_CFLAGS += -ffunction-sections -fdata-sections
> --
> 2.43.0
>
> base-commit: 1ffc541eafc96d5eebcf837ab892dccec3b93568
> branch: font-us2
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2026-03-27 14:46 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-26 11:54 [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Simon Glass
2026-03-26 11:54 ` [PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives Simon Glass
2026-03-27 8:12 ` Rasmus Villemoes
2026-03-27 10:27 ` Rasmus Villemoes
2026-03-27 12:44 ` Simon Glass
2026-03-27 14:46 ` Rasmus Villemoes
2026-03-26 11:57 ` [PATCH v2 1/2] kbuild: Move U-Boot .incbin rules to Makefile.lib-u-boot Ilias Apalodimas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox