Search by Tags

U-Boot Splash Screen

 

Compare with Revision
Subscribe for this article updates

If U-Boot supports the frame buffer, U-Boot can be used to display a splash screen or a custom company logo.

Creating a Custom Logo with GIMP

Create a new file in GIMP and chose a dimension multiple of 8. As an example, a 324 x 64 pixels image was created,configured as seen in the picture bellow.


Write some text or your company's name.


Converting the PNG to BMP

U-Boot can read a specific image format. Use the following command to convert the PNG GIMP image to BPM.

convert testlogo.png -type Palette -colors 256 -compress none -verbose BMP3:testlogo.bmp

Toradex has its own logo set in U-Boot source which gets compiled with U-Boot. The logo can be found at:

u-boot-toradex/tools/logos/toradex.bmp

A simple option to have a custom logo is to replace toradex.bmp file. It is necessary to keep the same “toradex.bmp” file name so the build system finds the logo.

cp ~/testlogo.bmp ~/u-boot-toradex/tools/logos/toradex.bmp

After U-Boot is compiled and updated on the module, the result is the following:


Manipulating Splash Screen in U-Boot at Runtime

It is also possible to load custom images at runtime. The image can be read into memory from a variety of sources.

Network TFTP:

tftp <address> <bmp file name>

MMC/SD Card:

mmc dev 0
mmc rescan
load mmc 0 <address> <bmp file name>

USB Storage:

usb start
load usb <device number> <address> <bmp file name>

After loading the image into memory address, display it with the bmp command:

bmp display <address>

Practical Example

To show how U-Boot can be customised by any customer a simple practical example was created where U-Boot displays a splash screen when the Linux image update process is started.

The following PNG image was created in GIMP and then converted to BMP using ImageMagick's convert tool.


The BMP file was stored on a TFTP server.

Then the image process was started in U-Boot’s command prompt as follows:

run setupdate
setenv update_logo 'tftp ${loadaddr} updating.bmp && bmp display ${loadaddr} && run update'
run update_logo

Note that the ‘update_logo’ variable loads the BMP image into memory from a TFTP source. As soon as ‘run update_logo’ is given, the image is first displayed and then the update process goes on.

The result is shown in the following video.