[oe] copy combined kernel+initramfs into main image

André Draszik git at andred.net
Wed Nov 9 17:35:51 UTC 2016


On Wed, 2016-11-09 at 17:30 +0000, André Draszik wrote:
> Hi,
> 
> I have a need to copy my bundled initramfs+kernel image into the main
> filesystem image. So far I have failed miserably...
> 
> I have tried to achieve this by:
> 1) adding a new kernel PACKAGE and adding the bundled image file to it
> 2) moving the 'bundle_initramfs' task in kernel.bbclass before do_package
> (rather than before do_deploy)
> 
> 1) on its own is not helpful, because do_bundle_initramfs hasn't run yet,
> i.e. the resulting package will be empty.
> 2) causes a recursive dependency, basically
> kernel:do_bundle_initramfs -> initramfs:do_image_complete ->
> initramfs:do_rootfs -> kernel:do_packagedata
> I think because of do_rootfs[recrdeptask] += "do_packagedata" in
> image.bbclass:
> 
> 
> Now I can't figure out why the kernel's do_packagedata ends up in my
> chain,
> I am not adding any kernel modules to the initramfs image.

Just one more - I did see KERNELDEPMODDEPEND in image.bbclass and am
clearing it in my initramfs recipe, but that alone doesn't seem to be
enough.


> Is there a way to break this loop? Or explicitly remove the
> kernel:do_packagedata from my initramfs recrdeptasks? So that I can end up
> with a non-empty a kernel-image-bundled-initramfs PACKAGE?
> 
> 
> More generally, is there a way to achieve what I want? Maybe in a
> different
> way?
> 
> 
> 
> Thanks.
> Andre'
> 
> 
> PS: I could probably do a two-staged approach, build the bundled initramfs
> first, and then manually copy it from DEPLOYDIR during rootfs creation
> time
> of the main image. But that seems cumbersome and I was hoping for a neater
> solution :-)
> 



More information about the Openembedded-devel mailing list