[PATCH v2] tools: Do not generate logo when cross-building

Tom Rini trini at konsulko.com
Tue Sep 9 19:36:02 CEST 2025


On Tue, Sep 09, 2025 at 07:25:48PM +0200, Jan Kiszka wrote:
> On 09.09.25 16:59, Tom Rini wrote:
> > On Tue, Sep 09, 2025 at 12:31:47PM +0200, Jan Kiszka wrote:
> >> On 23.08.25 17:21, Jan Kiszka wrote:
> >>> From: Jan Kiszka <jan.kiszka at siemens.com>
> >>>
> >>> This cannot work (unless qemu-user is registered in binfmt_misc) as the
> >>> tools will be for a different architecture.
> >>>
> >>> Fixes "make cross_tools" in case CONFIG_VIDEO_LOGO is enabled.
> >>>
> >>> Signed-off-by: Jan Kiszka <jan.kiszka at siemens.com>
> >>> ---
> >>>
> >>> Changes in v2:
> >>>  - improve commit message
> >>>
> >>>  tools/Makefile | 2 ++
> >>>  1 file changed, 2 insertions(+)
> >>>
> >>> diff --git a/tools/Makefile b/tools/Makefile
> >>> index 7eb17f92116..ae6a3052646 100644
> >>> --- a/tools/Makefile
> >>> +++ b/tools/Makefile
> >>> @@ -333,7 +333,9 @@ HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \
> >>>  		-D__KERNEL_STRICT_NAMES \
> >>>  		-D_GNU_SOURCE
> >>>  
> >>> +ifeq ($(CROSS_BUILD_TOOLS),)
> >>>  __build:	$(LOGO-y)
> >>> +endif
> >>>  
> >>>  $(LOGO_H):	$(obj)/bmp_logo $(LOGO_BMP)
> >>>  	$(obj)/bmp_logo --gen-info $(LOGO_BMP) > $@
> >>
> >> Any comments on this build fix? Or should we somehow get the logo
> >> generation out of the tools build?
> > 
> > I guess, why is this being built for the target, and not for the host?
> > Generation of the logo image on the device doesn't seem useful unless
> > we're actually building U-Boot, and in that case we'd be building for
> > the host...
> 
> It is currently being built for both. But if you cross-build the tools,
> you are way more interested in things like dumpimage or mkimage than
> bmp_logo because you want to ship the former on the device.

Ah. Sounds like maybe long term we should clean up the Makefile here to
have a better split between build-time tools and external tools.

Reviewed-by: Tom Rini <trini at konsulko.com>

And I'll pull this to -next soon'ish. Thanks!

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 228 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20250909/01a63cf1/attachment.sig>


More information about the U-Boot mailing list