Skip to contentSkip to conversation

video/logo: allow custom boot logo and simplify logic

PATCH In review Vincent Mailhol 4 participants 13 messages Jan 8 – Jan 11

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v3 cover video/logo: allow custom boot logo and simplify logic

This series allows the user to replace the default kernel boot logo by a custom one directly in the kernel configuration. This makes it easier to customise the boot logo without the need to modify the sources and allows such customisation to remain persistent after applying the configuration to another version of the kernel.

Patch #1 and #2 are clean-up and preparation while patch #3 is the main feature of this series: making the boot logo customisable.

While working on this, I realised that managing the logo file directly in Kbuild allows us to simplify how we handle the different existing variants of the Tux logo. This series thus ends with a clean-up which moves all the logo selection logic to Kbuild except from one special case (details in the patch description), simplifying the Makefile and the C code.

Patch #4 and #5 do a tree-wide clean-up on the Kconfig symbols that are to be removed in patch #7. Patch #6 removes the Macintosh 68k logo which is conflicting with our simplification plans. Patch #7 finally simplifies the logic as explained above.

---
Changes in v3:

- v2 broke the logo selection for m68k resulting in the MAC logo replacing the default logo on some machine where it shouldn't. v3 resolves the conflict by removing that logo.

- Typo fix in patch #4 description.

Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:

- By removing the logo_spe_clut224.o target from the Makefile, v1 also removed the logo_spe_clut224 object which is still being referenced in

arch/powerpc/platforms/cell/spu_base.c

Restore the logo_spe_clut224.o target.

Link to v1: https://lore.kernel.org/r/[email protected]

---
Vincent Mailhol (7):
video/logo: remove orphan .pgm Makefile rule
video/logo: add a type parameter to the logo makefile function video/logo: allow custom logo
newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
sh: defconfig: remove CONFIG_LOGO_SUPERH_*
video/logo: remove logo_mac_clut224
video/logo: move logo selection logic to Kconfig

 arch/sh/configs/dreamcast_defconfig      |    2 -
 arch/sh/configs/ecovec24_defconfig       |    2 -
 arch/sh/configs/kfr2r09_defconfig        |    2 -
 arch/sh/configs/migor_defconfig          |    2 -
 arch/sh/configs/rts7751r2d1_defconfig    |    2 -
 arch/sh/configs/rts7751r2dplus_defconfig |    2 -
 arch/sh/configs/se7724_defconfig         |    2 -
 arch/sh/configs/se7780_defconfig         |    2 -
 arch/sh/configs/sh7785lcr_defconfig      |    3 -
 arch/sh/configs/urquell_defconfig        |    3 -
 drivers/video/console/newport_con.c      |    4 +-
 drivers/video/logo/Kconfig               |   82 +-
 drivers/video/logo/Makefile              |   29 +-
 drivers/video/logo/logo.c                |   46 +-
 drivers/video/logo/logo_mac_clut224.ppm  | 1604 ------------------------------
 include/linux/linux_logo.h               |    8 -
 16 files changed, 63 insertions(+), 1732 deletions(-)

---
base-commit: 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
change-id: 20251227-custom-logo-932df316a02c

Best regards,

Signature · 1 line
Vincent Mailhol <[email protected]>
#1 lore raw

PATCH v3 1/7 video/logo: remove orphan .pgm Makefile rule

The kernel has no actual grey-scale logos. And looking at the git history, it seems that there never was one (or maybe there was in the pre-git history? I did not check that far…)

Remove the Makefile rule for the .pgm grey scale images.

---
 drivers/video/logo/Makefile | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)
drivers/video/logo/Makefile +1 -4
index 895c60b8402e..8b67c4941a4c 100644
@@ -30,8 +30,5 @@ $(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
 $(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
 	$(call if_changed,logo)
 
-$(obj)/%.c: $(src)/%.pgm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo)
-
 # generated C files
-targets += *_mono.c *_vga16.c *_clut224.c *_gray256.c
+targets += *_mono.c *_vga16.c *_clut224.c
Signature · 1 line
2.52.0
Reviewed-by on v3 1/7
#2 lore raw

Re: [PATCH v3 1/7] video/logo: remove orphan .pgm Makefile rule

Hi Vincent,

Quoted 7 lines · Vincent Mailhol

The kernel has no actual grey-scale logos. And looking at the git history, it seems that there never was one (or maybe there was in the pre-git history? I did not check that far…)

Remove the Makefile rule for the .pgm grey scale images.

Thanks for your patch!

There newer were grey-scale logos. Linux also never supported drawing them.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#3 lore raw

Re: [PATCH v3 1/7] video/logo: remove orphan .pgm Makefile rule

Quoted 9 lines · Geert Uytterhoeven

Hi Vincent,

Quoted 6 lines · Vincent Mailhol

The kernel has no actual grey-scale logos. And looking at the git history, it seems that there never was one (or maybe there was in the pre-git history? I did not check that far…)

Remove the Makefile rule for the .pgm grey scale images.

Quoted 8 lines
Quoted 1 line

Thanks for your patch!

There newer were grey-scale logos. Linux also never supported drawing them.

Thanks. Just to clarify, is your Reviewed-by tag only for this patch or for the full series?

Yours sincerely,
Vincent Mailhol

#4 lore raw

Re: [PATCH v3 1/7] video/logo: remove orphan .pgm Makefile rule

Hi Vincent,

Quoted 12 lines · Vincent Mailhol
Quoted 11 lines · Geert Uytterhoeven
Quoted 7 lines · Vincent Mailhol

The kernel has no actual grey-scale logos. And looking at the git history, it seems that there never was one (or maybe there was in the pre-git history? I did not check that far…)

Remove the Makefile rule for the .pgm grey scale images.

Thanks for your patch!

Quoted 7 lines
Quoted 4 lines

There newer were grey-scale logos. Linux also never supported drawing them.

Thanks. Just to clarify, is your Reviewed-by tag only for this patch or for the full series?

For this patch.

Gr{oetje,eeting}s,

Geert

Signature · 5 lines
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds
#5 lore raw

PATCH v3 2/7 video/logo: add a type parameter to the logo makefile function

In reply to Vincent Mailhol

When translating a portable pixmap file into a .c file, the pnmtologo tool expects to receive the image type (either mono, vga16 or clut224) as an argument under the -t option.

Currently, this information is stored in the file name. Because we will allow for custom logo in an upcoming change, it is preferable to decouple the image name from its type.

Add a new $2 parameter to the Makefile logo function which contains the image type.

Update all the individual targets to provide this new argument.

---
 drivers/video/logo/Makefile | 11 +++++++----
 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/video/logo/Makefile +7 -4
index 8b67c4941a4c..3f249e9dcf37 100644
@@ -22,13 +22,16 @@ hostprogs := pnmtologo
 
 # Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
 quiet_cmd_logo = LOGO    $@
-      cmd_logo = $(obj)/pnmtologo -t $(lastword $(subst _, ,$*)) -n $* -o $@ $<
+      cmd_logo = $(obj)/pnmtologo -t $2 -n $* -o $@ $<
 
 $(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo)
+	$(call if_changed,logo,mono)
 
-$(obj)/%.c: $(src)/%.ppm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo)
+$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,vga16)
+
+$(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,clut224)
 
 # generated C files
 targets += *_mono.c *_vga16.c *_clut224.c
Signature · 1 line
2.52.0
#6 lore raw

PATCH v3 3/7 video/logo: allow custom logo

In reply to Vincent Mailhol

Some people like to replace the default Tux boot logo by an image of their own. There exist a few tutorials here [1] and there [2]. But this requires modifying the source tree which is a bit cumbersome.

Add a string entry in Kbuild for each of the logo categories (monochrome, 16-colors, 224-colors). The string entry takes a path to a .pbm or .ppm image allowing the user to more easily provide a custom logo without having to modify the sources.

Add an help entry with a short hint on how to convert images to the portable pixmap file format.

Update the Makefile accordingly. When converted to .c file, the logo will have one of these fixed file name:

- logo_linux_mono.c
- logo_linux_vga16.c
- logo_linux_clut224.c:

depending on the image type and this regardless of the name of the .pgm/.ppm source filename. This will allow for further simplifications in an upcoming change.

[1] ArmadeuS Project wiki -- Linux Boot Logo

[2] Timesys -- How To Use a Custom Boot Logo / Splash Screen

---
 drivers/video/logo/Kconfig  | 41 +++++++++++++++++++++++++++++++++++++++++
 drivers/video/logo/Makefile | 11 ++++++++++-
 2 files changed, 51 insertions(+), 1 deletion(-)
drivers/video/logo/Kconfig +41 -0
index ce6bb753522d..1d1651c067a1 100644
@@ -22,14 +22,55 @@ config LOGO_LINUX_MONO
 	bool "Standard black and white Linux logo"
 	default y
 
+config LOGO_LINUX_MONO_FILE
+	string "Monochrome logo .pbm file"
+	depends on LOGO_LINUX_MONO
+	default "drivers/video/logo/logo_linux_mono.pbm"
+	help
+	  Takes a path to a monochromatic logo in the portable pixmap file
+	  format (.pbm). This defaults to the Tux penguin.
+
+	  For example, the below ImageMagick command can be used to reduce
+	  an image to black and white and convert it into a pbm file:
+
+	    magick source_image -compress none destination.pbm
+
 config LOGO_LINUX_VGA16
 	bool "Standard 16-color Linux logo"
 	default y
 
+config LOGO_LINUX_VGA16_FILE
+	string "16-color logo .ppm file"
+	depends on LOGO_LINUX_VGA16
+	default "drivers/video/logo/logo_linux_vga16.ppm"
+	help
+	  Takes a path to a logo in the portable pixmap file format (.ppm),
+	  using the 16 colors from the drivers/video/logo/clut_vga16.ppm
+	  palette. This defaults to the Tux penguin.
+
+	  For example, the below ImageMagick command can be used to reduce an
+	  image to the VGA 16 colors palette and convert into a ppm file:
+
+	    magick source_image -compress none \
+	      -remap drivers/video/logo/clut_vga16.ppm destination.ppm
+
 config LOGO_LINUX_CLUT224
 	bool "Standard 224-color Linux logo"
 	default y
 
+config LOGO_LINUX_CLUT224_FILE
+	string "224-color logo .ppm file"
+	depends on LOGO_LINUX_CLUT224
+	default "drivers/video/logo/logo_linux_clut224.ppm"
+	help
+	  Takes a path to a 224-color logo in the portable pixmap file
+	  format (.ppm). This defaults to the Tux penguin.
+
+	  For example, the below ImageMagick command can be used to reduce
+	  an image palette to 224 colors and convert it into a ppm file:
+
+	    magick source_image -compress none -colors 224 destination.ppm
+
 config LOGO_DEC_CLUT224
 	bool "224-color Digital Equipment Corporation Linux logo"
 	depends on MACH_DECSTATION || ALPHA
drivers/video/logo/Makefile +10 -1
index 3f249e9dcf37..ac8e9da3f51a 100644
@@ -22,7 +22,16 @@ hostprogs := pnmtologo
 
 # Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
 quiet_cmd_logo = LOGO    $@
-      cmd_logo = $(obj)/pnmtologo -t $2 -n $* -o $@ $<
+      cmd_logo = $(obj)/pnmtologo -t $2 -n $(basename $(notdir $@)) -o $@ $<
+
+$(obj)/logo_linux_mono.c: $(CONFIG_LOGO_LINUX_MONO_FILE) $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,mono)
+
+$(obj)/logo_linux_vga16.c: $(CONFIG_LOGO_LINUX_VGA16_FILE) $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,vga16)
+
+$(obj)/logo_linux_clut224.c: $(CONFIG_LOGO_LINUX_CLUT224_FILE) $(obj)/pnmtologo FORCE
+	$(call if_changed,logo,clut224)
 
 $(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
 	$(call if_changed,logo,mono)
Signature · 1 line
2.52.0
#7 lore raw

PATCH v3 4/7 newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224

In reply to Vincent Mailhol

newport_show_logo() is only activated if CONFIG_LOGO_SGI_CLUT224 is set (otherwise it is a NOP). This configuration item will be removed in an upcoming change so instead, make it depend on LOGO_LINUX_CLUT224.

---
**Changelog**

v2 -> v3:

- Typo fix in patch description:

      s/CCONFIG_LOGO_LINUX_CLUT224/CONFIG_LOGO_SGI_CLUT224/g
---
 drivers/video/console/newport_con.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/console/newport_con.c +2 -2
index 242415366074..337e04236d6d 100644
@@ -95,7 +95,7 @@ static inline void newport_init_cmap(void)
 
 static const struct linux_logo *newport_show_logo(void)
 {
-#ifdef CONFIG_LOGO_SGI_CLUT224
+#ifdef CONFIG_LOGO_LINUX_CLUT224
 	const struct linux_logo *logo = fb_find_logo(8);
 	const unsigned char *clut;
 	const unsigned char *data;
@@ -127,7 +127,7 @@ static const struct linux_logo *newport_show_logo(void)
 	return logo;
 #else
 	return NULL;
-#endif /* CONFIG_LOGO_SGI_CLUT224 */
+#endif /* CONFIG_LOGO_LINUX_CLUT224 */
 }
 
 static inline void newport_clear_screen(int xstart, int ystart, int xend,
Signature · 1 line
2.52.0
#8 lore raw

PATCH v3 5/7 sh: defconfig: remove CONFIG_LOGO_SUPERH_*

In reply to Vincent Mailhol

CONFIG_LOGO_SUPERH_MONO, CONFIG_LOGO_SUPERH_VGA16 and CONFIG_LOGO_SUPERH_CLUT224 will be removed in an upcoming change but are still referenced in some of the defconfig.

Remove all the occurrences of CONFIG_LOGO_SUPERH_*.

---
 arch/sh/configs/dreamcast_defconfig      | 2 --
 arch/sh/configs/ecovec24_defconfig       | 2 --
 arch/sh/configs/kfr2r09_defconfig        | 2 --
 arch/sh/configs/migor_defconfig          | 2 --
 arch/sh/configs/rts7751r2d1_defconfig    | 2 --
 arch/sh/configs/rts7751r2dplus_defconfig | 2 --
 arch/sh/configs/se7724_defconfig         | 2 --
 arch/sh/configs/se7780_defconfig         | 2 --
 arch/sh/configs/sh7785lcr_defconfig      | 3 ---
 arch/sh/configs/urquell_defconfig        | 3 ---
 10 files changed, 22 deletions(-)
arch/sh/configs/dreamcast_defconfig +0 -2
index 4573d5d64989..dd58797e8298 100644
@@ -60,8 +60,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
 # CONFIG_DNOTIFY is not set
 CONFIG_PROC_KCORE=y
 CONFIG_TMPFS=y
arch/sh/configs/ecovec24_defconfig +0 -2
index 458115d83184..e751933ac840 100644
@@ -78,8 +78,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SND=y
 CONFIG_SND_SEQUENCER=y
arch/sh/configs/kfr2r09_defconfig +0 -2
index d80e83e7ec38..056ba52600f9 100644
@@ -66,8 +66,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
 CONFIG_USB_GADGET=y
 CONFIG_USB_CDC_COMPOSITE=m
 CONFIG_MMC=y
arch/sh/configs/migor_defconfig +0 -2
index 7cdaa909ffd6..1d9d543eef4c 100644
@@ -71,8 +71,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
 CONFIG_USB_GADGET=y
 CONFIG_USB_GADGET_M66592=y
 CONFIG_USB_G_SERIAL=m
arch/sh/configs/rts7751r2d1_defconfig +0 -2
index 0c54ab2b06e6..745490d4807f 100644
@@ -50,8 +50,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SND=m
 CONFIG_SND_YMFPCI=m
arch/sh/configs/rts7751r2dplus_defconfig +0 -2
index 3173b616b2cb..cd90f5354459 100644
@@ -55,8 +55,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SND=m
 CONFIG_SND_YMFPCI=m
arch/sh/configs/se7724_defconfig +0 -2
index 8ca46d704c8b..9b4f8f3a1fdf 100644
@@ -79,8 +79,6 @@ CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
 # CONFIG_LOGO_LINUX_CLUT224 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SND=m
 # CONFIG_SND_DRIVERS is not set
arch/sh/configs/se7780_defconfig +0 -2
index 12463b766120..13fa6a59b8f1 100644
@@ -66,8 +66,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
 CONFIG_SOUND=y
 CONFIG_SOUND_PRIME=y
 CONFIG_HID_A4TECH=y
arch/sh/configs/sh7785lcr_defconfig +0 -3
index 2fcf50d8c820..8738c590d5a0 100644
@@ -60,9 +60,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
 CONFIG_HID_A4TECH=y
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
arch/sh/configs/urquell_defconfig +0 -3
index f51ff6b1ec38..e7924db29b69 100644
@@ -86,9 +86,6 @@ CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_LOGO=y
 # CONFIG_LOGO_LINUX_MONO is not set
 # CONFIG_LOGO_LINUX_VGA16 is not set
-# CONFIG_LOGO_SUPERH_MONO is not set
-# CONFIG_LOGO_SUPERH_VGA16 is not set
-# CONFIG_LOGO_SUPERH_CLUT224 is not set
 CONFIG_HID_A4TECH=y
 CONFIG_HID_APPLE=y
 CONFIG_HID_BELKIN=y
Signature · 1 line
2.52.0
#9 lore raw

PATCH v3 6/7 video/logo: remove logo_mac_clut224

In reply to Vincent Mailhol

The logo_mac_clut224 depends on the runtime value MACH_IS_MAC being true to be displayed. This makes that logo a one-of-a-kind, as it is the only one whose selection can not be decided at compile time.

This dynamic logo selection logic conflicts with our upcoming plans to simplify the logo selection code.

Considering that the logo_mac_clut224 is only used by the Macintosh 68k, a machine whose sales ended some thirty years ago and which thus represents a very small user base, it is preferable to resolve the conflict in favour of code simplicity.

Remove the logo_mac_clut224 so that the logo selection can be statically determined at compile time.

The users who wish to continue using that logo can still download it from [1] and add:

CONFIG_LOGO_LINUX_CLUT224=y CONFIG_LOGO_LINUX_CLUT224_FILE="/path/to/logo_mac_clut224.ppm"

to their configuration file to restore it.

[1] logo_mac_clut224.ppm file

---
**Changelog**

v2 -> v3:

- New patch

---
 drivers/video/logo/Kconfig              |    4 -
 drivers/video/logo/Makefile             |    3 +-
 drivers/video/logo/logo.c               |    5 -
 drivers/video/logo/logo_mac_clut224.ppm | 1604 -------------------------------
 include/linux/linux_logo.h              |    1 -
 5 files changed, 1 insertion(+), 1616 deletions(-)
drivers/video/logo/Kconfig +0 -4
index 1d1651c067a1..413ddb4be15e 100644
@@ -76,10 +76,6 @@ config LOGO_DEC_CLUT224
 	depends on MACH_DECSTATION || ALPHA
 	default y
 
-config LOGO_MAC_CLUT224
-	bool "224-color Macintosh Linux logo"
-	depends on MAC
-	default y
 
 config LOGO_PARISC_CLUT224
 	bool "224-color PA-RISC Linux logo"
drivers/video/logo/Makefile +1 -2
index ac8e9da3f51a..e2b7605fa8e3 100644
@@ -6,7 +6,6 @@ obj-$(CONFIG_LOGO_LINUX_MONO)		+= logo_linux_mono.o
 obj-$(CONFIG_LOGO_LINUX_VGA16)		+= logo_linux_vga16.o
 obj-$(CONFIG_LOGO_LINUX_CLUT224)	+= logo_linux_clut224.o
 obj-$(CONFIG_LOGO_DEC_CLUT224)		+= logo_dec_clut224.o
-obj-$(CONFIG_LOGO_MAC_CLUT224)		+= logo_mac_clut224.o
 obj-$(CONFIG_LOGO_PARISC_CLUT224)	+= logo_parisc_clut224.o
 obj-$(CONFIG_LOGO_SGI_CLUT224)		+= logo_sgi_clut224.o
 obj-$(CONFIG_LOGO_SUN_CLUT224)		+= logo_sun_clut224.o
@@ -20,7 +19,7 @@ obj-$(CONFIG_SPU_BASE)			+= logo_spe_clut224.o
 
 hostprogs := pnmtologo
 
-# Create commands like "pnmtologo -t mono -n logo_mac_mono -o ..."
+# Create commands like "pnmtologo -t mono -n logo_linux_mono -o ..."
 quiet_cmd_logo = LOGO    $@
       cmd_logo = $(obj)/pnmtologo -t $2 -n $(basename $(notdir $@)) -o $@ $<
 
drivers/video/logo/logo.c +0 -5
index 141f15a9a459..b4eb4f3489a0 100644
@@ -79,11 +79,6 @@ const struct linux_logo * __ref fb_find_logo(int depth)
 		/* DEC Linux logo on MIPS/MIPS64 or ALPHA */
 		logo = &logo_dec_clut224;
 #endif
-#ifdef CONFIG_LOGO_MAC_CLUT224
-		/* Macintosh Linux logo on m68k */
-		if (MACH_IS_MAC)
-			logo = &logo_mac_clut224;
-#endif
 #ifdef CONFIG_LOGO_PARISC_CLUT224
 		/* PA-RISC Linux logo */
 		logo = &logo_parisc_clut224;
drivers/video/logo/logo_mac_clut224.ppm deleted +0 -1604

1,604 lines not on this page · raw message

include/linux/linux_logo.h +0 -1
index e37699b7e839..1f04adc853a9 100644
@@ -34,7 +34,6 @@ extern const struct linux_logo logo_linux_mono;
 extern const struct linux_logo logo_linux_vga16;
 extern const struct linux_logo logo_linux_clut224;
 extern const struct linux_logo logo_dec_clut224;
-extern const struct linux_logo logo_mac_clut224;
 extern const struct linux_logo logo_parisc_clut224;
 extern const struct linux_logo logo_sgi_clut224;
 extern const struct linux_logo logo_sun_clut224;
Signature · 1 line
2.52.0
#10 lore raw

Re: [PATCH v3 6/7] video/logo: remove logo_mac_clut224

Hi Vincent,

Quoted 3 lines · Vincent Mailhol

Considering that the logo_mac_clut224 is only used by the Macintosh 68k, a machine whose sales ended some thirty years ago and which thus represents a very small user base

I guess I'm one of the few people that has actually seen that logo on real hardware in a long time...
This change seems fine to me.

Bit off-topic but despite the 68k mac not being sold for 30 years there is still a very active following around it.
This year might be the year of a 100MHz 68060 powered classic mac[0].

0 - https://68kmla.org/bb/threads/new-project-prodigy-040-060-card.51381/

#11 lore raw

PATCH v3 7/7 video/logo: move logo selection logic to Kconfig

In reply to Vincent Mailhol

Now that the path to the logo file can be directly entered in Kbuild, there is no more need to handle all the logo file selection in the Makefile and the C files.

The only exception is the logo_spe_clut224 which is only used by the Cell processor (found for example in the Playstation 3) [1]. This extra logo uses its own different image which shows up on a separate line just below the normal logo. Because the extra logo uses a different image, it can not be factorized under the custom logo logic.

Move all the logo file selection logic to Kbuild (except from the logo_spe_clut224.ppm), this done, clean-up the C code to only leave one entry for each logo type (monochrome, 16-colors and 224-colors).

[1] Cell SPE logos

---
**Changelog**

v1 -> v2:

- By removing the logo_spe_clut224.o target from the Makefile, v1 also removed the logo_spe_clut224 object which is still being referenced in

arch/powerpc/platforms/cell/spu_base.c

Restore the logo_spe_clut224.o target.

---
 drivers/video/logo/Kconfig  | 43 +++++++------------------------------------
 drivers/video/logo/Makefile | 13 -------------
 drivers/video/logo/logo.c   | 41 ++++-------------------------------------
 include/linux/linux_logo.h  |  7 -------
 4 files changed, 11 insertions(+), 93 deletions(-)
drivers/video/logo/Kconfig +7 -36
index 413ddb4be15e..34ee207e5e77 100644
@@ -25,6 +25,7 @@ config LOGO_LINUX_MONO
 config LOGO_LINUX_MONO_FILE
 	string "Monochrome logo .pbm file"
 	depends on LOGO_LINUX_MONO
+	default "drivers/video/logo/logo_superh_mono.pbm" if SUPERH
 	default "drivers/video/logo/logo_linux_mono.pbm"
 	help
 	  Takes a path to a monochromatic logo in the portable pixmap file
@@ -42,6 +43,7 @@ config LOGO_LINUX_VGA16
 config LOGO_LINUX_VGA16_FILE
 	string "16-color logo .ppm file"
 	depends on LOGO_LINUX_VGA16
+	default "drivers/video/logo/logo_superh_vga16.ppm" if SUPERH
 	default "drivers/video/logo/logo_linux_vga16.ppm"
 	help
 	  Takes a path to a logo in the portable pixmap file format (.ppm),
@@ -61,6 +63,11 @@ config LOGO_LINUX_CLUT224
 config LOGO_LINUX_CLUT224_FILE
 	string "224-color logo .ppm file"
 	depends on LOGO_LINUX_CLUT224
+	default "drivers/video/logo/logo_dec_clut224.ppm" if MACH_DECSTATION || ALPHA
+	default "drivers/video/logo/logo_parisc_clut224.ppm" if PARISC
+	default "drivers/video/logo/logo_sgi_clut224.ppm" if SGI_IP22 || SGI_IP27 || SGI_IP32
+	default "drivers/video/logo/logo_sun_clut224.ppm" if SPARC
+	default "drivers/video/logo/logo_superh_clut224.ppm" if SUPERH
 	default "drivers/video/logo/logo_linux_clut224.ppm"
 	help
 	  Takes a path to a 224-color logo in the portable pixmap file
@@ -71,40 +78,4 @@ config LOGO_LINUX_CLUT224_FILE
 
 	    magick source_image -compress none -colors 224 destination.ppm
 
-config LOGO_DEC_CLUT224
-	bool "224-color Digital Equipment Corporation Linux logo"
-	depends on MACH_DECSTATION || ALPHA
-	default y
-
-
-config LOGO_PARISC_CLUT224
-	bool "224-color PA-RISC Linux logo"
-	depends on PARISC
-	default y
-
-config LOGO_SGI_CLUT224
-	bool "224-color SGI Linux logo"
-	depends on SGI_IP22 || SGI_IP27 || SGI_IP32
-	default y
-
-config LOGO_SUN_CLUT224
-	bool "224-color Sun Linux logo"
-	depends on SPARC
-	default y
-
-config LOGO_SUPERH_MONO
-	bool "Black and white SuperH Linux logo"
-	depends on SUPERH
-	default y
-
-config LOGO_SUPERH_VGA16
-	bool "16-color SuperH Linux logo"
-	depends on SUPERH
-	default y
-
-config LOGO_SUPERH_CLUT224
-	bool "224-color SuperH Linux logo"
-	depends on SUPERH
-	default y
-
 endif # LOGO
drivers/video/logo/Makefile +0 -13
index e2b7605fa8e3..937b37d3b6c7 100644
@@ -5,13 +5,6 @@ obj-$(CONFIG_LOGO)			+= logo.o
 obj-$(CONFIG_LOGO_LINUX_MONO)		+= logo_linux_mono.o
 obj-$(CONFIG_LOGO_LINUX_VGA16)		+= logo_linux_vga16.o
 obj-$(CONFIG_LOGO_LINUX_CLUT224)	+= logo_linux_clut224.o
-obj-$(CONFIG_LOGO_DEC_CLUT224)		+= logo_dec_clut224.o
-obj-$(CONFIG_LOGO_PARISC_CLUT224)	+= logo_parisc_clut224.o
-obj-$(CONFIG_LOGO_SGI_CLUT224)		+= logo_sgi_clut224.o
-obj-$(CONFIG_LOGO_SUN_CLUT224)		+= logo_sun_clut224.o
-obj-$(CONFIG_LOGO_SUPERH_MONO)		+= logo_superh_mono.o
-obj-$(CONFIG_LOGO_SUPERH_VGA16)		+= logo_superh_vga16.o
-obj-$(CONFIG_LOGO_SUPERH_CLUT224)	+= logo_superh_clut224.o
 
 obj-$(CONFIG_SPU_BASE)			+= logo_spe_clut224.o
 
@@ -32,12 +25,6 @@ $(obj)/logo_linux_vga16.c: $(CONFIG_LOGO_LINUX_VGA16_FILE) $(obj)/pnmtologo FORC
 $(obj)/logo_linux_clut224.c: $(CONFIG_LOGO_LINUX_CLUT224_FILE) $(obj)/pnmtologo FORCE
 	$(call if_changed,logo,clut224)
 
-$(obj)/%.c: $(src)/%.pbm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo,mono)
-
-$(obj)/%_vga16.c: $(src)/%_vga16.ppm $(obj)/pnmtologo FORCE
-	$(call if_changed,logo,vga16)
-
 $(obj)/%_clut224.c: $(src)/%_clut224.ppm $(obj)/pnmtologo FORCE
 	$(call if_changed,logo,clut224)
 
drivers/video/logo/logo.c +4 -37

58 lines not on this page · raw message

include/linux/linux_logo.h +0 -7
index 1f04adc853a9..1e727a2cb4c1 100644
@@ -33,13 +33,6 @@ struct linux_logo {
 extern const struct linux_logo logo_linux_mono;
 extern const struct linux_logo logo_linux_vga16;
 extern const struct linux_logo logo_linux_clut224;
-extern const struct linux_logo logo_dec_clut224;
-extern const struct linux_logo logo_parisc_clut224;
-extern const struct linux_logo logo_sgi_clut224;
-extern const struct linux_logo logo_sun_clut224;
-extern const struct linux_logo logo_superh_mono;
-extern const struct linux_logo logo_superh_vga16;
-extern const struct linux_logo logo_superh_clut224;
 extern const struct linux_logo logo_spe_clut224;
 
 extern const struct linux_logo *fb_find_logo(int depth);
Signature · 1 line
2.52.0
maintainer
#12 lore raw
In reply to Vincent Mailhol
Quoted 16 lines · Vincent Mailhol

This series allows the user to replace the default kernel boot logo by a custom one directly in the kernel configuration. This makes it easier to customise the boot logo without the need to modify the sources and allows such customisation to remain persistent after applying the configuration to another version of the kernel.

Patch #1 and #2 are clean-up and preparation while patch #3 is the main feature of this series: making the boot logo customisable.

While working on this, I realised that managing the logo file directly in Kbuild allows us to simplify how we handle the different existing variants of the Tux logo. This series thus ends with a clean-up which moves all the logo selection logic to Kbuild except from one special case (details in the patch description), simplifying the Makefile and the C code.

Quoted 6 lines

Patch #4 and #5 do a tree-wide clean-up on the Kconfig symbols that are to be removed in patch #7. Patch #6 removes the Macintosh 68k logo which is conflicting with our simplification plans. Patch #7 finally simplifies the logic as explained above.

series applied to fbdev git tree.

Thanks!
Helge

Quoted 54 lines

Changes in v3:

- v2 broke the logo selection for m68k resulting in the MAC logo replacing the default logo on some machine where it shouldn't. v3 resolves the conflict by removing that logo.

- Typo fix in patch #4 description.

Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:

- By removing the logo_spe_clut224.o target from the Makefile, v1 also removed the logo_spe_clut224 object which is still being referenced in

arch/powerpc/platforms/cell/spu_base.c

Restore the logo_spe_clut224.o target.

Link to v1: https://lore.kernel.org/r/[email protected]

---
Vincent Mailhol (7):
video/logo: remove orphan .pgm Makefile rule
video/logo: add a type parameter to the logo makefile function video/logo: allow custom logo
newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
sh: defconfig: remove CONFIG_LOGO_SUPERH_*
video/logo: remove logo_mac_clut224
video/logo: move logo selection logic to Kconfig

  arch/sh/configs/dreamcast_defconfig      |    2 -
  arch/sh/configs/ecovec24_defconfig       |    2 -
  arch/sh/configs/kfr2r09_defconfig        |    2 -
  arch/sh/configs/migor_defconfig          |    2 -
  arch/sh/configs/rts7751r2d1_defconfig    |    2 -
  arch/sh/configs/rts7751r2dplus_defconfig |    2 -
  arch/sh/configs/se7724_defconfig         |    2 -
  arch/sh/configs/se7780_defconfig         |    2 -
  arch/sh/configs/sh7785lcr_defconfig      |    3 -
  arch/sh/configs/urquell_defconfig        |    3 -
  drivers/video/console/newport_con.c      |    4 +-
  drivers/video/logo/Kconfig               |   82 +-
  drivers/video/logo/Makefile              |   29 +-
  drivers/video/logo/logo.c                |   46 +-
  drivers/video/logo/logo_mac_clut224.ppm  | 1604 ------------------------------
  include/linux/linux_logo.h               |    8 -
  16 files changed, 63 insertions(+), 1732 deletions(-)

---
base-commit: 9ace4753a5202b02191d54e9fdf7f9e3d02b85eb
change-id: 20251227-custom-logo-932df316a02c

Best regards,