Build Boot-Up Logo for U-Boot

Only for Android

This is a guide for building the boot-up logo on Amlogic platforms (may be different on other SoC platforms):

  • The Logo is loaded on U-Boot
  • Build as logo.img with a separate logo partition
  • Will display at the point of U-Boot load logo.img. It will disappear when the boot-animation of Android begins.
  • If you don’t want to display a bootup logo, just leave the logo partition blank.

Preparations

Before you begin, you’ll need a bootup picture with the following specs:

  • BMP format, should be:
    • 16bit RGB565 BMP format
  • Resolution <= 1080P (1920 * 1080)

Check the bmp file:

1
2
3
$ file ~/Pictures/khadas.bmp 
/home/gouwa/Pictures/khadas.bmp: data
$

An example bootup logo file khadas.bmp is provided for reference.

In this guide, we will introduce two different approaches to build the bootup Logo.

Build Logo Separately

1) Clone the tool:

1
$ git clone https://github.com/khadas/utils.git

2) Update a new logo picture as you want:

1
2
$ mkdir -p images/logo
$ cp ~/Pictures/khadas.bmp images/logo/bootup.bmp

3) Build the logo:

1
2
3
4
$ ./utils/logo_img_packer -r images/logo/ images/logo.img 
dbg:item num 1
dbg:pack item [bootup]
$

Build Logo on Android

1) Update a new logo picture as you want:

1
$ cp ~/Pictures/khadas.bmp device/khadas/kvim/product/logo/bootup.bmp

2) Build the logo:

1
$ make logoimg

See this build log for reference:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
$ make logoimg

...

generate out/target/product/kvim/upgrade/logo.img
gzip -c device/khadas/kvim/product/logo/bootup.bmp > out/target/product/kvim/upgrade/logo/bootup.bmp
dbg:item num 8
dbg:pack item [bootup]
dbg:pack item [upgrade_upgrading]
dbg:pack item [upgrade_fail]
dbg:pack item [upgrade_unfocus]
dbg:pack item [upgrade_error]
dbg:pack item [upgrade_success]
dbg:pack item [upgrade_logo]
dbg:pack item [upgrade_bar]
Installed out/target/product/kvim/upgrade/logo.img

### make completed successfully (01:54 (mm:ss))

$

Download the logo.img

1) Copy the new logo.img to a thumbdrive (U-disk):

1
$ cp images/logo.img /media/gouwa/9B98-6C15/

2) Insert the thumbdrive into your VIM, then boot into U-Boot mode.

3) Update logo partition as new logo.img:

1
kvim# usb_update logo logo.img

4) Refresh to see the new logo:

1
kvim# run init_display

Further reading

You might notice that there are other pictures that are also built into logo.img. They are listed below:

1
2
3
$ ls device/khadas/kvim/product/logo/
bootup.bmp upgrade_error.bmp upgrade_logo.bmp upgrade_unfocus.bmp
upgrade_bar.bmp upgrade_fail.bmp upgrade_success.bmp upgrade_upgrading.bmp

These pictures are used to indicate different upgrade states. They are optional.

You can check this source code for further details:

1
u-boot/drivers/usb/gadget/v2_burning/v2_common/optimus_progress_ui.c

See Also
U-Boot Usage