How to setup logo of U-Boot on SP7021 platform

The aim of this document is to show the steps to enable video (HDMI display) and show logo of U-Boot on SP7021 platforms. First, you need to run make menuconfig command to select and enable necessary supports or drivers of U-Boot. Second, create your logo image file, compress and save to a specified folder. Last, re-build images. Please follow the following steps.

Source files of SP7021 can be got from GitHub. Refer to https://github.com/sunplus-plus1/SP7021 or 2. HOW TO GET SOURCE FILE AND PACKAGE.

1. Enable U-Boot video (HDMI display) support

Run make uconfig in project top folder. When “U-Boot 2019.04 Configuration” menu pops up, use arrow key to move cursor down to “Device Drivers” and press <Enter> to enter “Device Driver” sub-menu. Next, move cursor to “Graphic support” and press <Enter> to enter “Graphic support” sub-menu. Next, move cursor to “Enable driver model support for LCD/video” and press <Y> to enable it. In the same way, please also enable “Support 8-bit-per-pixel displays”, “Support 16-bit-per-pixel displays”, “Support 32-bit-per-pixel displays”, “Support ANSI escape sequences in video console”, “Support a simple text console”, “Support rotated displays” and “Display console as white on a black background”. Refer to screenshot below, all necessary supports or drivers should be enabled:

Next, move cursor down to “Enable SP7021 video support” and press <Y> to enable it. Refer to screenshot below:

Then, press <Enter> to enter “Enable SP7021 video support” sub-menu. Refer to screenshot below, “Maximum horizontal resolution” is set to 720. “Maximum vertical resolution” is set 480. “Maximum bits per pixel is set” to 8. “Console Text Rotate Angle Setting” is set to 0 degree. “Enable SP7021 Update Palette for 8BPP” is enabled. Finally, enable “Enable SP7021 video LOGO support”.

Use arrow key to select <Save> and save the settings. Press <Esc> key till exit menuconfig.

Note that text console of video (HDMI display) of U-Boot will be disabled when “Enable SP7021 video LOGO support” is enabled.

2. Create logo image file of U-Boot

Use image editor to create your logo of U-Boot and save the logo image file in bmp format. Depth of pixel of the bmp file can be 8, 16, 24 or 32 bits.

Next, use compression utility gzip to compress the bmp image file. For example, if file name of your bmp file is sunplus.bmp, please run gzip as shown below:

wells@wells-linux:~$ gzip -k sunplus.bmp wells@wells-linux:~$ ll sunplus* -rw-r--r-- 1 wells wells 26678 Mar 12 00:05 sunplus.bmp -rw-r--r-- 1 wells wells 2908 Mar 12 00:05 sunplus.bmp.gz wells@wells-linux:~$

where -k option is used to keep the source bmp file (no overwrite source). New compressed file sunplus.bmp.gz is generated.

Next, change file name of your compressed bmp file to denx-bmp.gz and copy it to folder boot/uboot/tools/logos/.

3. Build Linux image

Go to project top folder. Run make to build U-Boot and Linux image.

4. Boot system

Boot system with the built image. Logo of U-Boot looks like this picture.

5. Do not display text below image logo:

If you don’t like text displayed below image logo,

they can be removed by commenting out some C statements in display driver of U-Boot. Please use text editor to open the file, boot/uboot/board/sunplus/pentagram_board/video_display.c. Find function

int sp7021_video_show_board_info(void).

Comment out the following C statements (line 112 ~ 116):