Layers FAQ: Difference between revisions

From Openembedded.org
Jump to navigation Jump to search
(Initial layers FAQ)
 
(Add some more FAQs)
Line 26: Line 26:


  require recipes-graphics/xorg-driver/xorg-driver-input.inc
  require recipes-graphics/xorg-driver/xorg-driver-input.inc
== I've bbappended a recipe in my layer to replace a file with my own version but it's not being picked up - why not? ==
Assuming your bbappend is extending FILESEXTRAPATHS (which it must do), the probable cause is that the directory you have added to FILESEXTRAPATHS and the directory in which you have placed the file aren't the same. For example, if you have the following in your bbappend:
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"
then your file must be placed in a directory named ${PN} - i.e. if your recipe file is called "magicrecipe_1.0.bb then the directory would need to be named "magicrecipe". If you prefer, you can adjust the directory name added to FILESEXTRAPATHS as shown above to something else.
== I've added a layer to my bblayers.conf and now the system is building an older version of some recipe - why? ==
The added layer likely has a higher layer priority than the one that contains the existing newer recipe. You can use PREFERRED_VERSION_recipename in your distro or local configuration to override the default selection and select the newer recipe.
== Can I overlay/append an inc file from another layer in my layer? ==
No, you can't; inc files aren't handled in the same manner as .bb and .bbappend files. The best way to handle this is to append each recipe that includes the inc file.


[[Category:FAQ]]
[[Category:FAQ]]

Revision as of 00:07, 23 March 2013

What is a layer?

In OpenEmbedded, a layer is just a collection of recipes and/or configuration that can be used on top of OE-Core. Typically each layer is organised around a specific theme, e.g. adding recipes for building web browser software.

Where do I find existing layers?

See LayerIndex.

How do I make use of a layer?

Clone / extract it somewhere (typically next to or within your OE-Core base directory) and then add the full path to it to the value of BBLAYERS in your conf/bblayers.conf in your build directory. Note that some layers depend on other layers; it is recommended that you consult the README file within the layer if one is included.

How do I create a new layer?

See Creating a new Layer.

Is there any other documentation on layers?

Yes - the Yocto Project provides a set of manuals that cover layers in some detail.

How do I include an inc file from another layer?

You need to specify the path from the base of the other layer to where the inc file is located; e.g:

require recipes-graphics/xorg-driver/xorg-driver-input.inc

I've bbappended a recipe in my layer to replace a file with my own version but it's not being picked up - why not?

Assuming your bbappend is extending FILESEXTRAPATHS (which it must do), the probable cause is that the directory you have added to FILESEXTRAPATHS and the directory in which you have placed the file aren't the same. For example, if you have the following in your bbappend:

FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

then your file must be placed in a directory named ${PN} - i.e. if your recipe file is called "magicrecipe_1.0.bb then the directory would need to be named "magicrecipe". If you prefer, you can adjust the directory name added to FILESEXTRAPATHS as shown above to something else.

I've added a layer to my bblayers.conf and now the system is building an older version of some recipe - why?

The added layer likely has a higher layer priority than the one that contains the existing newer recipe. You can use PREFERRED_VERSION_recipename in your distro or local configuration to override the default selection and select the newer recipe.

Can I overlay/append an inc file from another layer in my layer?

No, you can't; inc files aren't handled in the same manner as .bb and .bbappend files. The best way to handle this is to append each recipe that includes the inc file.