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
andmodprobe
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
BASEPACKS = " \
base-passwd \
busybox \
initramfs-live-boot \
initramfs-framework-base \
udev \
${ROOTFS_BOOTSTRAP_INSTALL} \
"
IMAGE_INSTALL = " ${BASEPACKS} \
plymouth plymouth-set-default-theme \
"
# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES = "splash"
SPLASH = "plymouth"
IMAGE_LINGUAS = ""
LICENSE = "MIT"
IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}"
IMAGE_ROOTFS_SIZE = "8192"
IMAGE_OVERHEAD_FACTOR = "1.0"
IMAGE_ROOTFS_EXTRA_SPACE = "0"
IMAGE_ROOTFS_MAXSIZE = "12288"
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.