Before creating our own layer, it's always a good idea to check whether there is a similar one already available at the following website: http://layers.openembedded.org. If we cannot find a suitable layer for our needs, the next step is to create the directory. Usually, the layer name starts with meta-
, but this is not a technical restriction.
The layer configuration file is required in every layer, and is placed in <layer>/conf/layer.conf
; we can create it manually using any text editor, or populate it with a script provided in Poky, as shown in the following command:
$ ./poky/scripts/yocto-layer create newlayer
The output is shown in the following screenshot:
With the script, we are asked to enter the value for layer priority and answer other questions regarding the sample content that can be generated for the layer. We can use the default values, or enter a custom one. An example of a generated layer is shown in the following figure:
Important variables that may need...