Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Intramfs doesn't gets included (was trying to apply initramfs-module-overlayroot) #1403

Open
brian-geicp opened this issue Jan 13, 2025 · 0 comments

Comments

@brian-geicp
Copy link

Was trying to apply initramfs-module-overlayroot to overlay a partition over the root layer and my understanding is that this require initramfs to be enabled.

So thus I was trying to figure out how to get initramfs image by following the instructions in https://meta-raspberrypi.readthedocs.io/en/latest/extra-build-config.html#image-with-initramfs which said to put into local.conf this configuration.

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

Where the image bb script is based on ./layers/poky/meta/recipes-core/images/core-image-minimal-initramfs.bb but where INITRAMFS_SCRIPTS and PACKAGE_INSTALL is shrunk to:

INITRAMFS_SCRIPTS ?= "\
                      initramfs-framework-base \
                      initramfs-module-overlayroot \
                     "

PACKAGE_INSTALL = "${INITRAMFS_SCRIPTS}"

However while the intramfs cpio archive appears to be present ./build/tmp/deploy/images/test-app/core-image-test-app-initramfs-test-app.cpio.gz it doesn't seem to be present in the bootup log.

For context, this is my layer stackup so far:

BBLAYERS ?= " \
  ${TOPDIR}/../layers/poky/meta \
  ${TOPDIR}/../layers/poky/meta-poky \
  ${TOPDIR}/../layers/poky/meta-yocto-bsp \
  ${TOPDIR}/../layers/meta-openembedded/meta-oe \
  ${TOPDIR}/../layers/meta-openembedded/meta-networking \
  ${TOPDIR}/../layers/meta-openembedded/meta-filesystems \
  ${TOPDIR}/../layers/meta-openembedded/meta-python \
  ${TOPDIR}/../layers/meta-virtualization \
  ${TOPDIR}/../layers/meta-raspberrypi \
  ${TOPDIR}/../layers/meta-rauc \
  ${TOPDIR}/../layers/meta-rauc-raspberrypi \
  ${TOPDIR}/../layers/meta-application-test-layer \
  "

I added some echo to both init and overlay bash script to see if the initramfs is running the script, but did not see any presence.
I'm still relatively newish to yocto, so I'm not sure where to look in the log to see if copy_initramfs() in the kernel.bbclass is actually copying the initramfs image to ./usr but I can definitely not find the image when I ssh into the device and inspected the ./usr folder.

Maybe I'm missing something simple here, to which it might be a documentation issue. But in the meantime I hope this will still be helpful to track in case there is actually a bug in the bb script.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant