On Wed, Nov 23, 2016 at 9:40 AM, Enrico Joerns <e...@pengutronix.de> wrote: > On 11/22/2016 12:54 PM, Kristian Amlie wrote: >> >> On 22/11/16 12:10, Patrick Ohly wrote: >>>> >>>> ... >>> >>> >>> 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. >> >> >> That's a very good idea. I think it beats all of my suggestions! > > > I totally agree with this solution, because it is the same approach we are > already using for several years. > > Instead of wic we are using the genimage tool > (http://public.pengutronix.de/software/genimage/) together with a Yocto > class for easing image creation, but its pretty much the same concerning its > base purpose. > > We called the option to split up 'mountpoint' while assuming that the > splitted partition will be mounted to the same location in the file system > it was taken from. > > An example configuration would look like this (stripped down to the > essential parts): > > image my-disk-image { > [...] > partition root { > image = "rootfs.ext4" > [...] > } > > partition home { > image = "home.ext4" > [...] > } > } > > image rootfs.ext4 { > [...] > mountpoint = "/" > } > > image home.ext4 { > [...] > mountpoint = "/home" > } > > Maybe a similar approach could be used in wic, too.
I went through the README from genimage repo https://git.pengutronix.de/cgit/genimage/tree/README. Definitely looks interesting and covers storage medias that are not supported by wic right now. The split option does not seem to be documented though. If I understood you correctly, the partition is seeded with data from location specified by `mountpoint` inside IMAGE_ROOTFS. Is that correct? I see there's a large overlap in functionality with wic (at least for block devices), so perhaps the best way would be introduce genimage as another IMAGE_CMD. I've quickly checked at https://layers.openembedded.org and there are no recipes for genimage/libconfuse listed there. Do happen to have done integration with OE in some private repo already? Would it be possible for you to post the relevant patches? -- Maciej Borzecki RnDity -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core