agherzan / meta-raspberrypi

Yocto/OE BSP layer for the Raspberry Pi boards
https://www.yoctoproject.org/
MIT License
510 stars 398 forks source link

Enable plymouth support #1163

Open nandra opened 1 year ago

nandra commented 1 year ago

Description

Trying to enable initramfs with plymouth support so added initramfs image recipe (image-minimal-initramfs.bb) with content:

IMAGE_FSTYPES:rpi = " ${INITRAMFS_FSTYPES}"

PACKAGE_INSTALL = "${VIRTUAL-RUNTIME_base-utils}  ${ROOTFS_BOOTSTRAP_INSTALL} plymouth"

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

IMAGE_NAME_SUFFIX ?= ""
IMAGE_LINGUAS = ""

LICENSE = "MIT"

inherit core-image

IMAGE_ROOTFS_SIZE = "8192"
IMAGE_ROOTFS_EXTRA_SPACE = "0"

and added to local.conf:

    INITRAMFS_IMAGE = "image-minimal-initramfs"
    INITRAMFS_IMAGE_BUNDLE = "1"
    BOOT_SPACE = "1073741"
    INITRAMFS_MAXSIZE = "315400"
    IMAGE_FSTYPES:pn-${INITRAMFS_IMAGE} = "${INITRAMFS_FSTYPES}"

Seems documentation is misleading as it propose to also add to linux recipe:

do_configure:prepend() {
   kernel_configure_variable BLK_DEV_INITRD y
   kernel_configure_variable INITRAMFS_SOURCE ""
   kernel_configure_variable RD_GZIP y
}

but those options are obsolete IMO.

With above enabled I don't see that system boot to initramfs just directly to rootfs. Any ideas what I'm missing pls? Thanks.

agherzan commented 1 year ago

@nandra I can't see what is wrong at first sight, but I know that balena uses an initramfs so you could use their raspberrypi support layer as inspiration.