[OE-core] Create more than one image with WIC

Ed Bartosh ed.bartosh at linux.intel.com
Tue Mar 14 17:11:47 UTC 2017


On Mon, Mar 13, 2017 at 05:16:31PM +0100, Daniel Schultz wrote:
> 
> 
> Am 08.03.2017 um 14:43 schrieb Ed Bartosh:
> >On Wed, Mar 08, 2017 at 02:41:10PM +0100, Gary Thomas wrote:
> >>On 2017-03-08 11:57, Ed Bartosh wrote:
> >>>On Wed, Mar 08, 2017 at 10:44:21AM +0100, Daniel Schultz wrote:
> >>>>Hi,
> >>>>
> >>>>I created two kickstart files (am335x-sdimage.wks, am335x-emmc.wks)
> >>>>and added them to the local.conf.
> >>>>
> >>>>When I build the image only the first wks in WKS_FILES will be used
> >>>>by WIC and the second will be ignored. Is it possible to build two
> >>>>images in one build?
> >>>>
> >>>
> >>>I don't think it's possible to build more than one image for the same
> >>>type. wic is not an exception here.
> >>>
> >>>>Includes of the wks files in local.conf:
> >>>>WKS_FILES_ti33x = "am335x-sdimage.wks am335x-emmc.wks "
> >>>
> >>>WKS_FILES variable is to provide possible wks files to use. First one found will
> >>>be used to produce an image.
> >>
> >>Would it work to add/define this variable in the corresponding *image*.bb recipe
> >>rather than local.conf?
> >
> >Yes, it would if image recipe is unique, i.e. images of the same type
> >can be produced for different recipes.
> >
> But isn't wic different to other images like e.g. ext? I agree that
> there are other images that need only build once, but wic images can
> contain these and therefore act as a wrapper.
>
Makes sense.

> Do I have misunderstood the design of wic?
>
> I mean MMC and EMMC are very similar, but different in the
> bootloader and it would be a overhead to create an extra image for
> all EMMC images.

You don't need to create more than one rootfs with the same content. You
can refer to the same rootfs in multiple .wks files, but the recipes
have to be unique. In your example MMC and EMMC image recipes can create
directories for boot partition and their .wks files can use those
directories and common root directory produced by another recipe, e.g.
by core-image-minimal.

It's not a big deal to run wic sequentially to produce multiple images,
but it will create more problems than it solves I believe. It will be slower and
will make a mess in image naming in deploy directory.

--
Regards,
Ed



More information about the Openembedded-core mailing list