在Yocto中访问initramfs-tools功能生成了initramfs映像

时间:2018-05-23 16:10:03

标签: linux-kernel init yocto boot initrd

我想加载一些内核模块,并在Plymouth发布之前激活framebuffer访问。这通常使用/etc/initramfs-tools提供的initramfs-tools目录来完成。但是,使用Yocto构建initramfs映像时,没有此类目录可用。这意味着无论initramfs-tools为加载模块和初始化帧缓冲区做什么,都必须在initramfs图像中手动完成,据我所知。

我想要完成的任务由https://github.com/notro/fbtft/wiki/Bootsplash中的notro精心解释 。我想做与以下相关的事情:

  • 访问/etc/initramfs-tools/scripts/init-top/spimodprobe模块。
  • 访问/etc/initramfs-tools/modules并列出要由模块守护程序启动的其他模块
  • 启用通过echo "export FRAMEBUFFER=/dev/fb1" | sudo tee /etc/initramfs-tools/conf.d/fb1
  • 完成的帧缓冲

通过我的研究,我发现initramfs-framework-base package具有initramfs启动使用的一些脚本。我认为这可能是一个很好的起点。但是,我不知道如何明确告诉initramfs做我想要完成的事情(上面的任务)。

注意:目前,我的initramfs图片由以下食谱生成:

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"

另请注意:我正在使用基于ARMv6的计算机和U-boot bootloader。编译原始initramfs-tools(最初为Debian开发)会生成0字节图像。我猜这是兼容性问题。因此,我将不得不求助于使用yocto的内部工具生成initramfs。

感谢任何帮助。提前谢谢。

0 个答案:

没有答案