I would like to load a few kernel modules, and activate framebuffer access prior to Plymouth launch. This is normally done using /etc/initramfs-tools directory provided with the initramfs-tools. However, when building an initramfs image with Yocto, no such directory is available. This means that whatever initramfs-tools does for loading modules and initializing framebuffer, has to be done manually in the initramfs image as far as I could understand.

The tasks I want to accomplish is very delicately explained by notro in https://github.com/notro/fbtft/wiki/Bootsplash . I'd like to do the equivalent of what's done below:

  • Access to /etc/initramfs-tools/scripts/init-top/spi and modprobe a module.
  • Access to /etc/initramfs-tools/modules and list further modules to be launched by modules daemon
  • Enable framebuffer which is done via echo "export FRAMEBUFFER=/dev/fb1" | sudo tee /etc/initramfs-tools/conf.d/fb1

With my research, I could find initramfs-framework-base package which features some scripts that initramfs boot uses. I think this might be a good starting point. However, I do not know how to explicitly tell initramfs to do what I want to accomplish (tasks above).

Note: Currently, my initramfs image is generated by the following recipe:

include recipes-core/images/rpi-basic-image.bb
    base-passwd \
    busybox \
    initramfs-live-boot \
    initramfs-framework-base \
    udev \

                  plymouth plymouth-set-default-theme  \

# Do not pollute the initrd image with rootfs features
SPLASH = "plymouth"



CMDLINE_append = " quiet splash nomodeset plymouth.ignore-serial-consoles consoleblank=0"

BAD_RECOMMENDATIONS += "busybox-syslog"

Also Note: I'm using an ARMv6-based machine with U-boot bootloader. Compiling the original initramfs-tools (that is originally developed for Debian) generates 0 byte images. I'm guessing this is an issue with its compatibility. So I'll have to resort to generating initramfs with yocto's internal tools.

Any help is appreciated. Thanks in advance.

  • If you dont find a yocto solution, you might be able to just concatenate a 2nd cpio of the wanted files to the image, as mentioned in this question. – meuh May 23 '18 at 18:24
  • Did you figure this out? I am trying to do the exact same thing. Thank you. – PhilBot Jul 17 '18 at 1:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.