Search by Tags

Splash Screen (Linux)

 
Applicable for

Compare with Revision




Subscribe for this article updates

The splash screen is the picture that you can see while Linux is booting. By default Linux just displays as many small penguins as there are symmetric cores and the boot console below.

This article explains how to:

  • Create a picture using Gimp.
  • Convert the picture to ASCII format.
  • Add the picture to the Kernel sources and compile a custom kernel with it.
  • Disable the frame buffer console.
  • Disable logging between splash screen and X.

Install the Tools

To create and convert a picture, download the packages:

  • Gimp

Install Gimp on Fedora:

~# sudo yum install gimp

Install Gimp on Ubuntu:

~# sudo apt-get install gimp
  • 2-D Drawing Tools (netpbm)

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 aptget install tgif xfonts-100dpi xfonts-75dpi

Create a Picture

Create a new image with Gimp fitting the size of your display.

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.

new_image

Draw whatever is desired on the newly created canvas.

gimp

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.

export

The file really needs to be in ppm format even though above dialog may actually be named PNM!

Convert the Picture to ASCII Format

Now using the terminal, find the exported picture to convert to ASCII using the commands:

$ 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

Add the Picture to the Kernel Sources and Compile a Custom Kernel with it

To get the source code, tool chain and the instructions how to build a custom kernel, follow the tutorial given bellow:

Build U-Boot and Linux Kernel from Source Code

Basically you have to download the tool chain and the correct Linux kernel from the toradex git server.

After having copied your picture to the correct folder giving it the correct name.

The ASCII file must be named "logo_custom_clut224.ppm" and must be located in the kernel source folder "drivers/video/logo/".

$ cp toradexlogo_1024x600_ascii_224.ppm logo_custom_clut224.ppm
$ mv logo_custom_clut224.ppm linux-toradex/drivers/video/logo/

Now just select Custom logo using make menuconfig (Remember to follow the "U-Boot and Linux Kernel from Source Code" page to know how to export the tool chain and compile the kernel).

Enter menuconfig:

$ make menuconfig ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-

menuconfig

In menuconfig, go to: Device Drivers -> Graphics support -> Bootup logo -> Select just "Custom 224-color Linux logo".

menuconfig logo

Now compile the kernel:

$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi-
...
...
$ make ARCH=arm CROSS_COMPILE=arm-angstrom-linux-gnueabi- uImage

Use the uImage built at the following location:

arch/arm/boot/uImage

Disable the Frame Buffer Console

Enter the U-Boot console to set the resolution configuration and disable the frame buffer console.

Check the correct resolution as explained in the article referred to bellow:

Framebuffer (Linux)

In my case:

setenv vidargs video=tegrafb0:1024x600-16@60

Remove the frame buffer console tty1 from the boot arguments:

Colibri T20 # printenv 
setup=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 # save
Saving Environment to NAND...
Erasing Nand...
Erasing at 0x9c0000 -- 100% complete.
Writing to Nand... done
Colibri 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

Disable Logging between Splash Screen and X

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 [at] tty1 [dot] service

Final Example

This is how the splash screen looks at the end:

spashscreen

And the subsequent regular desktop:

desktop-spash