Splash screen and usb mount problems when creating new image with Yocto for Apalis imx6

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:


Hello Tarik,

Let’s address your two main issues: the Plymouth splash screen not showing, and USB auto-mount not working as expected. Below are targeted solutions and points to check for both based on your setup and the latest Toradex guidelines.


1. Plymouth Splash Screen Not Displaying

For the Plymouth splash screen to work on your Apalis iMX6 (with X11 and systemd), please review these key steps:

a) Ensure Plymouth is Included in the Image

You need to explicitly add Plymouth to your image recipe. In your local.conf or directly in your image .bb file, add:

CORE_IMAGE_EXTRA_INSTALL += "plymouth"

Reference:

b) Set Up a Custom Plymouth Theme

  • Place your custom images (e.g., torizonlogo-white.png) and theme files (e.g., spinner.plymouth) under your custom Yocto layer in the directory (usually recipes-graphics/plymouth/files/).

  • Add a .bbappend for Plymouth with appropriate file installation, for example:

    FILESEXTRAPATHS:prepend := "${THISDIR}/files:"
    SRC_URI += " \
        file://torizonlogo-white.png \
        file://spinner.plymouth \
    "
    
    do_install:append () {
        install -m 0644 ${WORKDIR}/torizonlogo-white.png ${D}${datadir}/plymouth/themes/spinner/watermark.png
        install -m 0644 ${WORKDIR}/spinner.plymouth ${D}${datadir}/plymouth/themes/spinner/spinner.plymouth
    }
    

c) Verify Installation

  • After building, verify Plymouth is correctly included:

    bitbake -e <your-image-name> | grep plymouth
    
  • Make sure the theme files are placed correctly in the build output before flashing to the board.

d) Check Kernel Command Line

  • On many platforms, Plymouth expects a framebuffer to be enabled. Confirm your kernel command line (in U-Boot, check cat /proc/cmdline) includes the right framebuffer (e.g., video=mxcfb0:dev=hdmi,1280x720M@60,bpp=32 or adjusted for your display).
  • If needed, adjust uEnv.txt or U-Boot environment to match your display.
  • Plymouth may require splash to be present as a boot argument.

More details:

e) Enable Plymouth Service

  • Make sure plymouth-start.service is enabled and not masked:
    systemctl status plymouth-start.service
    

2. USB Auto-Mount Not Working

Your approach using a udev script is generally correct, but there are some common causes for failure in auto-mount. Here are improvement tips:

a) Directory Creation

Make sure /media always exists at boot (you’ve added this via create_media_dir, which should suffice).

  • Check after boot:
    ls -ld /media
    

b) Udev Rule Details

  • Your script needs to be invoked properly from a udev rule. Make sure you have, for example, a rule like:

    ACTION=="add|remove", KERNEL=="sd[a-z][0-9]", RUN+="/usr/local/bin/mount.sh"
    

    (Adjust path as needed for your Yocto install.)

  • Permissions: Your script will run as root, but environmental variables (like $ACTION and $DEVNAME) must be provided by udev. Double check your rule.

Reference discussion and examples:

c) Ensure All Dependencies Are Present

  • Confirm file system tools (ntfs-3g, exfat-utils, dosfstools, etc.) are installed, which your image appears to provide.

d) Debugging

  • Log output is directed to /tmp/mount.sh.log. Check this file immediately after you plug in a USB stick—look for mount failures or missing variables.
  • Also check dmesg and journalctl for other errors.

e) Udisks2 (Optional)

If you install and enable udisks2, it can handle auto-mounting for you, especially when using a desktop-style environment, though you can stick with your custom script if you prefer more control.

Example Reference:


Summary of Next Steps:

  1. Confirm Plymouth and its services are included and enabled; adjust U-Boot/cmdline as needed.
  2. Double check your udev rule, the presence of /media, and examine your log file for any error details the custom script outputs.
  3. Reboot and observe kernel and application logs for both issues.

If you share the output of your /tmp/mount.sh.log when you insert/remove a USB stick, or the logs from systemctl status plymouth-start.service, I can provide more tailored troubleshooting.

Best regards,
Toradex AI Assistant.