Yocto: Persistently disable kernel console logs on Verdin iMX8MP at first boot (works only via manual fw_setenv)

U-Boot Splash Screen Configuration

Based on the Toradex documentation, you can add a splash screen to your U-Boot configuration. However, there are some important considerations for your Verdin iMX8MP setup.

Important Limitation for iMX8-based Modules

The documentation notes that in BSP 5.0 video stack is disabled by default in U-Boot, so you have to enable it manually by adding CONFIG_DM_VIDEO=y to defconfig of the module you’re using (1). This is crucial for your Verdin iMX8MP module.

Adding Splash Screen Support

To implement a U-Boot splash screen in your custom layer, you’ll need to:

1. Enable Video Support in U-Boot

Add this to your u-boot-toradex_%.bbappend:

do_configure:append() {
    # Enable video support for splash screen
    echo "CONFIG_DM_VIDEO=y" >> ${B}/.config
    echo "CONFIG_VIDEO_BMP_RLE8=y" >> ${B}/.config
    echo "CONFIG_SPLASH_SCREEN=y" >> ${B}/.config
    echo "CONFIG_SPLASH_SCREEN_ALIGN=y" >> ${B}/.config
    echo "CONFIG_BMP_16BPP=y" >> ${B}/.config
    echo "CONFIG_BMP_24BPP=y" >> ${B}/.config
    echo "CONFIG_BMP_32BPP=y" >> ${B}/.config
}

2. Convert Your Logo to BMP Format

The documentation specifies the image format requirements. U-Boot can read a specific image format. Use the following command to convert the PNG image to BMP (1):

convert testlogo.png -type Palette -colors 224 -depth 8 -compress none -verbose BMP3:testlogo.bmp

Warning: 8-bit depth is a requirement. It has been reported that the parameter -depth 8 from the command above does not always work. Make sure that your image bit depth is correct manually (1).

3. Add Your Logo to U-Boot

Create a directory structure in your layer:

recipes-bsp/u-boot/files/verdin-imx8mp/
├── disable-console-logs.patch
├── fast-boot-config.patch
└── splash-logo.bmp  # Your converted logo

Then modify your u-boot-toradex_%.bbappend:

FILESEXTRAPATHS:prepend := "${THISDIR}/files:"

SRC_URI += "\
    file://disable-console-logs.patch \
    file://splash-logo.bmp \
"

do_configure:append() {
    # Copy logo to U-Boot source
    cp ${WORKDIR}/splash-logo.bmp ${S}/tools/logos/toradex.bmp
    
    # Enable video support for splash screen
    echo "CONFIG_DM_VIDEO=y" >> ${B}/.config
    echo "CONFIG_SPLASH_SCREEN=y" >> ${B}/.config
    echo "CONFIG_SPLASH_SCREEN_ALIGN=y" >> ${B}/.config
    echo "CONFIG_BMP_16BPP=y" >> ${B}/.config
    echo "CONFIG_BMP_24BPP=y" >> ${B}/.config
    echo "CONFIG_BMP_32BPP=y" >> ${B}/.config
}

4. Alternative: Runtime Splash Screen Loading

The documentation also shows how to pre-load splash screen in U-Boot from eMMC/SD/USB (1). You can set these environment variables:

setenv splashfile /boot/logo.bmp
setenv splashsource mmc_fs
saveenv

Important Considerations

  1. iMX8 Limitations: Community discussions indicate that mainline U-boot doesn’t support video displays on i.MX8-based modules (2). The support may be limited even in downstream versions.

  2. Alternative Approach: For a more reliable solution, consider using Plymouth splash screen instead (3), which runs from userspace after the graphics drivers are initialized.

  3. Splash Position: You can adjust the splash screen position using the splashpos variable (1):

setenv splashpos m,m  # Center the splash screen

Recommended Alternative: Plymouth

Given the limitations with U-Boot splash screens on iMX8-based modules, consider implementing a Plymouth-based splash screen that appears early in the boot process but after graphics drivers are loaded (3).

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.