[yocto] How to split rootfs image?

Andre McCurdy armccurdy at gmail.com
Mon Jul 16 17:56:11 PDT 2018


On Wed, Jul 11, 2018 at 12:16 PM, Lukasz Zemla
<Lukasz.Zemla at woodward.com> wrote:
> Dear All,
>
> Because of some formal reasons, we would like to split our rootfs image into
> 2 parts:
>
> 1. base system - to be reused between different project variants, typical
> rootfs content.
>
> 2. application/data - less critical application, configuration, data, logs.
>
> How to generate in Yocto application/data image(2)?
>
> It is about generation of empty image containing only requested packages,
> like Package-A, Package-B...
>
> We tried following:
>
> inherit image
>
> IMAGE_FEATURES = ""
>
> DISTRO_FEATURES = ""
>
> IMAGE_INSTALL = " \
>                Package-A \
>                Package-B \
>                "
>
> IMAGE_FSTYPES = "ubi tar.gz"
>
> But it produces classical rootfs image with (unwanted): bin, boot, etc,
> lib... We'd prefer to have it built in an efficient way, so we'd like to
> avoid generating full image and then removing files by hand in postprocess
> command.

Yes it's harder than you might expect to create an image which
contains only the specific packages you define, without any of their
normal dependencies.

If your goal is just to split a single rootfs into two image files
instead of one, then a possible approach could be to define your own
custom image type (ubisplit, or whatever) which separates the rootfs
into two temp directories and then creates separate image files for
each one.


More information about the yocto mailing list