[OE-core] Solving a circular dependency issue between the main image and initramfs

Richard Purdie richard.purdie at linuxfoundation.org
Mon Mar 16 11:01:46 UTC 2020


On Mon, 2020-03-16 at 11:48 +0100, Bartosz Golaszewski wrote:
> There has been no relevant feedback, but I've been experimenting with
> various things. I think that the best approach would be to make image
> artifacts installable into dependant recipes' sysroots (in
> /usr/share/images/). This way the initramfs recipe could calculate
> the
> dm-verity hashes from the resulting ext4 image before it gets
> deployed. We could also modify the kernel recipe to not fetch the
> initramfs image from the shared directory but instead have it
> installed in its sysroot.
> 
> For this I tried to re-enable the do_install task in image.bbclass.
> Unfortunately either I'm doing something wrong or standard tasks are
> subject to different rules when it comes to dependencies. I've been
> so
> far unable to make do_install depend on any image tasks (i.e. make
> do_install depend on do_image_ext4/wic etc.) no matter if I use
> do_install[depends] or addtask or appropriate helpers from python.
> Unfortunately I've been unable to find any information on that in the
> manual.
> 
> Is there some trick to changing the dependencies of standard tasks?

I don't know how exactly you're configuring the system but it should be
possible to have the main rootfs built first, adding in the signing,
then have the initramfs depend on that.

I can understand some circular dependencies could creep in as many
configurations have the initramfs as part of the main image but if you
don't configure that, you shouldn't see those dependencies.

I do fear your "re-enable" do_install route isn't going to get you
where you want to be.

Can you give a simple example of how you reproduce the circular
dependencies with standard poky or oe-core? That might let others give
comment more easily.

Cheers,

Richard



More information about the Openembedded-core mailing list