[yocto] Automatically include all recipes/packages in a custom layer

Paul Eggleton paul.eggleton at linux.intel.com
Sat Mar 14 05:09:40 PDT 2015


On Saturday 14 March 2015 17:12:11 Padam Jeet Singh wrote:
> > On 14-Mar-2015, at 5:05 pm, Paul Eggleton <paul.eggleton at linux.intel.com>
> > wrote:> 
> > On Saturday 14 March 2015 12:51:31 Padam Jeet Singh wrote:
> >> I am trying to build a custom layer on top of core-image-full-cmdline.
> >> Basically I did this:
> >> 
> >> 1. Created a new general layer using the yocto-layer command. This also
> >> generated a simple hello world recipe. 2. Added that layer in the
> >> conf/bblayers.conf BBLAYERS variable.
> >> 
> >> Then I do a bitbake -v core-image-full-cmdline, and I don’t see
> >> /usr/bin/helloworld in the final rootfs.
> >> 
> >> Then I edit the conf/local.conf and add the following:
> >> 
> >> IMAGE_INSTALL_append = " example”
> >> 
> >> and then I can see the helloworld in the rootfs.
> >> 
> >> Since I will be adding close to 50 recipes in this layer, isn’t there an
> >> option where all recipes in that layer are included by default? Even if I
> >> have to declare each recipe to be included, is there a place where I can
> >> define those in my own layer configuration (layer.conf) rather than
> >> local.conf?
> > 
> > Firstly, I'd recommend you create your own custom image recipe(s) rather
> > than adding packages via local.conf.
> 
> This is exactly what I am trying to avoid - it’s unmaintainable.
> 
> > Secondly, the way to handle bringing in a
> > large number of packages as a unit is to create a packagegroup recipe
> > within your custom layer to pull in all the packages you want installed,
> > and then you just need to add that packagegroup to your image.
> 
> This sounds good. Would I be referring to this group via the
> IMAGE_INSTALL_append = “ mygroup” ?

Yes, although if you were defining your own image recipe you wouldn't need to 
_append - you'd already be setting IMAGE_INSTALL outright to the desired list 
of packages.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list