3.1.2.9. U-Boot splash screen

A splash screen is the first screen a user sees when the device boots up. Splash screens give the user feedback that the board is booting up and showcase the vendor logo for branding purposes. The logo also identifies the boot image the system uses at startup.

The AM62Px supports displaying a splash screen until the kernel boots up, with a flicker-free handoff across different boot stages.

3.1.2.9.1. Features supported

The following features are supported for splash screen in U-Boot:

  1. Supports 32, 24, and 8 bits per pixel Bitmap (BMP) image.

  2. Supports frame buffer of size 1920x1200 resolution, images with a resolution lesser than this can still be displayed using the same frame buffer.

  3. Supports displaying only BMP and compressed BMP images using gzip or 8-bit Run-Length Encoding (RLE).

  4. Supports MultiMediaCard (MMC) and Octal Serial Peripheral Interface (OSPI) as BMP image sources.

The AM62Px supports splash screen at both U-Boot proper and A53 Secondary Program Loader (SPL) with A53 SPL displaying splash screen ~1.4 seconds earlier than U-Boot proper.

3.1.2.9.1.1. Enable the splash screen on ti-u-boot

In this SDK release ti-u-boot supports a splash screen at both A53 SPL stage and U-Boot proper.

3.1.2.9.1.1.1. A53 SPL

By default the splash screen is only enabled at A53 SPL. The default splash source defaults to SD card and displays a compressed TI logo BMP image. The SPL splash screen features compile into tispl.bin as part of the U-Boot build. Any change to the SPL splash screen feature requires rebuilding tispl.bin. Use the new tispl.bin to boot the board to see the splash screen at SPL stage.

At the SPL stage, the splash screen display function runs from board/ti/<platform>/evm.c in function spl_board_init

video_setup();
enable_caches();
if (IS_ENABLED(CONFIG_SPL_SPLASH_SCREEN) && IS_ENABLED(CONFIG_SPL_BMP))
    splash_display();

3.1.2.9.1.1.2. U-Boot proper

To enable the splash screen at U-Boot proper enable the following configs in configs/<platform>_a53_defconfig.

CONFIG_SPLASH_SCREEN=y
CONFIG_SPLASH_SOURCE=y
CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_HIDE_LOGO_VERSION=y

To use the splash screen only at U-Boot proper, disable the splash screen at A53 SPL by disabling CONFIG_SPL_VIDEO.

# CONFIG_SPL_VIDEO=y

The U-Boot proper splash screen compiles into u-boot.img. Any change to this feature requires rebuilding u-boot.img. Use the new u-boot.img to boot the board to see the splash screen.

Note

If you enable the splash screen at U-Boot proper, it stays active until Linux boot starts.

3.1.2.9.1.2. Display custom logo as splash screen

  1. In U-Boot, U-Boot reads all splash screen image information from environment variables defined below. Add these in the .env file used by the board under board/ti/<platform>.env. For reference, see board/ti/am62x.env:

    #Name of file to be displayed
    splashfile=ti_logo_414x97_32bpp.bmp.gz
    
    #DDR address to load image from boot media
    splashimage=0x80200000
    
    #Position of image on display
    splashpos=m,m
    
    #Source of bmp image
    splashsource=mmc
    
  2. To display a custom logo change the splashfile variable to logo_file_name.

  3. If using an SD card as splash source, place the image in the boot partition of SD card that has tispl.bin and u-boot.img.

  4. To display image from a different source, add the source information in struct default_splash_locations, defined in board/ti/<platform>/evm.c. For example in board/ti/am62x/evm.c, by default the code adds OSPI and SD card as sources as shown below :

    static struct splash_location default_splash_locations[] = {
         {
                 .name = "sf",
                 .storage = SPLASH_STORAGE_SF,
                 .flags = SPLASH_STORAGE_RAW,
                 .offset = 0x700000,
         },
         {
                 .name                = "mmc",
                 .storage     = SPLASH_STORAGE_MMC,
                 .flags               = SPLASH_STORAGE_FS,
                 .devpart     = "1:1",
         },
    };
    
  5. Change the splashsource variable to the name of the source defined in the struct shown earlier.

Important

<platform>.env file gets compiled into u-boot.img for U-Boot proper and into tispl.bin for A53 SPL. Any changes made in .env will require the recompilation of u-boot.img, tispl.bin, or both, depending on the stage at which you enable the splash screen.

3.1.2.9.1.3. Enable splash screen on upstream U-Boot

3.1.2.9.1.3.1. A53 SPL config options

To enable the splash screen at A53 SPL enable the following configs in configs/am62x_evm_a53_defconfig:

CONFIG_CMD_BMP=y
CONFIG_VIDEO=y
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_TIDSS=y
CONFIG_SPLASH_SCREEN=y
CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_HIDE_LOGO_VERSION=y
CONFIG_SPLASH_SOURCE=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_BMP_24BPP=y
CONFIG_BMP_32BPP=y
CONFIG_SPL_GZIP=y
CONFIG_SPL_VIDEO=y
CONFIG_SPL_SPLASH_SCREEN=y
CONFIG_SPL_SPLASH_SOURCE=y
CONFIG_SPL_VIDEO_TIDSS=y
CONFIG_SPL_BMP=y
CONFIG_SPL_BOARD_INIT=y
CONFIG_FS_LOADER=y
CONFIG_SPL_SYS_WHITE_ON_BLACK=y
CONFIG_SYS_SPL_MALLOC=y
CONFIG_SPL_BMP_24BPP=y
CONFIG_SPL_BMP_32BPP=y
CONFIG_SPL_SPLASH_SCREEN_ALIGN=y
CONFIG_SPL_DM_DEVICE_REMOVE=y
CONFIG_SPL_VIDEO_BMP_GZIP=y
CONFIG_SPL_HIDE_LOGO_VERSION=y
CONFIG_BLOBLIST=y
CONFIG_BLOBLIST_ADDR=0x80D00000

3.1.2.9.1.3.2. U-Boot proper config options

To enable splash screen at U-Boot proper enable following configs in configs/am62x_evm_a53_defconfig:

CONFIG_DM_GPIO=y
CONFIG_CMD_BMP=y
CONFIG_SYSCON=y
CONFIG_VIDEO=y
CONFIG_SYS_WHITE_ON_BLACK=y
CONFIG_VIDEO_TIDSS=y
CONFIG_SPLASH_SCREEN=y
CONFIG_SPLASH_SCREEN_ALIGN=y
CONFIG_HIDE_LOGO_VERSION=y
CONFIG_SPLASH_SOURCE=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_BMP_24BPP=y
CONFIG_BMP_32BPP=y
CONFIG_BMP=y
CONFIG_VIDEO_BMP_GZIP=y
CONFIG_VIDEO_LOGO=y

3.1.2.9.1.4. Enable splash screen on a custom board based on AM62Px SoC

To enable splash screen on custom board based on AM62Px SoC, follow these steps:

  1. Config fragments select the panel-specific device-tree overlays; see Panel-specific config fragments for details.

  2. Enable the A53 SPL splash screen related configurations. The configs/am62px_evm_a53_defconfig already includes the splash screen config fragment, which enables splash screen by default. For custom boards, refer to the following file:

  3. To enable different boot media for splash, define splash file locations struct in the board file present at board/ti/<platform>/evm.c

    AM62PX supports two splash storage locations: SPI-NOR flash (raw at offset 0x700000) and MMC FAT filesystem, defined in board/ti/am62px/evm.c:

    static struct splash_location default_splash_locations[] = {
         {
                 .name = "sf",
                 .storage = SPLASH_STORAGE_SF,
                 .flags = SPLASH_STORAGE_RAW,
                 .offset = 0x700000,
         },
         {
                 .name    = "mmc",
                 .storage = SPLASH_STORAGE_MMC,
                 .flags   = SPLASH_STORAGE_FS,
                 .devpart = "1:1",
         },
    };
    
  4. If a different boot media other than mmc is used for storing splash, then update the splash-related env variables in board.env file present at board/ti/<platform>/<platform>.env

    The default splash environment variables for AM62PX are set in board/ti/am62px/am62px.env:

    splashfile=ti_logo_414x97_32bpp.bmp.gz
    splashimage=0x80200000
    splashpos=m,m
    

Refer section Display custom logo as splash screen to know more about splash file location struct and env variables.

3.1.2.9.1.5. Display image using U-Boot command line

To test the display and video driver in U-Boot, Run the following commands at U-Boot console:

#To see all the files in your boot partition run
=> ls mmc 1

#To load image
=> fatload mmc 1 $loadaddr ti_logo_414x97_32bpp.bmp.gz

#To display image
=>  bmp display $loadaddr m m

This command will display an image at center of the screen.

#To get the BMP image info
=> bmp info

3.1.2.9.1.6. Run splash screen using OSPI NOR

  1. To load a BMP image on OSPI Not-OR (NOR) flash, run the following commands

    => sf probe
    => fatload mmc 1 $loadaddr file_name.bmp
    => sf update $loadaddr 0x700000 $filesize
    
  2. Change splashsource to sf in board.env, recompile tispl.bin for SPL stage and u-boot.img for U-Boot proper.

Important

OSPI NOR does not support displaying compressed BMP images.

3.1.2.9.1.7. Display RLE compressed image

Enable the following Kconfig options to support 8-bit RLE compressed image.

CONFIG_SPL_VIDEO_BMP_RLE8  #for SPL splash screen
CONFIG_VIDEO_BMP_RLE8      #for U-Boot splash screen

3.1.2.9.1.8. Flicker free display across boot stages and Linux kernel

  1. This SDK release supports flicker-free display across all boot stages from A53 SPL to U-Boot proper. It uses a bloblist scheme in which the Video Bloblist passes the framebuffer size and address from A53 SPL to U-Boot proper.

  2. It also keeps the splash screen active while the operating system boots, with a smooth move to the Linux boot logo and then to PSplash boot animation. This uses framebuffer reservation and a simple-framebuffer approach described in the following points.

  3. To keep the splash screen active while the Linux kernel boots, ti-u-boot updates the Linux device-tree with framebuffer region data and marks it as reserved. If a custom boot loader or board does not support this update, reserve the framebuffer address and size manually in the board device-tree file as shown below:

    framebuffer: framebuffer@ff700000 {
         reg = <0x00 0xff700000 0x00 0x008ca000>;
         no-map;
    };
    
  4. To move smoothly from the boot loader splash screen to the Linux boot logo and then to PSplash, enable the simple-framebuffer driver in arch/arm64/configs/defconfig. Add a simple-framebuffer device-tree node with status disabled in the board device-tree file. ti-u-boot updates this node with framebuffer data before enabling it:

    CONFIG_FB_SIMPLE=y
    
    framebuffer0: framebuffer@0 {
         compatible = "simple-framebuffer";
         power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>,
                         <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>,
                         <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>;
         clocks = <&k3_clks 186 6>,
                  <&dss0_vp1_clk>,
                  <&k3_clks 186 2>;
         display = <&dss0>;
         status = "disabled";
    };
    
  5. If a custom boot loader or board does not support this dynamic update, define the simple-framebuffer node manually in the board device-tree file under the chosen node.

    framebuffer0: framebuffer@0 {
          compatible = "simple-framebuffer";
          power-domains = <&k3_pds 186 TI_SCI_PD_EXCLUSIVE>,
                          <&k3_pds 243 TI_SCI_PD_EXCLUSIVE>,
                          <&k3_pds 244 TI_SCI_PD_EXCLUSIVE>;
          clocks = <&k3_clks 186 6>,
                   <&dss0_vp1_clk>,
                   <&k3_clks 186 2>;
          display = <&dss0>;
          reg = <0x00 0xff700000 0x00 0x008ca000>;
          width = <1920>;
          height = <1200>;
          stride = <(1920 * 4)>;
          format = "x8r8g8b8";
     };
    
  6. This scheme lets the Linux kernel reuse the boot loader framebuffer for the boot logo and animation before it loads the display driver, giving a smooth handoff.

Note

For more on simple-framebuffer, see the simple-framebuffer device-tree binding doc. Even if a non-Linux boot loader shows the splash screen before moving to Linux, update the framebuffer data in the device-tree nodes listed earlier. This gives a flicker-free display during operating system boot and reduces memory use.

3.1.2.9.1.9. Flicker free and persistent display until display server

To keep the boot animation active until the display server starts, disable the Direct Rendering Manager (DRM) “framebuffer device emulation” feature in arch/arm64/configs/defconfig. This feature disables the simple-framebuffer region and resets the display hardware before it takes over.

# CONFIG_DRM_FBDEV_EMULATION is not set

Note

The SDK enables this option by default. Disable it manually if you need an active splash screen and do not use the DRM fbdev emulation feature.

3.1.2.9.1.10. Panel-specific config fragments

In addition to the base configs/am62x_a53_splashscreen.config, pass panel-specific config fragments to select the correct device-tree overlay and display pipeline drivers.

Panel

Config fragments required

OLDI Microtips MF101HIE

configs/am62p5_j722s_evm_oldi-microtips-mf101hie-panel.config

DSI Raspberry Pi 7-inch

configs/k3_a53_dsi.config configs/am62p5_evm_dsi_rpi_panel.config

3.1.2.9.1.11. Build U-Boot with splash screen enabled

The splash screen is enabled by passing the appropriate config fragment(s) alongside the platform defconfig at the make configuration step. The second make invocation compiles the binaries.

configs/am62px_evm_a53_defconfig already includes configs/am62x_a53_splashscreen.config, so a standard A53 build has splash screen enabled. To use a specific panel, apply the corresponding config fragment:

$ export UBOOT_DIR=<path_to_ti_u_boot>
$ export TI_LINUX_FW_DIR=<path_to_ti_linux_firmware>
$ export TFA_DIR=<path_to_arm_trusted_firmware>
$ export OPTEE_DIR=<path_to_ti_optee_os>
$ cd $UBOOT_DIR

# OLDI panel
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" am62px_evm_a53_defconfig am62p5_j722s_evm_oldi-microtips-mf101hie-panel.config O=$UBOOT_DIR/out/a53
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" CC="$CC_64" BL31=$TFA_DIR/build/k3/lite/release/bl31.bin TEE=$OPTEE_DIR/out/arm-plat-k3/core/tee-pager_v2.bin O=$UBOOT_DIR/out/a53 BINMAN_INDIRS=$TI_LINUX_FW_DIR

# DSI Raspberry Pi 7-inch panel
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" am62px_evm_a53_defconfig k3_a53_dsi.config am62p5_evm_dsi_rpi_panel.config O=$UBOOT_DIR/out/a53
$ make ARCH=arm CROSS_COMPILE="$CROSS_COMPILE_64" CC="$CC_64" BL31=$TFA_DIR/build/k3/lite/release/bl31.bin TEE=$OPTEE_DIR/out/arm-plat-k3/core/tee-pager_v2.bin O=$UBOOT_DIR/out/a53 BINMAN_INDIRS=$TI_LINUX_FW_DIR

3.1.2.9.1.12. Disable splash screen

To disable splash screen use configs/am62x_evm_prune_splashscreen.config fragment while building u-boot with the corresponding a53 defconfig.