Layers FAQ

Revision as of 10:24, 1 April 2013 by PaulEggleton (talk | contribs)
Jump to: navigation, search

General layer questions

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?


How do I make use of a layer?

Clone / extract it somewhere (typically next to or within your OE-Core base directory, but the exact location is not critical) 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. Additionally, note that some layer repositories contain multiple layers - in this case there will be subdirectories in the repository corresponding to each layer.

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/

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:


then your file must be placed in a directory named ${PN} - i.e. if your recipe file is called "" 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 bbappend each recipe that includes the inc file.

I've just created a new layer and would like to publish it for the community. What should I do?

There are a few important steps you should take in order to publish a layer for the community:

  1. Existing layers: Ideally, ensure your layer does not overlap with other layers. If there must be an overlap and it is not practical to resolve it with the maintainer of the existing layer(s), document what the overlap is and why it is there.
  2. Maintainer: If you are publishing the layer as a repository, ensure there is a commitment from at least one person to be the maintainer for the layer. The maintainer's role is to accept, review and (if satisfactory) merge patches from the community.
  3. README: Ensure the layer has a README text file in the root which describes briefly what the layer is for, how to use it (if there are any special instructions), the other layers it depends upon, who it is maintained by, and most importantly where and how people should submit patches for it.
  4. Publish: Publish the layer in a place where it can be easily accessed. and can provide hosting, otherwise it is common to host layers on sites such as github or gitorious.
  5. Index: Submit the layer to the OpenEmbedded layer index.
  6. Announcement: Send an announcement to both of the following mailing lists telling people about the new layer:

Layer index

How do I submit a new layer to the index?

Click on "Submit layer" at the right of the top bar of the page, fill in the fields and then click on Submit.

How can I edit the entry for my layer?

If you're already listed as one of the maintainers for the layer, you can create an account using the same email address as the maintainer entry, and once you log in you'll automatically be able to edit the entry (using the "Edit layer" button in the top right hand corner of the layer details page for the layer).

Alternatively if you're not able to do this, please send an email to with your request.

How do I choose the appropriate "layer type" for my layer?

  • Base: this is really only for oe-core and meta-oe, i.e. the base metadata for the build system.
  • Machine (BSP): if your layer primarily exists to add support for additional machine(s), use this type.
  • Software: if your layer primarily provides recipes for building additional software, use this type.
  • Distribution: if your layer primarily provides policy configuration for a distribution (conf/distro/*), which may include customised/additional recipes for the distribution, then choose this type.
  • Miscellaneous: if your layer doesn't fall into any other category you can choose this type; however there shouldn't be too many miscellaneous layers and it may be an indication that the purpose isn't well defined or that you should consider splitting the layer.

I can't find a recipe I'm looking for. What can I do?

Assuming you have searched the layer index and haven't found anything, there are a few different avenues you can explore:

  • You may be able to find an older version of the recipe in the OE-Classic git repository which you can bring up-to-date by following Migrating metadata to OE-Core.
  • Try the create-recipe tool (scripts/create-recipe). It's not particularly sophisticated but at the very least it can give you a skeleton you can start from.
  • Create your own recipe - it's usually not too difficult. See Adding a Package in the Yocto Project Development Manual for some instructions and examples. You may also find it useful to start by copying another recipe.
  • Ask the community on the mailing list if anyone has/is planning on writing the recipe.