From 6103268a4fe7268079abe5f509a60a10e24b1f25 Mon Sep 17 00:00:00 2001 From: Scott Rifenbark Date: Fri, 23 Mar 2018 16:34:08 -0700 Subject: dev-manual: Updated the "Create Your Own Layer" section Updated the explanation of the layer.conf file. I am going to use this section as the definitive section that explains the layer.conf file. (From yocto-docs rev: 4c70c7467f0ca5cf2346ef8d10bde437b971d2d2) Signed-off-by: Scott Rifenbark Signed-off-by: Richard Purdie --- .../dev-manual/dev-manual-common-tasks.xml | 159 +++++++++------------ 1 file changed, 71 insertions(+), 88 deletions(-) (limited to 'documentation') diff --git a/documentation/dev-manual/dev-manual-common-tasks.xml b/documentation/dev-manual/dev-manual-common-tasks.xml index 31b46c4435..ccb902bef8 100644 --- a/documentation/dev-manual/dev-manual-common-tasks.xml +++ b/documentation/dev-manual/dev-manual-common-tasks.xml @@ -94,23 +94,23 @@ to several variables used in the configuration. - Create a Layer Configuration - File: - Inside your new layer folder, you need to create a - conf/layer.conf file. - It is easiest to take an existing layer configuration - file and copy that to your layer's - conf directory and then modify the - file as needed. - - The - meta-yocto-bsp/conf/layer.conf file - in the Yocto Project - Source Repositories - demonstrates the required syntax. - For your layer, you need to replace "yoctobsp" with the - root name of your layer: - + Create a Layer Configuration File: + Inside your new layer folder, you need to create a + conf/layer.conf file. + It is easiest to take an existing layer configuration + file and copy that to your layer's + conf directory and then modify the + file as needed. + + The + meta-yocto-bsp/conf/layer.conf file + in the Yocto Project + Source Repositories + demonstrates the required syntax. + For your layer, you need to replace "yoctobsp" with + a unique identifier for your layer (e.g. "machinexyz" + for a layer named "meta-machinexyz"): + # We have a conf and classes directory, add to BBPATH BBPATH .= ":${LAYERDIR}" @@ -123,93 +123,76 @@ BBFILE_PRIORITY_yoctobsp = "5" LAYERVERSION_yoctobsp = "4" LAYERSERIES_COMPAT_yoctobsp = "&DISTRO_NAME_NO_CAP;" - - - Here is an explanation of the example: + + Following is an explanation of the layer configuration + file: - The configuration and classes directory is - appended to - BBPATH. - - All non-distro layers are expected to - append the layer directory to - BBPATH. - On the other hand, distro layers, such as - meta-poky, can choose - to enforce their own precedence over - BBPATH. - For an example of that syntax, see the - meta-poky/conf/layer.conf - file for in the - Source Repositories. - + BBPATH: + Adds the layer's root directory to BitBake's + search path. + Through the use of the + BBPATH variable, BitBake + locates class files + (.bbclass), + configuration files, and files that are + included with include and + require statements. + For these cases, BitBake uses the first file + that matches the name found in + BBPATH. + This is similar to the way the + PATH variable is used for + binaries. + It is recommended, therefore, that you use + unique class and configuration filenames in + your custom layer. - The recipes for the layers are appended to - BBFILES. + BBFILES: + Defines the location for all recipes in the + layer. - The - BBFILE_COLLECTIONS - variable is appended with the layer's root name, - which is "yoctobsp" in this example. + BBFILE_COLLECTIONS: + Establishes the current layer through a + unique identifier that is used throughout the + OpenEmbedded build system to refer to the layer. + In this example, the identifier "yoctobsp" is + the representation for the container layer + named "meta-yocto-bsp". - The - BBFILE_PATTERN - variable is set to a regular expression and is - used to match files from - BBFILES into a particular - layer. - In this case, - LAYERDIR - is used to make - BBFILE_PATTERN match - within the layer's path. + BBFILE_PATTERN: + Expands immediately during parsing to + provide the directory of the layer. - The - BBFILE_PRIORITY - variable assigns a priority to the layer. - Applying priorities is useful in situations - where the same recipe might appear in multiple + BBFILE_PRIORITY: + Establishes a priority to use for + recipes in the layer when the OpenEmbedded build + finds recipes of the same name in different layers. - A priority allows you to choose the layer - that takes precedence. - The - LAYERDIR - variable expands to the directory of the - current layer + LAYERVERSION: + Establishes a version number for the layer. + You can use this version number to specify this + exact version of the layer as a dependency when + using the + LAYERDEPENDS + variable. - The - LAYERVERSION - variable optionally specifies the version of a - layer as a single number. + LAYERSERIES_COMPAT: + Lists the + Yocto Project + releases for which the current version is + compatible. + This variable is a good way to indicate how + up-to-date your particular layer is. - - The - LAYERSERIES_COMPAT - lists the Yocto Project releases for which the - layer is compatible. - - - - Through the use of the BBPATH - variable, BitBake locates class files - (.bbclass), - configuration files, and files that are included - with include and - require statements. - For these cases, BitBake uses the first file that - matches the name found in BBPATH. - This is similar to the way the PATH - variable is used for binaries. - It is recommended, therefore, that you use unique - class and configuration filenames in your custom layer. + Add Content: -- cgit v1.2.3-54-g00ecf