[yocto] How to require image recipe from another layer?

Paul Eggleton paul.eggleton at linux.intel.com
Thu Dec 29 10:23:59 PST 2011


On Thursday 29 December 2011 13:14:20 autif khan wrote:
> The following recipe does not actually put helloworld in the image -
> it does not even build it.
> 
> require recipes-sato/images/core-image-sato.bb
> IMAGE_FEATURES += "helloworld"
> 
> The following one does.
> 
> require recipes-sato/images/core-image-sato.bb
> IMAGE_INSTALL += "helloworld"
> 
> I am guessing that if I have several recipes in my layer (say) hw1,
> hw2, hw3 etc, I would have to use the following recipe.
> 
> require recipes-sato/images/core-image-sato.bb
> IMAGE_INSTALL += "hw1 hw2 hw3 etc"
> 
> However, I am sure there is a way to ties these up with
> "IMAGE_FEATURE" variable.

IMAGE_FEATURES do not refer to individual packages, they are specially defined 
package groups (or behaviours in the case of e.g. package-management). If you 
have a look at classes/core-image.bbclass and classes/image.bbclass you can 
see how the package groups are set up (PACKAGE_GROUP_featurename). As you 
found, at the moment there is nothing checking that features in IMAGE_FEATURES 
are valid, thus as there is no PACKAGE_GROUP_helloworld and nothing checking 
for "helloworld" in IMAGE_FEATURES, it does nothing.

However, if all you want to do is add a few specific packages it's just fine to 
add their names to the end of IMAGE_INSTALL - IMAGE_FEATURES might be 
overkill.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre



More information about the yocto mailing list