trying to use ext4 rootfs image in a wic image (dependency issues)


Theodore A. Roth
 

Hello,

I'm trying to create a wic image that contains an ext4 partition image
file in the /boot partition . I've set the following:

IMAGE_FSTYPES = "tar.xz ext4 wic wic.bmap"
IMAGE_BOOT_FILES += "${IMAGE_BASENAME}-${MACHINE}.ext4;rootfs.ext4"

I'm using "beaglebone-yocto" for MACHINE and the above overrides what
is set in the "beaglebone-yocto.conf" machine configuration.

When I run "bitbake myimage", the do_image_wic task fails to find the
""${IMAGE_BASENAME}-${MACHINE}.ext4" because the do_image_wic task is
run before the do_image_complete task copies the files from DEPLOYDIR
into DEPLOY_DIR_IMAGE. Since the do_image_wic task is looking in
DEPLOY_DIR_IMAGE and is run before the do_image_complete task due to
dependencies, the creation of the wic image fails.

I tried to work around this with the following:

do_image_wic[recrdeptask] += "do_image_ext4"

but I quickly discovered that does not work due do_image_complete
copying of files (as discussed above).

If I remove "wic*" from IMAGE_FSTYPES, build myimage and then run wic
manually, all is good, but I lose the automating of wic image creation
when building the image recipe and also lose the ability to have other
image recipes inherit (via "include") and extend the base image (thus
inheriting the wic creation rules).

The end goal is to have an initramfs which loopback mounts the ext4
rootfs partition readonly from the /boot partition.

Any suggestions on how to get do_image_ext4 generated files available
to do_image_wic?

Ted Roth

Join yocto@lists.yoctoproject.org to automatically receive all group messages.