odroid-n2:application_note:bootlogo_n2

'ODROID-N2' on this page refers to the ODROID-N2 series (N2, N2+, N2L).

Tips to use custom boot logo

The instruction on this page is only available for ODROID-C4/N2

Using the display auto detection option, the broken logo display can be shown with the latest version.
Please use manual display mode by setting setenv display_autodetect “false” of boot.ini.

The basic image format for a boot logo file is as follows.

Format

Image Format : 24-bit Windows BMP image or 24-bit Windows Gzipped BMP image (without meta-data)
Image Size : 1280 by 720
Color Depth : 24bpp Color
The file name should be 'boot-logo.bmp' or 'boot-logo.bmp.gz'

Here is the sample BMP file. boot-logo.bmp.gz

We recommend using GIMP or KolourPaint for boot logo creation.
Here are the advanced options for each of the recommended programs.

[ GIMP ]

- Export as Windows BMP
- Compatibility Options : Do not write Color Space Information
- Advanced Options : 24 bits Color
- Name : "boot-logo.bmp"

[ KolourPaint ]

- Save Image as 
- Filter : Windows BMP image
- Convert to : 24-bit Color

Size Limitation

It is important to note that, the size of your logo file must be under 2MB because the logo partition of Android is limited to 2MB. Gzip BMP format is supported, so if the size is over 2MB, you can use bmp.gz file.

$ gzip boot-logo.bmp 
$ ls 
boot-logo.bmp.gz

Auto scaling option

On the bootloader <U-Boot>, image scaling for boot logo is supported,
so displayed boot logo will be fixed automatically for output mode as described in boot.ini.

For example, in case of using the mode “1024x600p60hz”, the boot logo will be displayed as 1024×600 even though the actual size of the bmp file is 1280×720.

Your ODROID board will scan the existence of the following three parts in numerical order.

  1. boot-logo.bmp.gz in VFAT partition
  2. boot-logo.bmp in VFAT partition
  3. logo data in Android LOGO partition

In Android, you can replace the boot logo with your custom image.

There are two ways to change the boot logo image.

  1. Add a image into VFAT partition.
  2. Rewrite image data into Android LOGO partition using fastboot.

1. VFAT

Copy the new boot-logo.bmp (or boot-logo.bmp.gz) to VFAT partition.

2. Android Logo Partition

If you want to replace the logo data in the logo partition, please follow this guide.

First, you must get into your U-Boot command line while pressing the ENTER key when your ODROID board is powered up.
And execute fastboot command from U-Boot and connect it with your desktop using a USB cable.

[ On ODROID ]

target
# fastboot

Next, run fastboot command from your desktop.
[ HOST PC ]

host
$ fastboot flash logo boot-logo.bmp.gz
or 
$ fastboot flash logo boot-logo.bmp

If you will use BMP data on logo partition, make sure there is NO boot-logo.bmp.gz file on your VFAT area,
because U-Boot first checks if there is a boot-logo.bmp/boot-logo.bmp.gz file in the VFAT area and then checks the logo partition.

With Ubunut, LOGO option is NOT included by default.
So, you need to add a boot logo image into VFAT partition.
The way using LOGO partition is not available on Ubuntu.

1080p60hz case

On U-Boot, default logo display logic works with 1080p60hz display resolution.
So you don't need to add/modify related commands,
but make sure boot logo file exists in the aforementioned locations.

Another resolution other than 1080p60hz

You should add the commands to your boot.ini before bootcmd is executed.

Please check if there is 'showlogo' command in your boot.ini first. If not so, refer to the following.

### Boot Arguments
if test "${display_autodetect}" = "true"; then hdmitx edid; fi
if test "${hdmimode}" = "custombuilt"; then setenv cmode "modeline=${modeline}"; fi
 
### Add showlogo with ${hdmimode} size
hdmitx mode ${voutmode}
showlogo ${hdmimode}

If you want to use a native resolution of bmp image like 1920×1080, 1024×600 (for VU7+) or 800×480 (for VU7),
please set the arg[2]/arg[3] of showlogo command as following.

target
# help showlogo
showlogo - Displaying BMP logo file to HDMI screen with the specified resolution
 
Usage:
showlogo <resolution> [<bmp_width> <bmp_height>]
        resolution - screen resoltuion on HDMI screen
                '1080p60hz' will be used by default if missing
        bmp_width (optional) - width of logo bmp file
                '1280' will be used by default if missing
        bmp_height (optional) - height of logo bmp file
                '720' will be used by default if missing

Replace boot logo image with yours as described in previous sections
and then modify 'showlogo' command in boot.ini.

Here are examples.

1. Logo image size of width 1920 and height 1080

If your monitor's resolution is 1920×1080 and you want to set a bmp file in 1920×1080,
set command in boot.ini as following.

setenv hdmimode "1080p60hz"
showlogo ${hdmimode} 1920 1080

2. Logo image size of width 1024 and height 600

setenv hdmimode "1024x600p60hz"
showlogo ${hdmimode} 1024 600

3. Logo image size of width 800 and height 480

setenv hdmimode "800x480p60hz"
showlogo ${hdmimode} 800 480

In case of Android, you can use bootanimation.zip method to show your custom logo using animation.

Please refer to this reference site.
https://android.googlesource.com/platform/frameworks/base/+/master/cmds/bootanimation/FORMAT.md

The system selects a boot animation zip file from the following locations.

/system/media/bootanimation.zip
/oem/media/bootanimation.zip

Before copy process, you need to change root filesystem permission as r/w.
And copy your bootanimation.zip into /system/media/ folder.

target
console:/ $ su
console:/ # mount -o rw,remount /system
[  173.674067@2] EXT4-fs (mmcblk0p11): re-mounted. Opts: block_validity,delalloc,barrier,user_xattr,acl,inode_readahead_blks=8

Please make sure file permission of bootanimation.zip.

target
console:/ # chmod 755 /system/media/bootanimation.zip                          
console:/ # ls -al /system/media/bootanimation.zip                             
-rwxr-xr-x 1 root root 5030729 2019-03-27 00:41 /system/media/bootanimation.zip
  • odroid-n2/application_note/bootlogo_n2.txt
  • Last modified: 2022/11/08 14:38
  • by luke.go