3.1.1.9. U-Boot Splash Screen

A splash screen is an introductory screen the user sees over the display when the device boots up. Splash screens are typically used to provide feedback to the user that the board is booting up and to showcase the vendor logo which helps with branding and identification of which boot image is being used for the bootup.

The AM62Px offers out-of-box splash screen experience with OLDI display. It also supports displaying a splash screen until kernel is booted up with flicker-free transition across different boot stages.

3.1.1.9.1. Features supported

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

  1. Supports 32, 24, and 8 bits per pixel 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(gzip and 8bit RLE).

  4. Supports MMC and OSPI as bmp image sources.

  5. Supports splash screen only on OLDI panel.

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

3.1.1.9.1.1. Enabling 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.1.9.1.1.1. A53 SPL

By default the splash screen is only enabled at A53 SPL. The default splash source is set to SD card and displays a gzip TI logo BMP Image. The SPL splash screen features are compiled in the tispl.bin which is built during u-boot compilation. Any changes made to SPL splash screen feature will require recompiling tispl.bin. Use the new tispl.bin to boot the board to see splash screen at SPL stage.

At the SPL stage, the splash screen display function is called 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.1.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

If the user only wants the splash screen feature at U-Boot proper, the user can disable the splash screen at A53 SPL by disabling the kconfig CONFIG_SPL_VIDEO.

# CONFIG_SPL_VIDEO=y

The splash screen feature at U-Boot proper gets compiled in u-boot.img, which is built during U-Boot compilation. Any changes made to U-Boot splash screen feature will require the recompilation of u-boot.img. User should use the recompiled u-boot.img to boot the board, to see splash screen at U-Boot proper.

Note

  • If splash screen is enabled at U-Boot proper it will stay persistent until linux boot starts.

3.1.1.9.1.2. Display custom logo as splash screen

  1. In U-Boot all information for the image to be displayed as splash screen is passed through environment variables, defined below. These should be added in the .env file used by the board under board/ti/<platform>.env. For reference, board/ti/am62x.env is shown below :

    #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 which contains tispl.bin and u-boot.img.

  4. To display image from a different source, add the source information in struct default_splash_locations, which is defined in board/ti/<platform>/evm.c. For example in board/ti/am62x/evm.c, by default OSPI and SD card are added 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 splashsource variable to the name of the source defined in above struct.

Important

<platform>.env file gets compiled into u-boot.img and tispl.bin for U-Boot proper and A53 SPL respectively, any changes made in .env will require the recompilation of u-boot.img and tispl.bin depending on the stage splash screen is enabled.

3.1.1.9.1.3. Enabling splash screen on custom board based on AM62Px SoC

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

  1. Add video driver and panel node in the dts file by referring following patches:

  1. Enable the A53 SPL splash screen related configurations in the AM62Px defconfig by referring to below patches and files:

Note

To enable the splash screen at U-Boot proper instead of A53 SPL, enable the following configs in configs/am62x_a53_splashscreen.config

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
  1. To enable different boot media for splash, define splash file locations struct in the board file present at board/ti/<platform>/evm.c

  2. 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

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

3.1.1.9.1.4. 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

The above command will display an image at centre of the screen.

#To get the BMP image info
=> bmp info

3.1.1.9.1.5. Run splash screen using OSPI NOR

  1. To load bmp image on OSPI NOR 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 doesn’t support displaying gzip bmp image.

3.1.1.9.1.6. Display RLE compressed image

Enable the following kconfigs to support 8bit RLE compressed image.

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

3.1.1.9.1.7. Flicker free display across boot stages and Linux Kernel

  1. This SDK release supports flicker-free display with splash screen displayed persistently across all the bootloader stages starting from A53 SPL to U-Boot proper using a bloblist-based scheme, where framebuffer related information like size of framebuffer, address of framebuffer are passed from A53 SPL to U-Boot proper using Video Bloblist.

  2. It also supports persistent splash screen display while the operating system is booting up, along with the seamless transition to Linux Boot logo and thereafter to PSplash boot animation using framebuffer reservation and simple-framebuffer based approach as described in the following points.

  3. To make sure that the splash screen remains persistent while Linux Kernel boots up, ti-u-boot dynamically updates the Linux kernel device-tree with framebuffer region meta-data, marking it as reserved in Linux device tree. In case a custom bootloader or a different board is used which doesn’t support the aforementioned dynamic node update for reserving framebuffer region, then frame-buffer address and size can be manually reserved in board-specific device-tree file as shown below :

    framebuffer: framebuffer@ff700000 {
         reg = <0x00 0xff700000 0x00 0x008ca000>;
         no-map;
    };
    
  4. To enable the seamless transition from bootloader splash screen to Linux boot logo and thereafter to PSplash based boot animation, simple-framebuffer driver was enabled in arch/arm64/configs/defconfig. A simple-framebuffer device-tree node with status as disabled was created in board specific device-tree file as shown below and ti-u-boot dynamically updates this node with framebuffer related meta-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. In case a custom bootloader or a different board is used that doesn’t support the aforementioned dynamic node update, then the simple-framebuffer node can be defined manually in the board device-tree file under the chosen node as shown below :

    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. The above scheme also ensures that the bootloader allocated framebuffer region is re-used by Linux kernel for displaying the boot logo and animation even before Linux kernel loads the display driver, thus giving a seamless experience during transition.

Note

More information regarding simple-framebuffer can be found in the simple-framebuffer device-tree binding doc Even if a non-Linux based custom bootloader is used to display the splash screen before transitioning to Linux, the framebuffer-related information can be updated in aforementioned device-tree nodes to enable seamless and flicker-free transition during operating system bootup along with reduced memory footprint.

3.1.1.9.1.8. Flicker free and persistent display until display server

If the user wants to keep the boot animation alive until the display server starts up, then they need to manually disable “DRM framebuffer device emulation” feature in arch/arm64/configs/defconfig. This is required since the framebuffer emulation feature disables the simple-framebuffer region and resets the display hardware before taking control of the display.

# CONFIG_DRM_FBDEV_EMULATION is not set

Note

The above option is enabled by default in the SDK, The user will need to disable it manually if they desire a persistent splash screen and they are not using the DRM fbdev emulation feature.