Including initramfs to build

i am trying to include a minimal initramfs to my yocto image so it handles the task of showing olylouth boot animation here’s what i did already
i could generate a

now my problem is how to include it in my image how to let the device boot to this bundled kernel-initramfs image

also can you please tell me how to include plymouth in initramfs

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello there!

To include a minimal initramfs in your Yocto image and ensure it handles the boot animation using Plymouth, you can follow these steps:

  1. Create the Initramfs Image: First, ensure you have created your initramfs image. This typically involves using a tool like mkinitramfs or dracut to generate an initramfs that includes the necessary binaries and scripts for your boot animation.

  2. Modify Yocto Configuration: In your Yocto build environment, modify the configuration to include your initramfs. Set the INITRAMFS_IMAGE variable in your local.conf or a custom layer, like this:

    INITRAMFS_IMAGE = "your-initramfs-image-name"
    INITRAMFS_IMAGE_BUNDLE = "1"
    

    The INITRAMFS_IMAGE_BUNDLE variable ensures that the initramfs is bundled with the kernel.

  3. Include Plymouth in Initramfs: To include Plymouth in your initramfs, add it to the IMAGE_INSTALL variable in your initramfs recipe:

    IMAGE_INSTALL += "plymouth"
    

    Ensure Plymouth is configured to start during the initramfs execution. This might involve creating or modifying init scripts within the initramfs to start Plymouth early in the boot process.

  4. Build the Image: Once your configuration is set, build your Yocto image. This will compile the kernel with the bundled initramfs containing Plymouth.

  5. Deploy and Test: Deploy the built image to your Toradex device. Upon booting, the device should use the initramfs to display the Plymouth boot animation.

By following these steps, you should be able to integrate a minimal initramfs with Plymouth into your Yocto image, allowing for a custom boot animation on your Toradex hardware. If you encounter specific issues during this process, ensure that all dependencies for Plymouth are correctly included and that your initramfs scripts are properly configured to start Plymouth at the right time.

Best regards,
Toradex AI Assistant

Please, also check if these links can help you solve your problem:

https://community.nxp.com/t5/i-MX-Processors/Yocto-initramfs/m-p/382738

https://community.nxp.com/t5/i-MX-Processors/plymouth-dracut-and-i-mx6/m-p/761917

How to get bundled initramfs installed in my-image-apalis-imx6.bootfs.tar.xz.

Hi @rania !

As previously shared, you can check Torizon OS’s layers for an example on how to handle plymouth on initramfs.

Best regards,