How to do it...

A new software layer can be created in the same way we did for a BSP layer in the previous chapter. We can, for example, create a new meta-custom layer using the yocto-layer command as we learned in the Creating a custom BSP layer recipe in Chapter 2, The BSP Layer. From the sources directory, execute the following command:

$ yocto-layer create custom

As already mentioned, the yocto-layer tool will add the meta prefix to the layer.

Don't forget to add the layer to your project's conf/bblayers.conf file and to your template's conf directory to make it available for all new projects.

The default conf/layer.conf configuration file is as follows:

# We have a conf and classes directory, add to BBPATH 
BBPATH .= ":${LAYERDIR}" 
 
# We have recipes-* directories, add to BBFILES 
BBFILES += "${LAYERDIR}/recipes-*/*/*.bb   
        ${LAYERDIR}/recipes-*/*/*.bbappend" 
 
BBFILE_COLLECTIONS += "custom" 
BBFILE_PATTERN_custom = "^${LAYERDIR}/" 
BBFILE_PRIORITY_custom = "6" 

We discussed all the relevant variables in this snippet in the Creating a custom BSP layer recipe in Chapter 2, The BSP Layer.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset