Back screen during boot (plymouth related)

Hi,

I’m trying to get a custom splash animation via a Reference Image with Yocto Project/OpenEmbedded.
So I used repo to start and bitbake to build my image.

I added a custom layer that I can see loaded during my build.
This layer has the future purpose of displaying an animation in the form of a series of images.

For the moment I am just trying to validate the operation by displaying an image only (without the basic spinner etc.)

But I only have a black screen at boot and after my card starts well and works well but I don’t see my custom plymouth theme at any time.
Here are my files, do you have any idea where this might come from?

meta-custom-splash/conf/layer.conf :

# We have a conf version, mandatory

LCONF_VERSION = “7”

# We have a conf and classes directory, add to BBPATH

BBPATH .= “:${LAYERDIR}”

# We have recipes-* directories, add to BBFILES

BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \

        ${LAYERDIR}/recipes-\*/\*/\*.bbappend \\

        ${LAYERDIR}/recipes-\*/\*.bb \\

        ${LAYERDIR}/recipes-\*/\*.bbappend \\

        "

meta-custom-splash/recipes-core/plymouth/plymouth_%.bbappend :

FILESEXTRAPATHS:prepend := “${THISDIR}/files:”

SRC_URI += "
file://custom.plymouth
file://custom.script
file://frame01.png
file://frame02.png
file://plymouthd.defaults \
"

PACKAGECONFIG = “pango drm”

EXTRA_OECONF += “–with-udev --with-runtimedir=/run”

do_install:append () {
install -m 0644 ${WORKDIR}/plymouthd.defaults ${D}${datadir}/plymouth/plymouthd.defaults
install -d ${D}${datadir}/plymouth/themes/custom
install -m 0644 ${WORKDIR}/custom.plymouth ${D}${datadir}/plymouth/themes/custom/custom.plymouth
install -m 0644 ${WORKDIR}/custom.script ${D}${datadir}/plymouth/themes/custom/custom.script
install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/custom/frame01
install -m 0644 ${WORKDIR}/frame02.png ${D}${datadir}/plymouth/themes/custom/frame02
}

FILES:${PN}:append := "
${datadir}/plymouth/themes/custom
${datadir}/plymouth/themes/custom/frame01.png
${datadir}/plymouth/themes/custom/frame02.png
${datadir}/plymouth/themes/custom/custom.script
${datadir}/plymouth/plymouthd.defaults
"

meta-custom-splash/recipes-core/plymouth/files/plymouthd.defaults:

[Daemon]
Theme=custom
ShowDelay=0
DeviceTimeout=8

meta-custom-splash/recipes-core/plymouth/files/custom.plymouth :

[Plymouth Theme]
Name=Custom Boot Splash
Description=Animated splash for Verdin iMX8MP
ModuleName=script

[script]
ImageDir=/usr/share/plymouth/themes/custom
ScriptFile=/usr/share/plymouth/themes/custom/custom.script

meta-custom-splash/recipes-core/plymouth/files/custom.script :

image = Image(“frame01.png”);

pos_x = Window.GetWidth()/2 - image.GetWidth()/2;
pos_y = Window.GetHeight()/2 - image.GetHeight()/2;

sprite = Sprite(image);
sprite.SetX(pos_x);
sprite.SetY(pos_y);

fun refresh_callback () {
sprite.SetOpacity(1);
spr.SetZ(15);
}

Plymouth.SetRefreshFunction (refresh_callback);

***build-torizon/conf/local.conf :


this code line has been added :

CORE_IMAGE_EXTRA_INSTALL += “plymouth”

And of course I have theses two images

meta-custom-splash/recipes-core/plymouth/files/frame01.png and
***meta-custom-splash/recipes-core/plymouth/files/frame02.png


Once the image is built and deployed on my device, I can clearly see my folder with my different files in /usr/share/plymouth/

If you have any ideas or explanations, I’m interested.
Thanks you
Simon

Hi, I’m the Toradex AI Assistant.

I might make mistakes. Our support team will step in if needed. If I answered your question, please tick the “Solution” checkbox. For follow-up questions to me, please use @ToradexAI in your post.

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


Looking at your custom Plymouth setup, I can identify several issues that are preventing your splash screen from displaying. Let me walk you through the corrections needed based on the Toradex documentation.

Issues with Your Current Setup

1. File Installation Path Errors

Your .bbappend file has incorrect file paths for the PNG images:

install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/custom/frame01
install -m 0644 ${WORKDIR}/frame02.png ${D}${datadir}/plymouth/themes/custom/frame02

(1)

These should include the .png extension in the destination paths.

2. Script File Error

Your custom.script file has a typo - spr.SetZ(15); should be sprite.SetZ(15);.

3. Configuration File Location

The plymouthd.defaults file should be installed to /etc/plymouth/ rather than /usr/share/plymouth/.

Corrected Implementation

Based on the official Toradex documentation (1), here’s how you should structure your files:

Updated plymouth_%.bbappend

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

SRC_URI += " \
    file://custom.plymouth \
    file://custom.script \
    file://frame01.png \
    file://frame02.png \
"

EXTRA_OECONF += "--with-runtimedir=/run"

do_install:append () {
    install -d ${D}${datadir}/plymouth/themes/custom
    install -m 0644 ${WORKDIR}/custom.plymouth ${D}${datadir}/plymouth/themes/custom/custom.plymouth
    install -m 0644 ${WORKDIR}/custom.script ${D}${datadir}/plymouth/themes/custom/custom.script
    install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/custom/frame01.png
    install -m 0644 ${WORKDIR}/frame02.png ${D}${datadir}/plymouth/themes/custom/frame02.png
}

(1)

Corrected custom.script

image = Image("frame01.png");

pos_x = Window.GetWidth()/2 - image.GetWidth()/2;
pos_y = Window.GetHeight()/2 - image.GetHeight()/2;

sprite = Sprite(image);
sprite.SetX(pos_x);
sprite.SetY(pos_y);

fun refresh_callback () {
    sprite.SetOpacity(1);
    sprite.SetZ(15);
}

Plymouth.SetRefreshFunction (refresh_callback);

(1)

Theme Selection Method

Instead of using plymouthd.defaults, you should set the theme using a post-process command in your image recipe or local.conf. Add this to your local.conf:

ROOTFS_POSTPROCESS_COMMAND += "set_plymouth_theme;"

set_plymouth_theme() {
    plymouth-set-default-theme custom --rebuild-initrd
}

(2)

Alternative Approach Using Toradex Example

The official Toradex documentation (1) shows a simpler approach using the existing spinner theme structure:

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

SRC_URI += " \
    file://frame01.png \
    file://spinner.plymouth \
"

EXTRA_OECONF += "--with-runtimedir=/run"

do_install:append () {
    install -m 0644 ${WORKDIR}/frame01.png ${D}${datadir}/plymouth/themes/spinner/watermark.png
    install -m 0644 ${WORKDIR}/spinner.plymouth ${D}${datadir}/plymouth/themes/spinner/spinner.plymouth
}

(1)

This approach modifies the existing spinner theme rather than creating a completely new theme, which can be more reliable.

Build Process

Make sure you’re building with the correct image recipe (3):

$ bitbake tdx-reference-multimedia-image

(3)

Verification Steps

After deployment, verify:

  1. Your theme files are present in /usr/share/plymouth/themes/custom/
  2. Check the active theme: plymouth-set-default-theme --list
  3. Ensure Plymouth is enabled in the boot process

The black screen issue is likely due to the file path errors and the script typo preventing Plymouth from loading your custom theme properly.

Best regards, Toradex AI Assistant.

Hey, @simon3,

The AI suggestions look reasonable to me. I suggest trying to follow it and see if it solves the issue. Tell me if it the image still doesn’t show up.

Additionally, just to make sure, I assume you are building the Reference Multimedia image, is that right? If you built the Reference Minimal image, the splash screen won’t show up at all.

Best regards,

Hello,
Yes thanks to the AI suggestion it’s looking good on my side
It was probably a filename extension oversight on my part
Thank you
Simon

Hey, @simon3,

I’m glad you managed to solve the problem, let me know if you find any further issues. I’ll be marking the AI response as the solution.

Best regards,