- Table of contents
- Kernel Splash Screen
Kernel Splash Screen¶
Goal¶
This wiki page documents the steps needed to replace the standard Linux Tux (penguin) logo with your own custom splash screen.
Assumptions¶
- Your system has a display on which a logo can be shown. You may already be seeing one or more penguins on the display as the default logo. You should see multiple penguins if you have multiple cores. In most cases, you will want to confirm you see the penguin logo in the corner of the screen during boot before you try to change the logo. If you don't see the penguin during boot, your LCD may be misconfigured and you will never see your custom boot logo.
- In the instructions below:
- The environment variable
$LINUX_SDK_DIR
is set to something like~/kernel/processor_sdk-linux
which is the root of the source tree for your kernel builds. - "my_boot_logo" is a generic way of referring to the name you want to use for your boot logo.
- The environment variable
- These instructions are based on the instructions from the Armadeus Wiki, but updated for modern kernels. A PDF of this source wiki is attached for posterity.
Instructions¶
- Create an image to suitable format for compiling the image into the kernel (C include file)
- Get the image into ".ppm" format
- Create a new image fitting the size of your LCD (320x240, 480x272 or 800x480), with something like Gimp (for example).
- Save the image in PPM RAW file format, let's say
my_boot_logo.ppm
.
- Save the image in PPM RAW file format, let's say
- If the image already exists in a format like .png, .bmp, or .jpg, there are different ways to convert to .ppm format.
- Create a new image fitting the size of your LCD (320x240, 480x272 or 800x480), with something like Gimp (for example).
- Install Netpbm package:
$ sudo apt-get install netpbm
- Reduce the number of colors in your image to 224:
$ ppmquant 224 my_boot_logo.ppm > my_boot_logo_224.ppm
- Convert to PPM ASCII format (if
pnmnoraw
is not available on your distribution, try withpnmtoplainpnm
):$ pnmnoraw my_boot_logo_224.ppm > my_boot_logo_ascii_224.ppm
- Copy the PPM to
$LINUX_SDK_DIR/drivers/video/logo/
directory with a name ending with_clut224.ppm
:$ cp my_boot_logo_ascii_224.ppm $LINUX_SDK_DIR/drivers/video/logo/logo_my_boot_logo_clut224.ppm
- Linux will automatically convert your .ppm to a .c file, after you have added it to the build system, using the
$LINUX_SDK_DIR/scripts/pnmtologo
script. This is the purpose of the next step.
- Get the image into ".ppm" format
- Add your file to Linux build system
- If you have overwritten
$LINUX_SDK_DIR/drivers/video/logo/logo_linux_clut224.ppm
with your own logo at the previous stage, then you can jump to the next step. If you have created a new file, then follow the steps below. - Edit
$LINUX_SDK_DIR/drivers/video/logo/Makefile
- Put in your logo file name after the line for
logo_linux_clut224.o
obj-$(CONFIG_LOGO_MY_BOOT_LOGO_CLUT224) += logo_my_boot_logo_clut224.o
- Edit
$LINUX_SDK_DIR/include/linux/linux_logo.h
- Add in an extern for your logo C struct name after
logo_linux_clut224
extern const struct linux_logo logo_my_boot_logo_clut224;
- Add in an extern for your logo C struct name after
- Edit
$LINUX_SDK_DIR/drivers/video/logo/logo.c
- Put in your logo C struct name after
logo_linux_clut224
#ifdef CONFIG_LOGO_MY_BOOT_LOGO_CLUT224 /* My Boot Logo Linux logo */ logo = &logo_my_boot_logo_clut224; #endif
- Put in your logo C struct name after
- Add the menuconfig option to
$LINUX_SDK_DIR/drivers/video/logo/Kconfig
- After entry for config
LOGO_LINUX_CLUT224
config LOGO_MY_BOOT_LOGO_CLUT224 bool "224-color My Boot Logo logo" default n
- After entry for config
- If you have overwritten
- Recompile & install kernel
- Make sure that the "My Boot Logo logo" option is selected in:
$ make menuconfig Device Drivers ---> Graphics support ---> [*] Bootup logo ---> [*] 224-color My Boot Logo logo $ make savedefconfig
- Then recompile your kernel:
$ make zImage
and install it on your board. - Restart your board and you should see your image.
- Make sure that the "My Boot Logo logo" option is selected in:
Troubleshooting¶
If you saw the penguin logo during boot and then you don't see any logo after you make these changes, please review the image conversion steps to make sure you performed every step. The image needs to be in the exact correct format or it will not display.
If you don't see the penguin logo, review your schematic to make sure all GPIOs are properly configured to enable the display (Backlight, LCD Enable, power, etc.). You can use gpio-hog
options in your device tree to enable GPIOs initially to make sure they are enabled.
Please contact Critical Link if you have any questions about this process.
Go to top