Using dracut to create an initramfs image via bitbake
Hello OpenEmbedded developers,
I am curious if there's been discussion on trying to use dracut to build an initramfs image via bitbake. To be clear, I mean running dracut on the build host machine from a bitbake recipe, and having this dracut use files from the target image rootfs to build the initramfs.
Right now in meta-openembedded/meta-initramfs/recipes-devtools it looks like there's a dracut recipe to build dracut for the target arch, but no native dracut recipe. So with the current dracut recipe, this dracut can only be used from an architecture matching the target arch. This is not cross-compatible.
There has been a recent improvement in dracut to enable a native dracut to work with cross-compiled binaries. See the merged patch that should go into the next major dracut version 107 which replaces dracut's ldd usage - Parse ELF .note.dlopen entries for dependencies, replace ldd for better cross support by chewi · Pull Request #1260 · dracut-ng/dracut-ng · GitHub ( https://github.com/dracut-ng/dracut-ng/pull/1260 )
If there's no active development on using the latest dracut to build an initramfs, I'd like to work on it. Specifically I want to create a dracut native recipe and a dracut initramfs test image that uses the native dracut and a machine image's rootfs to create an initramfs. I understand this work would be dependent on a newer dracut that's not released yet.
What would be the testing expectations that I should run for my patches? Run testimage, as documented in the following? 4 Contributing Changes to a Component — The Yocto Project ® 5.2.999 documentation ( https://docs.yoctoproject.org/contributor-guide/submit-changes.html#test-your-changes )
Thank you,
Eric
As chance would have it, there was a recent discussion:
https://lists.openembedded.org/g/openembedded-architecture/topic/rfc_on_target_initramfs/113349284
Alex
Quoted 24 lines · eric.smith via lists.openembedded.org
Hello OpenEmbedded developers,
I am curious if there's been discussion on trying to use dracut to build an initramfs image via bitbake. To be clear, I mean running dracut on the build host machine from a bitbake recipe, and having this dracut use files from the target image rootfs to build the initramfs.
Right now in meta-openembedded/meta-initramfs/recipes-devtools it looks like there's a dracut recipe to build dracut for the target arch, but no native dracut recipe. So with the current dracut recipe, this dracut can only be used from an architecture matching the target arch. This is not cross-compatible.
There has been a recent improvement in dracut to enable a native dracut to work with cross-compiled binaries. See the merged patch that should go into the next major dracut version 107 which replaces dracut's ldd usage - Parse ELF .note.dlopen entries for dependencies, replace ldd for better cross support by chewi · Pull Request #1260 · dracut-ng/dracut-ng · GitHub
If there's no active development on using the latest dracut to build an initramfs, I'd like to work on it. Specifically I want to create a dracut native recipe and a dracut initramfs test image that uses the native dracut and a machine image's rootfs to create an initramfs. I understand this work would be dependent on a newer dracut that's not released yet.
What would be the testing expectations that I should run for my patches? Run testimage, as documented in the following? 4 Contributing Changes to a Component — The Yocto Project ® 5.2.999 documentation
Thank you,
Eric-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#117880): https://lists.openembedded.org/g/openembedded-devel/message/117880
Mute This Topic: https://lists.openembedded.org/mt/113581176/1686489
Group Owner: [email protected]
Unsubscribe: https://lists.openembedded.org/g/openembedded-devel/unsub [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-