[yocto] Can wic split rootfs files across partitions?

Ed Bartosh ed.bartosh at linux.intel.com
Thu Mar 31 23:19:30 PDT 2016


On Wed, Mar 30, 2016 at 11:48:21AM -0700, Karl Voelker wrote:
> I am trying to build a multi-partition image with wic, with separate
> partitions for / and /var. So, the / partition should get all the files
> except those under /var, and the /var partition should get the files
> under /var.
> 
> I thought this was possible because of the suggestion in the docs that
> the mntpoint arg of a "part" command could be /usr or /home (see
> http://www.yoctoproject.org/docs/2.0/dev-manual/dev-manual.html#command-part-or-partition).
>
> However, after trying a few different things in my wks file, and looking
> through a lot of the wic source code, I am starting to wonder if this
> kind of thing is not actually supported. If it is supported, is there an
> example somewhere? None of the examples in scripts/lib/wic/canned-wks
> appear to cover this situation.
> 

I'm afraid it's not possible. Wic takes rootfs directories and puts them
to partitions. It doesn't split subdirectories to different partitions
and in my opinion it shouldn't. It's a job of build recipe to prepare
rootfs directories.

Regarding documentation. /usr and /home are mentioned there just as
examples of mount points. If you have rootfs directory to put into /usr
you can put /usr to .wks file and wic will put content of your rootfs
into separate partition and add one line to fstab to mount it to /usr.

I think it's possible to write source plugin to take subdirectory
instead of whole rootfs directory and put it into partition, but I'd
not suggest this. It's much more simpler to create or modify build
recipes to prepare one rootfs directory per partition.

--
Regards,
Ed



More information about the yocto mailing list