[OE-core] Best practices: Multiple images on one partition.

Ricardo Ribalda Delgado ricardo.ribalda at gmail.com
Wed Jan 15 13:04:32 UTC 2020


Hello

I am trying to figure out the best way to achieve this. I have a
system with a host and a target. The target netboots form the host and
have a different package architecture.

Usually I was solving this with one partition per image/machine,
combined using a .wks file like:

part /export --source rootfs --rootfs-dir=target-image  --fstype=ext4
--label export --align 1024 --use-uuid --fsoptions defaults,ro
--extra-space 400M
part / --source rootfs --fstype=ext4 --label rootfs --align 1024
--use-uuid --fsoptions defaults,ro --extra-space 400M

and then calling wic file after generating both images. ("wic create....")

This works fine, but now I need to combine both partitions into one.
The reason is that the partition needs to play nice with the current
OTA upgrade system.

What would be the best way to do this?

1) Implement a new wic plugin, called something like muli-rootfs,
where I can specify multiple rootfs and in which directory to unpack
them

2) Implement a .bb file that combines the two images in one.

do_install() {
    tar -mzxf $HOST/host-image.tar.gz  -C ${D}/
    tar -mzxf $HOST/target-image.tar.gz  -C ${D}/export
}

3) Another way that I am not aware :)

Thanks!
--
Ricardo Ribalda


More information about the Openembedded-core mailing list