Re: [yocto] Problems adding initramfs when using FIT image
Felix Mellmann <[email protected]> Tue, 12 May 2026 12:03:05 +0200
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Hi Anders, unfortunately I can't answer why the fitImage with the bundled initramfs is not copied over to /boot but I want to tell, that "INITRAMFS_IMAGE_BUNDLE" has a bit misleading name. Actually enabling this option will generate the initramfs first and then hand it over to the compile task which then incorporates the initramfs into the kernel image itself. This is not what you want. You want a separate kernel image, device-tree and initramfs which then gets bundled to a fitImage. I think you should trace down which recipe installs the fitImage to /boot and then maybe you just need to adjust a variable or two to make the fitImage which bundles the initramfs to install to /boot instead of that which doesn't. Best regards, Felix On 5/11/26 11:48, Anders Montonen wrote: > Hi, > > I’m trying to add an initrd to our build and I’m running into some weird issues. We are using Scarthgap with our own BSP and application layers, but the issues are at least partially reproducible with just Poky. > > In my local.conf I have > INITRAMFS_IMAGE = “core-image-minimal-initramfs” > > Depending on the value of INITRAMFS_IMAGE_BUNDLE I get different results, neither of which seems correct, or what I expected. > > With INITRAMFS_IMAGE_BUNDLE = “1”, the /boot directory of the rootfs contains a dangling “fitImage” symlink, but the actual image is missing. > With INITRAMFS_IMAGE_BUNDLE = “0”, the /boot directory of the rootfs contains both the symlink and the image it is pointing at, but the image does not contain the initramfs image. If I look in the image deploy directory, a FIT image containing the initramfs has been created, but it does not get pulled into the image. > > To reproduce with Poky, clone and checkout the “Scarthgap” branch, add the following to the local.conf and then build core-image-minimal: > MACHINE = “genericarm64" > INITRAMFS_IMAGE = “core-image-minimal-initramfs” > KERNEL_CLASSES += “kernel-fitimage” > KERNEL_IMAGETYPE:genericarm64 = “fitImage” > INITRAMFS_IMAGE_BUNDLE = “0” > > The boot directory of the rootfs will contain a “fitImage-6.6.123-yocto-standard” FIT image, but when inspected with uboot-dumpimage -l, it contains only the kernel and configuration. The image deploy directory will also contain a “fitImage-core-image-minimal-initramfs-genericarm64–6.6.123+git0……” image that contains both the kernel and the initramfs. > > If you try to build Poky with INITRAMFS_IMAGE_BUNDLE = “1” this will fail in do_image_wic because the file “fitImage-initramfs-genericarm64.bin” can’t be found in the image deploy directory, which may be related. > > Is there something simple I’m missing here? > > Regards, > Anders > > -=-=-=-=-=-=-=-=-=-=-=- > Links: You receive all messages sent to this group. > View/Reply Online (#66524): https://lists.yoctoproject.org/g/yocto/message/66524 > Mute This Topic: https://lists.yoctoproject.org/mt/119253465/8090339 > Group Owner: [email protected] > Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub [[email protected]] > -=-=-=-=-=-=-=-=-=-=-=- >