[PATCH v2 2/2] kbuild: Use relative paths in generated .incbin directives
Rasmus Villemoes
ravi at prevas.dk
Fri Mar 27 09:12:35 CET 2026
On Thu, Mar 26 2026, Simon Glass <sjg at 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
More information about the U-Boot
mailing list