Book Image

Embedded Linux Development using Yocto Projects - Second Edition

By : Otavio Salvador, Daiane Angolini
Book Image

Embedded Linux Development using Yocto Projects - Second Edition

By: Otavio Salvador, Daiane Angolini

Overview of this book

Yocto Project is turning out to be the best integration framework for creating reliable embedded Linux projects. It has the edge over other frameworks because of its features such as less development time and improved reliability and robustness. Embedded Linux Development using Yocto Project starts with an in-depth explanation of all Yocto Project tools, to help you perform different Linux-based tasks. The book then moves on to in-depth explanations of Poky and BitBake. It also includes some practical use cases for building a Linux subsystem project using Yocto Project tools available for embedded Linux. The book also covers topics such as SDK, recipetool, and others. By the end of the book, you will have learned how to generate and run an image for real hardware boards and will have gained hands-on experience at building efficient Linux systems using Yocto Project.
Table of Contents (22 chapters)
Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
7
Diving into BitBake Metadata
Index

Making a new layer


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...