[yocto] Creating tailored image without standard rootfs files

Anders Darander anders at chargestorm.se
Thu Mar 21 12:08:20 PDT 2013


* Peter Bergin <Peter.Bergin at qmatic.com> [130321 16:10]:
> for my Yocto build I want to create two separate images as output because in my
> system I have two separate partitions. One partition containing the root file
> system and one partition containing configuration and application data. What I
> want is to create an image only containing data and applications from my
> recipes that I can apply to my data partition.

Intresting question. Maybe someone will have a simpler answer than me,
as I might have some uses for this also.

> I have tried this approach:
> my-data-image.bb
> -------------------------------------------------------------------
> IMAGE_INSTALL = "my-application1-data \
>                               my-application2-data"
> IMAGE_FEATURES = ""
> IMAGE_LINGUAS = ""
> IMAGE_TYPES = “tar.gz”

> inherit image
> ------------------------------------------------------------------

> When building this image the rootfs will contain /etc /dev /lib /var and init,
> directories that I do not want. I only want an output with my files from
> ‘my-application1-data’ and ‘my-application2-data’. Can anyone suggest me the
> best way forward?

I would probably approach this by creating a post-processing script,
that removes these automatically created directories. This is probably
the easiest and fastest way to fix this.

Another, slightly more interesting approach would be to patch up the
image creation, to allow for images like this by setting some extra flag
or EXTRA_IMAGE_FEATURE...

Cheers,
Anders

-- 
Anders Darander
ChargeStorm AB / eStorm AB



More information about the yocto mailing list