video/logo: allow custom boot logo and simplify logic
Subsystems (3)
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, simplifying the Makefile and C code.
Patch #4 and #5 do a tree-wide clean-up on the Kconfig symbols that are to be removed in patch #6 and patch #6 simplify the logic as explained above.
---
Vincent Mailhol (6):
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: 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 | 84 ++++++++++++++++++-------------- drivers/video/logo/Makefile | 26 +++------- drivers/video/logo/logo.c | 46 ++--------------- include/linux/linux_logo.h | 9 ---- 15 files changed, 61 insertions(+), 130 deletions(-)
---
base-commit: 8640b74557fc8b4c300030f6ccb8cd078f665ec8
change-id: 20251227-custom-logo-932df316a02c
Best regards,
Signature · 1 line
Vincent Mailhol <[email protected]>
PATCH 1/6 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
@@ -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.51.2
Re: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
Quoted 5 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
Makefilerule for the .pgm grey scale images.
Great to see this series.
I think the Fixes: tag should still go here, even if it is not very specific.
David
Quoted 21 lines
Signed-off-by Vincent Mailhol <[email protected]>--- drivers/video/logo/Makefile | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)drivers/video/logo/Makefile +1
-4@@ -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
David Heidelberg
Re: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
Quoted 8 lines · David Heidelberg
Quoted 5 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
Makefilerule for the .pgm grey scale images.Great to see this series.
Thanks!
Quoted 2 lines
I think the Fixes: tag should still go here, even if it is not very specific.
But then, what do I put in the fixes tag? This:
?
I am not sure it is worth bothering the stable team for something that isn't causing any real harm.
Yours sincerely,
Vincent Mailhol
Re: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
Quoted 12 lines · Vincent Mailhol
Quoted 8 lines · David Heidelberg
Quoted 5 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
Makefilerule for the .pgm grey scale images.Great to see this series.
Thanks!
Quoted 8 lines
Quoted 2 lines
I think the Fixes: tag should still go here, even if it is not very specific.
But then, what do I put in the fixes tag? This:
Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")?
Yes
Quoted 3 lines
I am not sure it is worth bothering the stable team for something that isn't causing any real harm.
That was my original thinking as well, but the Fixes tag is not only about stable backports. It is also used for tracking, tooling, and documentation, so stable picking up such patches is just one of its purposes.
David
Quoted 5 lines
Yours sincerely,
Vincent Mailhol
Signature · 1 line
David Heidelberg
Re: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
Quoted 25 lines · David Heidelberg
Quoted 12 lines · Vincent Mailhol
Quoted 8 lines · David Heidelberg
Quoted 5 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
Makefilerule for the .pgm grey scale images.Great to see this series.
Thanks!
Quoted 8 lines
Quoted 2 lines
I think the Fixes: tag should still go here, even if it is not very specific.
But then, what do I put in the fixes tag? This:
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")?
Yes
Quoted 1 line
Quoted 7 lines
Quoted 2 lines
I am not sure it is worth bothering the stable team for something that isn't causing any real harm.
That was my original thinking as well, but the Fixes tag is not only about stable backports. It is also used for tracking, tooling, and documentation, so stable picking up such patches is just one of its purposes.
OK. Then why not. I added the tag in my local tree, but I will wait a couple days for the other review comments before sending. I will not spam everyone with a v3 just for that.
Yours sincerely,
Vincent Mailhol
Helge Deller
maintainerRe: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
Quoted 29 lines · Vincent Mailhol
Quoted 28 lines · David Heidelberg
Quoted 12 lines · Vincent Mailhol
Quoted 8 lines · David Heidelberg
Quoted 5 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
Makefilerule for the .pgm grey scale images.Great to see this series.
Thanks!
Quoted 8 lines
Quoted 2 lines
I think the Fixes: tag should still go here, even if it is not very specific.
But then, what do I put in the fixes tag? This:
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")?
Yes
Quoted 3 lines
I am not sure it is worth bothering the stable team for something that isn't causing any real harm.
Quoted 8 lines
Quoted 4 lines
That was my original thinking as well, but the Fixes tag is not only about stable backports. It is also used for tracking, tooling, and documentation, so stable picking up such patches is just one of its purposes.
OK. Then why not. I added the tag in my local tree, but I will wait a couple days for the other review comments before sending. I will not spam everyone with a v3 just for that.
I like your patch!
So, I've added the v2 series to the fbdev git tree.
I don't think a "Fixes: 1da177e4c3f4 ("Linux-2.6.12-rc2")" tag is appropriate, since it doesn't fixes anything.
Let's see if issues arise due to the wider testing...
Helge
Re: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
Quoted 35 lines · Helge Deller
Quoted 34 lines · Vincent Mailhol
Quoted 32 lines · David Heidelberg
Quoted 12 lines · Vincent Mailhol
Quoted 8 lines · David Heidelberg
Quoted 5 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
Makefilerule for the .pgm grey scale images.Great to see this series.
Thanks!
Quoted 8 lines
Quoted 2 lines
I think the Fixes: tag should still go here, even if it is not very specific.
But then, what do I put in the fixes tag? This:
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")?
Yes
Quoted 3 lines
I am not sure it is worth bothering the stable team for something that isn't causing any real harm.
That was my original thinking as well, but the Fixes tag is not only about stable backports. It is also used for tracking, tooling, and documentation, so stable picking up such patches is just one of its purposes.
Quoted 6 lines
Quoted 3 lines
OK. Then why not. I added the tag in my local tree, but I will wait a couple days for the other review comments before sending. I will not spam everyone with a v3 just for that.
I like your patch!
So, I've added the v2 series to the fbdev git tree.
Thanks!
Quoted 2 lines
I don't think a "Fixes:
1da177e4c3f4("Linux-2.6.12-rc2")" tag is appropriate, since it doesn't fixes anything.
Ack.
Quoted 1 line
Let's see if issues arise due to the wider testing...
Yes. It is always hard for this kind of changes to take care of all the intricacies (like the one for the Playstation 3 extra logo…)
Well, I spend a fair amount of effort, grepping the different logos throughout the source code and didn't find any other corner cases.
Fingers crossed!
Yours sincerely,
Vincent Mailhol
Re: [PATCH 1/6] video/logo: remove orphan .pgm Makefile rule
In reply to Helge DellerQuoted 39 lines · Helge Deller
Quoted 29 lines · Vincent Mailhol
Quoted 28 lines · David Heidelberg
Quoted 12 lines · Vincent Mailhol
Quoted 8 lines · David Heidelberg
Quoted 5 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
Makefilerule for the .pgm grey scale images.Great to see this series.
Thanks!
Quoted 8 lines
Quoted 2 lines
I think the Fixes: tag should still go here, even if it is not very specific.
But then, what do I put in the fixes tag? This:
Fixes 1da177e4c3f4 ("Linux-2.6.12-rc2")?
Yes
Quoted 3 lines
I am not sure it is worth bothering the stable team for something that isn't causing any real harm.
Quoted 8 lines
Quoted 4 lines
That was my original thinking as well, but the Fixes tag is not only about stable backports. It is also used for tracking, tooling, and documentation, so stable picking up such patches is just one of its purposes.
OK. Then why not. I added the tag in my local tree, but I will wait a couple days for the other review comments before sending. I will not spam everyone with a v3 just for that.
Quoted 5 lines
I like your patch!
So, I've added the v2 series to the fbdev git tree.I don't think a "Fixes:
1da177e4c3f4("Linux-2.6.12-rc2")" tag is appropriate, since it doesn't fixes anything.
If there were ever grayscale logos, that would fix the pre-Git commit removal, which left unused code behind.
It seems each maintainer has a different view on tag usage.
I’ll try to familiarize myself more with subsystem practices before attempting another review. I need to get used to this diversity.
David
PATCH 2/6 video/logo: add a type parameter to the logo makefile function
In reply to Vincent MailholWhen 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. Note that this transitional: all those targets will be removed in an upcoming clean-up change.
--- drivers/video/logo/Makefile | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-)
drivers/video/logo/Makefile +7 -4
@@ -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.51.2
PATCH 3/6 video/logo: allow custom logo
In reply to Vincent MailholSome 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 sources 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
@@ -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
@@ -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.51.2
PATCH 4/6 newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
In reply to Vincent Mailholnewport_show_logo() is only activated if CONFIG_LOGO_LINUX_CLUT224 is set (otherwise it is a NOP). This configuration value will be removed in an upcoming change so instead, make it depend on LOGO_LINUX_CLUT224.
--- drivers/video/console/newport_con.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/video/console/newport_con.c +2 -2
@@ -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.51.2
Re: [PATCH 4/6] newport_con: depend on LOGO_LINUX_CLUT224 instead of LOGO_SGI_CLUT224
Quoted 1 line · Vincent Mailhol
newport_show_logo()is only activated ifCONFIG_LOGO_LINUX_CLUT224is
^^^^^^^^^^^^^^^^^^^^^^^^^
This should have been CONFIG_LOGO_SGI_CLUT224. But that's only a typo in the patch description.
@Helger, do you want me to send a v3 or can you directly apply the typo fix in your linux-fbdev/for-next branch?
Quoted 4 lines
set (otherwise it is a NOP). This configuration value will be removed in an upcoming change so instead, make it depend on
LOGO_LINUX_CLUT224.Signed-off-by Vincent Mailhol <[email protected]>
Yours sincerely,
Vincent Mailhol
PATCH 5/6 sh: defconfig: remove CONFIG_LOGO_SUPERH_*
In reply to Vincent MailholCONFIG_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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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.51.2
PATCH 6/6 video/logo: move logo selection logic to Kconfig
In reply to Vincent MailholNow 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.
Move all the logo file selection logic to Kbuild, this done, clean-up the C code to only leave one entry for each logo type (monochrome, 16-colors and 224-colors).
--- drivers/video/logo/Kconfig | 49 +++++++++------------------------------------ drivers/video/logo/Makefile | 21 +------------------ drivers/video/logo/logo.c | 46 ++++-------------------------------------- include/linux/linux_logo.h | 9 --------- 4 files changed, 14 insertions(+), 111 deletions(-)
drivers/video/logo/Kconfig +9 -40
@@ -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,13 @@ 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_mac_clut224.ppm" if MAC + 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_spe_clut224.ppm" if SPU_BASE default "drivers/video/logo/logo_linux_clut224.ppm" help Takes a path to a 224-color logo in the portable pixmap file
@@ -71,44 +80,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_MAC_CLUT224 - bool "224-color Macintosh Linux logo" - depends on MAC - 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 +1 -20
@@ -5,16 +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_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 -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 # How to generate logo's
@@ -33,14 +23,5 @@ $(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) - # generated C files -targets += *_mono.c *_vga16.c *_clut224.c +targets += logo_linux_mono.c logo_linux_vga16.c logo_linux_clut224.c
drivers/video/logo/logo.c +4 -42
63 lines not on this page · raw message
include/linux/linux_logo.h +0 -9
@@ -33,15 +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_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; -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);#ifdef CONFIG_FB_LOGO_EXTRA
Signature · 1 line
2.51.2
Re: [PATCH 6/6] video/logo: move logo selection logic to Kconfig
Happy new year!
Quoted 103 lines · 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 theMakefileand the C files.Move all the logo file selection logic to
Kbuild, this done, clean-up the C code to only leave one entry for each logo type (monochrome, 16-colors and 224-colors).Signed-off-by Vincent Mailhol <[email protected]>--- drivers/video/logo/Kconfig | 49 +++++++++------------------------------------ drivers/video/logo/Makefile | 21 +------------------ drivers/video/logo/logo.c | 46 ++++-------------------------------------- include/linux/linux_logo.h | 9 --------- 4 files changed, 14 insertions(+), 111 deletions(-)drivers/video/logo/Kconfig +9
-40@@ -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,13 @@ 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_mac_clut224.ppm" if MAC + 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_spe_clut224.ppm" if SPU_BASE default "drivers/video/logo/logo_linux_clut224.ppm" help Takes a path to a 224-color logo in the portable pixmap file@@ -71,44 +80,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_MAC_CLUT224 - bool "224-color Macintosh Linux logo" - depends on MAC - 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 # LOGOdrivers/video/logo/Makefile +0
-0@@ -5,16 +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
drivers/video/logo/Makefile obj-$(CONFIG_LOGO) += logo.o · line 17
Quoted 10 lines
drivers/video/logo/Makefile +0
-10-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 -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
Removing the logo_spe_clut224.o target was a mistake. This removes the logo_spe_clut224 object which is still being referenced in
arch/powerpc/platforms/cell/spu_base.c
The Cell processor (found, for example in the PS3) has a unique feature in the kernel: it will not only show the standard penguin logos for each of the core, but also show an extra line of logos for each of its SPE core. More details with a screenshot here:
And indeed, on a ps3_defconfig, I am getting this build error:
CC arch/powerpc/platforms/cell/spu_base.o
arch/powerpc/platforms/cell/spu_base.c: In function 'init_spu_base':
arch/powerpc/platforms/cell/spu_base.c:775:39: error: 'logo_spe_clut224' undeclared (first use in this function); did you mean 'logo_linux_clut224'?
775 | fb_append_extra_logo(&logo_spe_clut224, ret);
| ^~~~~~~~~~~~~~~~
| logo_linux_clut224This extra logo feature is a weird beast only used by a single CPU. I will just restore the logo_spe_clut224.o target in v2 and leave it untouched.
I checked and the other logo objects are not being referenced anymore throughout the kernel.
Yours sincerely,
Vincent Mailhol
John Paul Adrian Glaubitz
maintainerHi Vincent,
Quoted 5 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.
Wouldn't it make more sense to make the boot logo to be configurable at runtime so that users don't have to rebuild their kernel at all to change their boot logo?
Adrian
Signature · 4 lines
.''`. John Paul Adrian Glaubitz : :' : Debian Developer `. `' Physicist `- GPG: 62FF 8A75 84E0 2956 9546 0006 7426 3B37 F5B5 F913
Quoted 9 lines · John Paul Adrian Glaubitz
Hi Vincent,
Quoted 5 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.
Quoted 3 lines
Wouldn't it make more sense to make the boot logo to be configurable at runtime so that users don't have to rebuild their kernel at all to change their boot logo?
I thought about that. The problem is that the logo is loaded really early in the boot process. To be able to modify the logo without rebuilding the full kernel, the logo would basically need to become a kernel module that would be stored in either an initrd or on the filesystem.
The above is not impossible, but would require delaying the logo.
If we go in that direction, I think that my series as it is right now would be a prerequisite anyway. Personally, I am happy with the logo just being configurable when compiling the kernel, so I do not intend to put more effort into this afterward. However, that would have prepared the ground if anyone wants to implement in the future what you just suggested.
Yours sincerely,
Vincent Mailhol
Quoted 5 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.
Hah! What I have been doing for so many moons is to just cp my own logo 'logo_linux_clut224.ppm' -> 'drivers/video/logo/logo_linux_clut224.ppm' for each custom kernel build - that works like a charm. Maybe... I'm too pragmatic? It's that famous 'kill bill' logo from ages ago, 224 colors PPM
Haven't tested your patch series cos stuff just works for me. Looking forward to feedback from all those logo nerds out there.
Markus
Quoted 8 lines · Markus Reichelt
Quoted 5 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.
Quoted 5 lines
Hah! What I have been doing for so many moons is to just cp my own logo 'logo_linux_clut224.ppm' -> '
drivers/video/logo/logo_linux_clut224.ppm' for each custom kernel build - that works like a charm. Maybe... I'm too pragmatic? It's that famous 'kill bill' logo from ages ago, 224 colors PPM
I was doing the same! I then started a rework a couple years ago to implement this idea.. At that time, I was less experienced and did not fully understood Kbuild. The result worked but was ugly and stayed in my local tree.
This winter holidays, I had a bit of free time, revisited my old idea, and this time, found something I thought was worth upstreaming. Thus this series.
Quoted 2 lines
Haven't tested your patch series cos stuff just works for me. Looking forward to feedback from all those logo nerds out there.
Looking forward for your Tested-by tag!
Yours sincerely,
Vincent Mailhol
Quoted 1 line · Vincent Mailhol
On 02/01/2026 at 17:30, Markus Reichelt wrote:
(...)
Quoted 4 lines
Quoted 2 lines
Haven't tested your patch series cos stuff just works for me. Looking forward to feedback from all those logo nerds out there.
Looking forward for your Tested-by tag!
D'oh, I misread your message. When my brain parsed your text, I read it as:
Haven't tested your patch series cos work stuff…
As if you were too busy with your work to test it now.
Yours sincerely,
Vincent Mailhol