The kernel splash screen is a picture loaded by the Linux kernel during the early boot process. By default, Toradex images display our logo.
The customization of the kernel splash screen on Torizon is currently not covered as a use case. Although the instructions provided in this article might work, Toradex does not encourage you to re-build the components of TorizonCore from source. We do support custom splash screen on TorizonCore as early as the initramfs is loaded, see the article Splash Screen Customization on TorizonCore for more details.
This article has been written with the customization of the Toradex Yocto Project Reference Images in mind.
To create and convert a picture, download the packages:
Install Gimp on Fedora:
sudo yum install gimp
Install Gimp on Ubuntu:
sudo apt-get install gimp
Install tgif and fonts on Fedora:
sudo yum install tgif xorg-x11-fonts-ISO8859-1-75dpi xorg-x11-fonts-ISO8859-1-100dpi
Install tgif and fonts on Ubuntu:
sudo apt-get install tgif xfonts-100dpi xfonts-75dpi
Create a new image with Gimp fitting the size of your display. Attention: The image must be 29 pixels smaller than the resolution of the display to be displayed at boot time.
In my case I will create an image for the capacitive 10 inch display with a resolution of 1024x600. Please check the Display Output, Resolution and Timings (Linux) article for more information about resolutions.
Open the gimp application and create a new picture:
File -> New...
Configure the desired Width x Height and click OK.
Draw whatever is desired on the newly created canvas.
After the picture is finished, export it in raw format:
File -> Export As.. Change the name to ppm format like "toradexlogo_1024x600.ppm". Choose RAW format and click Export.
The file really needs to be in ppm format even though above dialog may actually be named PNM!
Now using the terminal, find the exported picture and convert to ASCII using the commands below:
$ find . -name "*toradexlogo*.ppm" ./toradexlogo_1024x600.ppm $ ppmquant 224 toradexlogo_1024x600.ppm > toradexlogo_1024x600_224.ppm pnmcolormap: making histogram... pnmcolormap: Scanning image 0 pnmcolormap: 271527 colors so far pnmcolormap: 271527 colors found pnmcolormap: choosing 224 colors... pnmremap: 224 colors found in colormap $ pnmnoraw toradexlogo_1024x600_224.ppm > toradexlogo_1024x600_ascii_224.ppm
To get the source code, toolchain and the instructions how to build a custom kernel, follow the Build U-Boot and Linux Kernel from Source Code article.
Basically you have to download the toolchain and the correct Linux kernel from the Toradex git server.
Rename the ASCII file to "logo_custom_clut224.ppm" and copy to the folder "drivers/video/logo" located in the kernel directory.
cp toradexlogo_1024x600_ascii_224.ppm logo_custom_clut224.ppmmv logo_custom_clut224.ppm ~/linux-toradex/drivers/video/logo/
Select the custom logo using make menuconfig :
make menuconfig
In menuconfig, go to: Device Drivers -> Graphics support -> Bootup logo -> Select just "Custom 224-color Linux logo".
Compile the kernel image and deploy the kernel according to the Build U-Boot and Linux Kernel from Source Code.
Enter the U-Boot console by pressing any key while powering the board.
Set the correct resolution configuration as explained in the Framebuffer (Linux) article and disable the framebuffer console, see below an example:
setenv vidargs video=tegrafb0:1024x600-16@60
Remove the framebuffer console tty1 from the boot arguments and disable the blinking cursor by adding vt.global_cursor_default=0:
Colibri T20 # printenv setupsetup=setenv setupargs asix_mac=${ethaddr} no_console_suspend=1 console=tty1 console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 ${memargs}Colibri T20 # setenv setup 'setenv setupargs asix_mac=${ethaddr} no_console_suspend=1 vt.global_cursor_default=0 console=ttyS0,${baudrate}n8 debug_uartport=lsport,0 ${memargs}'Colibri T20 # saveenvSaving Environment to NAND...Erasing Nand...Erasing at 0x9c0000 -- 100% complete.Writing to Nand... doneColibri T20 #
Note: Make sure consoleblank is kept at its default of 0 aka zero as otherwise it will blank the framebuffer after the configured amount of seconds.
Reboot, wait and see.
Between splash screen and X, the login prompt can appear and you can see something like this on your display:
.---O---. | | .-. o o | | |-----.-----.-----.| | .----..-----.-----. | | | __ | ---'| '--.| .-'| | | | | | | | |--- || --'| | | ' | | | | '---'---'--'--'--. |-----''----''--' '-----'-'-'-' -' | '---' The Angstrom Distribution colibri-t20 ttyS0 Angstrom v2013.12 - Kernel 3.1.10 colibri-t20 login:
To disable the login prompt on tty1 execute this command:
systemctl disable getty@tty1.service
This is how the splash screen looks at the end:
And the subsequent regular desktop: