[OE-core] Contents of non-rootfs partitions
Patrick Ohly
patrick.ohly at intel.com
Tue Nov 22 11:10:04 UTC 2016
On Tue, 2016-11-22 at 10:05 +0100, Kristian Amlie wrote:
> Hey
>
> In Mender we are using a dual rootfs partition layout (A/B layout)
> with a persistent data partition on the side. We're using wic to do
> the actual image building.
>
> However, putting files into this data partition is not a
> straightforward operation ATM. All recipes in OE put files into the
> rootfs only, and we'd like there to be a way to specify that files
> should go into the data partition.
>
> I haven't seen any straightforward way to do this in OE. Some
> suggestions for how it could be done:
>
> * A "DATA_FILES" variable (like "IMAGE_BOOT_FILES"), where you can
> list files you'd like to be included. This is very straightforward,
> but has the disadvantage of being a bit hairy when paths are involved,
> and it doesn't allow for much logic.
>
> * Keep a special "data" directory, something similar to sysroot, where
> recipes could install files into in order to have it included on the
> data partition. We could potentially have a bbclass for use in recipes
> to make this more streamlined.
>
> * Have a special recipe that users can bbappend, which specifically
> install to the data partition (this might also need a "data"
> directory, like above).
All of these introduce some special mechanism. Let me propose something
that might integrate better with the existing tooling:
The "rootfs" directory gets redefined as representing the entire virtual
file system. When creating a disk image, it gets split up into different
partitions based on the image configuration.
For example, the /home or /data directories in the rootfs could hold the
content that in some image configurations goes into separate partitions.
The advantage of this approach is that the tooling for staging content
for image creation does not need to be changed. The same staged content
then can be used to create different images, potentially even using
different partition layouts.
To implement this approach with wic, wic needs to be taught how to
exclude directories from the main rootfs. Ideally, the mkfs.* tools
should also support that without having to make an intermediate copy of
the files for a certain partition, but initially wic could create
temporary directory trees.
--
Best Regards, Patrick Ohly
The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.
More information about the Openembedded-core
mailing list