Thanks all for the suggestions. It is not an issue with kernel modules as I have them in /lib/modules/...
I managed to get a bit further and create a working image that boots fully. However, the only way I could do this was to use the ROOTFS_POSTPROCESS_COMMAND to manually create a symlink for /init -> /lib/systemd/systemd What I don't understand is in a normal build (i.e core-image-minimal, etc.) I see /init get created automatically. I cannot find in what class or package this is actually done. My recipe below. Any thoughts? Thanks again! Matt. On Thu, Dec 7, 2023 at 5:37 PM Khem Raj <raj.k...@gmail.com> wrote: > On Thu, Dec 7, 2023 at 3:04 AM Ross Burton <ross.bur...@arm.com> wrote: > > > > On 6 Dec 2023, at 21:47, mattwood2000 via lists.yoctoproject.org > <mattwood2000=gmail....@lists.yoctoproject.org> wrote: > > > > > > Hi, > > > > > > I'm trying to create a custom initramfs to handle some things before > switching root to my actual filesystem. I followed the docs and have been > able to use INITRAMFS_IMAGE = "custom-image" and INITRAMFS_IMAGE_BUNDLE = > "1" to generate a zImage for my ARM platform. > > > > > > The custom-image.bb recipe is based on the > core-image-minimal-initramfs recipe and is in a meta-layer that has another > image recipe for the actual eMMC filesystem image. Both the eMMC image and > initramfs bundle are created. > > > > > > In custom-image.bb, PACKAGE_INSTALL includes INITRAMFS_SCRIPTS which > seem to be geared towards live-image things but that's not what I want. > > > > > > The image boots but hangs waiting for removable media. I figured out > that /init is not pointing to systemd but the live-image script from > recipes-core/initrdscripts. > > > > The problem is most likely that your kernel is missing eMMC drivers. > They’re most likely built as kernel modules, but you didn’t install the > modules into the initramfs. One easy fix is to just add kernel-modules to > your initramfs. > > Right, this is how we tame bbb to include some USB drivers into kernel > proper so that we can read the USB stick in initramfs > > SUMMARY = "initramfs image" LICENSE = "MIT" PACKAGE_INSTALL = " \ base-files \ base-passwd \ systemd \ ${ROOTFS_BOOTSTRAP_INSTALL} \ " IMAGE_FEATURES = "debug-tweaks" IMAGE_LINGUAS = "" PACKAGE_EXCLUDE = "kernel-image-*" IMAGE_FSTYPES = "${INITRAMFS_FSTYPES}" IMAGE_NAME_SUFFIX ?= "" IMAGE_ROOTFS_SIZE = "8192" IMAGE_ROOTFS_EXTRA_SPACE = "0" ROOTFS_PREPROCESS_COMMAND += "install_init; " install_init () { ln -sr ${IMAGE_ROOTFS}/lib/systemd/systemd ${IMAGE_ROOTFS}/init } inherit core-image > > https://github.com/YoeDistro/yoe-distro/blob/master/sources/meta-yoe/dynamic-layers/meta-ti/recipes-kernel/linux/files/updater.cfg > > > > > I do have some tweaks to the initramfs images to post, but they’re not > quite ready yet. You can see the WIP in poky-contrib:ross/genericarm64. > > > > Ross > > > > >
-=-=-=-=-=-=-=-=-=-=-=- Links: You receive all messages sent to this group. View/Reply Online (#61843): https://lists.yoctoproject.org/g/yocto/message/61843 Mute This Topic: https://lists.yoctoproject.org/mt/103022933/21656 Group Owner: yocto+ow...@lists.yoctoproject.org Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-