Book Image

Embedded Linux Development with Yocto Project

Book Image

Embedded Linux Development with Yocto Project

Overview of this book

Table of Contents (22 chapters)
Embedded Linux Development with Yocto Project
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
References
Index

Making a new layer


Before creating our own layer, it's always a good idea to check if there is a similar one already available in the OpenEmbedded metadata index (http://layers.openembedded.org). If we cannot find any 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...