Reader small image

You're reading from  Yocto for Raspberry Pi

Product typeBook
Published inJun 2016
PublisherPackt
ISBN-139781785281952
Edition1st Edition
Concepts
Right arrow
Authors (2):
TEXIER Pierre-Jean
TEXIER Pierre-Jean
author image
TEXIER Pierre-Jean

Pierre-Jean TEXIER has been an embedded Linux engineer at Amplitude Systèmes (Amplitude Systèmes was a pioneer in the marketing of Ytterbium femtosecond lasers) since 2014 where he maintains a custom system on chip i.MX6 with the Yocto project (meta-fsl-arm), which is made by a French company: EUKREA. He is a graduate of ESTEI school at Bordeaux where he spent 3 years as a student in order to become an embedded Linux Engineer. He is a big ardent of the world of free software and the embedded world. His knowledge background includes C/C++, Yocto, Linux, Bash, Kernel development but he is also open to trying new things and testing new technologies. First, I want to thank my patience wife for her during my writing sessions. I also give thanks my parents and my brother, who without them, this book possibly would not have happened. I would also like to thank all of the mentors that I've had over the years. Mentors such as Cyril SAGONERO, Sylvain LE HENAFF, Pierre BORDELAIS, Vincent POULAILLEAU, Fabrice BONNET, Jean-Claude PERESSINOTTO, Pierre AUBRY. Without learning from these teachers, there is not a chance I could be doing what I do today. To finish I would like to thanks Eric MOTTAY the CEO of Amplitude Systèmes, Luca TESTA the head of Electronics team at Amplitude Systèmes for his trust, Hitesham WOODHOO, Alexandre GAMONET, Kevin PINTO and Guillaume MACHINET For the various discussions about the raspberry pi during coffee breaks.
Read more about TEXIER Pierre-Jean

Petter Mabäcker
Petter Mabäcker
author image
Petter Mabäcker

Petter Mabcker is a senior software developer specializing in embedded Linux systems. For the past 8 years, he has been working with embedded Linux professionally. Currently, Petter works as a Scrum Master and senior software developer at Ericsson AB. Additionally, his knowledge includes C/C++, shell scripting, Yocto Project (including BitBake and OpenEmbedded), Scrum, and Git. In 2013, Petter started the small business Technux, which he runs as a side project in parallel with his duties at Ericsson. Some of the focus areas of the business are open source embedded Linux projects, such as the Yocto Project, together with different projects that involve the Raspberry Pi. As part of the work with Technux, Petter works as a contributer to the Yocto Project (including the Raspberry Pi BSP layer, known as meta-raspberrypi).
Read more about Petter Mabäcker

View More author details
Right arrow

The core components


The core components (other available tools are optional) of the Yocto Project are:

  • BitBake

  • OpenEmbedded-Core

  • Poky

  • The BSP layer (meta-raspberry, meta-fsl-arm, meta-ti, meta-intel, meta-sunxi, and so on)

The following diagram shows all the layers that we will discover through this book. We will study all the tools through various examples, allowing better comprehension.

What is Poky?

Poky is the reference Yocto Project distribution. It contains some of basic components (called the build system) of OpenEmbedded and a set of metadata for creating embedded distributions for a number of targets. It is platform independent and performs cross-compiling using the BitBake tool (a task scheduler), OpenEmbedded-Core, and a default set of metadata, as shown in the following figure. It provides the mechanism to build and combine thousands of distributed open source projects.

The Poky build system is poised to become the reference in the industrial world as evinces by industry leaders such as Wind River, Intel, Montavista, and Mentor Graphics.

Note

Angstrom ( http://www.angstrom-distribution.org/ ) is another distribution based on OpenEmbedded-Core. You might consider Angstrom and Poky to be close cousins, because Poky is also based on OpenEmbedded-Core.

The Chief - BitBake

BitBake, the build engine, is a task scheduler (like GNU Make) which parses several scripts (shell and Python, for example).

Once the environment is built, BitBake will execute the task that has been requested. If no task is provided, BitBake will run the default task, called build.

To run a task, BitBake will first look for an environment variable called do_ <task name>, which will contain the task code to execute (in Python or a shell). So, to compile a Yocto recipe, use the code contained in the do_compile variable.

In short, from the information contained in the recipes (or metadata), it downloads the sources of projects from the Internet, a local directory, or a version-control system (such as Git), and then builds in the order determined by the dependency graph generated dynamically. Finally, it installs binaries, generates the corresponding package, and builds the final image, which can be installed on the target (Raspberry Pi for us).

The following picture shows how BitBake works:

OpenEmbedded-Core

The OpenEmbedded-Core metadata collection (meta in the following diagram) provides the engine of the Poky build tool. It is designed to provide the core features (several recipes). It provides support for six different processor architectures (ARM, x86, x86-64, PowerPC, MIPS, and MIPS64), supporting only QEMU-emulated machines.

The organization of OpenEmbedded-Core is depicted here:

This layer includes different recipes, which describe how to fetch, configure, compile and package applications and images.

Note

For the rest of the book, we will mix this layer with the BSP layer of the Raspberry Pi, meta-raspberrypi.

Exploring metadata

Metadata, which is composed of a mix of Python and shell script text files (.conf, .bb, .bbclass, and .inc), provides a tremendously flexible system. Metadata refers to the build instructions themselves as well as the data used to control what things get built and to affect how they are built. The metadata also includes commands and data used to indicate which versions of software are used and where they are obtained from. Poky uses this to extend OpenEmbedded-Core and includes two different layers, which are another metadata subset. Here are their details:

  • * meta-yocto: This layer provides the default and supported distributions, visual branding, and metadata tracking information (maintainers, upstream status, and so on)

  • * meta-yocto-bsp: This layer, on top of it, provides the hardware reference board support (BSP) for use in Poky

We will discover metadata in depth through Chapter 4, Understanding the BitBake tool.

Previous PageNext Page
You have been reading a chapter from
Yocto for Raspberry Pi
Published in: Jun 2016Publisher: PacktISBN-13: 9781785281952
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.
undefined
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

Authors (2)

author image
TEXIER Pierre-Jean

Pierre-Jean TEXIER has been an embedded Linux engineer at Amplitude Systèmes (Amplitude Systèmes was a pioneer in the marketing of Ytterbium femtosecond lasers) since 2014 where he maintains a custom system on chip i.MX6 with the Yocto project (meta-fsl-arm), which is made by a French company: EUKREA. He is a graduate of ESTEI school at Bordeaux where he spent 3 years as a student in order to become an embedded Linux Engineer. He is a big ardent of the world of free software and the embedded world. His knowledge background includes C/C++, Yocto, Linux, Bash, Kernel development but he is also open to trying new things and testing new technologies. First, I want to thank my patience wife for her during my writing sessions. I also give thanks my parents and my brother, who without them, this book possibly would not have happened. I would also like to thank all of the mentors that I've had over the years. Mentors such as Cyril SAGONERO, Sylvain LE HENAFF, Pierre BORDELAIS, Vincent POULAILLEAU, Fabrice BONNET, Jean-Claude PERESSINOTTO, Pierre AUBRY. Without learning from these teachers, there is not a chance I could be doing what I do today. To finish I would like to thanks Eric MOTTAY the CEO of Amplitude Systèmes, Luca TESTA the head of Electronics team at Amplitude Systèmes for his trust, Hitesham WOODHOO, Alexandre GAMONET, Kevin PINTO and Guillaume MACHINET For the various discussions about the raspberry pi during coffee breaks.
Read more about TEXIER Pierre-Jean

author image
Petter Mabäcker

Petter Mabcker is a senior software developer specializing in embedded Linux systems. For the past 8 years, he has been working with embedded Linux professionally. Currently, Petter works as a Scrum Master and senior software developer at Ericsson AB. Additionally, his knowledge includes C/C++, shell scripting, Yocto Project (including BitBake and OpenEmbedded), Scrum, and Git. In 2013, Petter started the small business Technux, which he runs as a side project in parallel with his duties at Ericsson. Some of the focus areas of the business are open source embedded Linux projects, such as the Yocto Project, together with different projects that involve the Raspberry Pi. As part of the work with Technux, Petter works as a contributer to the Yocto Project (including the Raspberry Pi BSP layer, known as meta-raspberrypi).
Read more about Petter Mabäcker