Skip to contentSkip to conversation

tools: Do not generate logo when cross-building

PATCH In review Jan Kiszka 2 participants 6 messages Aug 23, 2025 – Sep 10, 2025

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

PATCH v2 1/1 tools: Do not generate logo when cross-building

From: Jan Kiszka <[email protected]>

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.

---

Changes in v2:
- improve commit message

 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +2 -0
index 7eb17f92116..ae6a3052646 100644
@@ -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) > $@
Signature · 1 line
2.43.0
author
#1 lore raw
Quoted 21 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

---

Changes in v2:
- improve commit message

 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +0 -0
index 7eb17f92116..ae6a3052646 100644

tools/Makefile HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ · line 341

Quoted 9 lines
tools/Makefile +2 -0
@@ -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?

Jan

Signature · 2 lines
Siemens AG, Foundational Technologies
Linux Expert Center
#2 lore raw
Quoted 29 lines · Jan Kiszka
Quoted 28 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

---

Changes in v2:
- improve commit message

 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +2 -0
index 7eb17f92116..ae6a3052646 100644
@@ -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
 
Quoted 5 lines

tools/Makefile HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ · line 341

Quoted 2 lines
tools/Makefile +0 -0
 $(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...

Signature · 1 line
Tom
author
#3 lore raw
Quoted 36 lines · Tom Rini
Quoted 29 lines · Jan Kiszka
Quoted 28 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

---

Changes in v2:
- improve commit message

 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +2 -0
index 7eb17f92116..ae6a3052646 100644
@@ -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
 
Quoted 5 lines

tools/Makefile HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ · line 341

Quoted 2 lines
tools/Makefile +0 -0
 $(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?

Quoted 4 lines

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.

Jan

Signature · 2 lines
Siemens AG, Foundational Technologies
Linux Expert Center
Reviewed-by
#4 lore raw
Quoted 37 lines · Jan Kiszka
Quoted 36 lines · Tom Rini
Quoted 34 lines · Jan Kiszka
Quoted 21 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

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.

---

Changes in v2:
- improve commit message

 tools/Makefile | 2 ++
 1 file changed, 2 insertions(+)
tools/Makefile +0 -0
index 7eb17f92116..ae6a3052646 100644

tools/Makefile HOST_EXTRACFLAGS += -include $(srctree)/include/compiler.h \ · line 341

Quoted 9 lines
tools/Makefile +2 -0
@@ -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?

Quoted 8 lines
Quoted 4 lines

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.

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

Signature · 1 line
Tom
#5 lore raw
In reply to Jan Kiszka
Quoted 6 lines · Jan Kiszka

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.

Applied to u-boot/next, thanks!

[1/1] tools: Do not generate logo when cross-building

      commit: 371a76e845504c9ba7ca216b6edfb4ae4ec14e56
Signature · 1 line
Tom