Search icon
Arrow left icon
All Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Newsletters
Free Learning
Arrow right icon
Embedded Linux Development using Yocto Projects - Second Edition

You're reading from  Embedded Linux Development using Yocto Projects - Second Edition

Product type Book
Published in Nov 2017
Publisher
ISBN-13 9781788470469
Pages 162 pages
Edition 2nd Edition
Languages
Authors (2):
Otavio Salvador Otavio Salvador
Profile icon Otavio Salvador
Daiane Angolini Daiane Angolini
Profile icon Daiane Angolini
View More author details

Table of Contents (22) Chapters

Title Page
Credits
About the Authors
About the Reviewer
www.PacktPub.com
Customer Feedback
Preface
Meeting the Yocto Project Baking Our Poky-Based System Using Toaster to Bake an Image Grasping the BitBake Tool Detailing the Temporary Build Directory Assimilating Packaging Support Diving into BitBake Metadata Developing with the Yocto Project Debugging with the Yocto Project Exploring External Layers Creating Custom Layers Customizing Existing Recipes Achieving GPL Compliance Booting Our Custom Embedded Linux Index

Chapter 7. Diving into BitBake Metadata

At this point, we know how to generate images and packages, as well as how to use package feeds - basically everything we must know for simple usage of Poky. Hereafter, we will learn how to control the behavior of Poky to accomplish our goals and achieve maximum benefit from the Yocto Project as a whole.

In this chapter, we will enhance our understanding of the BitBake metadata syntax. We will learn to use the append, prepend, and remove operators to alter content from variables, variable expansions, and so on. These are the key concepts we can use to make our own recipes and customizations that we will learn about in Chapter 10, Exploring External Layers, Chapter 11, Creating Custom Layers, and Chapter 12, Customizing Existing Recipes.

Using metadata


The amount of metadata used by BitBake is enormous. To get the maximum benefit out of using Poky, we must master it. As we learned in Chapter 4, Grasping the BitBake Tool, metadata can be classified into the following three major areas:

  • Configuration (the .conf files): Configuration files define the global content that is used to provide information and configure how the classes and recipes will work
  • Classes (the .bbclass files): Classes are available to the whole system and can be inherited by recipes to easily maintain and avoid code duplication
  • Recipes (the .bb or .bbappend files): The recipes describe the tasks to be run and provide the required information to allow BitBake to generate the required task chain. They are the most commonly used type of metadata as they are where we put it all at work. The most common types of recipes generate packages and images.

The classes and recipes are written in a mix of Python and shell scripting code. When a recipe is executed by BitBake...

Summary


In this chapter, we learned in detail about the BitBake metadata syntax; its operators to append, prepend, and remove content from variables; variable expansions; and so on, including some usage examples for them.

In the next chapter, we will learn how to use Poky to create external compilation tools and produce a root filesystem suitable for in target development. In addition, the possible use of Eclipse integration will be explained.

 

lock icon The rest of the chapter is locked
You have been reading a chapter from
Embedded Linux Development using Yocto Projects - Second Edition
Published in: Nov 2017 Publisher: ISBN-13: 9781788470469
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $15.99/month. Cancel anytime}