Yocto Project: more than a build system

Diandra Martini
O.S. Systems
Published in
5 min readApr 24, 2021

Note: This article is based on the book Heading for the Yocto Project, written by Otavio Salvador and Daiane Angolini, containing quotes.

In the last article, we discussed the relationship between OpenEmbedded and Yocto Project to explain how this project joins the best of both. This article aims to bring a brief overview of the Poky, the Yocto Project’s reference build system.

Yocto Project results of workgroup motivation to reduce work duplication and provide resources for new and experienced users. For that reason, here at O.S.Systems, we see Yocto Project as a framework more than a build system. That’s because Yocto Project offers not only an excellent infrastructure for development but also a chance to improve workflows, avoid risks, and reduce development time.

But how Yocto Project do that?

To better understand the Yocto Project operation, let’s see the explanation of Otávio Salvador and Daiane Angolini, the authors of Heading for the Yocto Project. To them, an excellent way to understand its results is by seeing the Yocto Project as a computer machine.

What does it mean?

Imagine a tool in which required inputs will be interpreted, generating outputs. That is precisely what that means. Let’s see the image below:

Figure 1. The Yocto Project is seen as a computing machine

Ok! So, the Yocto Project is like a build system?

Kind of, but not only. As we’ve said, the Yocto Project offers many more benefits than a standard build system. Let’s see figure 01 again. In short, using Yocto Project, whenever necessary running a tailored Linux-based operating system, it’s possible to get the required outputs generated, including among them:

  • Bootloader;
  • Linux Kernel image;
  • Root filesystem;
  • List of licenses of packages included in the rootfs;
  • The sources for distribution to comply with the copyleft requirements;
  • A toolchain for use with the platform;

Imagine how much time was and will be saved from here?

Amazing, right?

Yes, but again, how?

Poky, the Yocto Project’s reference build system, is the shining star here. Poky was designed to make intense use of cross-compiling environments. To allow that, Poky is composed of a set of files (metadata) to provide the information required for the build orchestration tool’s work (BitBake).

Figure 2. The Poky build system

Now, do you remember we said in the introduction that Poky gathers the best of OpenEmbedded? Well, we were talking about BitBake and Metadata. Both provide the mechanisms to assemble open-source projects, vendor-specific extensions, or even proprietary pieces to form a fully customizable, complete, and coherent Linux Software stack.

To better understand that, a closer look into Poky is crucial. Besides the BitBake tool, the OpenEmbedded task scheduler, the sub-modules of metadata files are very important here.

Figure 3. The Poky build system — a look closer into metadata

OpenEmbedded-core: with the maintenance shared by OpenEmbedded e Yocto Project, OE-core is the core infrastructure for the cross-compilation environment, offering the basic set of applications, libraries, and utilities ready to be used in Linux-based operating systems.

Yocto Project’s specific, is metadata provided by the Yocto Project, to extend the build system to fulfill Yocto Project needs. This also includes a set of board support packages (BSP) which is used by the Yocto Project Quality Assurance Team, when testing the Yocto Project before every release.

All that is amazing, but how does it works?

Let’s see to BitBake and the Metadata again.

When choosing or creating one image, we provide a set of essential information, like a recipe that will give the characteristics of the image. A recipe may contain the information set like licenses, the recipe data localhost, steps, settings of compile and build process, tests, and others. So, Bitbake analyses all recipes required to build the image and puts them in a list to init tasks.

Bitbake schedules the execution of the tasks respecting the required order for each recipe. But in short, it will fetch the code, unpack, clean, compile, and include additional tasks like apply tests, populate, among other things.

And about Metadata?

Well, it’s the data. But believe it, there’s a lot. There are two submodules on Metadata: one containing codes provided by the OpenEmbedded-Core, a set of layers and recipes that provide support to different features, and another set added by Yocto Project variety support to boards.

To keep the organization, recipes that add a feature might count on supporting recipes or inform which ones are required. This set of recipes might become layers. Besides that, these recipes allow using aptitude to add code without writing. And that’s just the beginning.

Well, a lot of information so far, right?

The first article told us the Poky build system started as a subset of the OpenEmbedded build system. This one shows its evolution. Indeed, this month Poky will have a new release. It has a semestral release cycle that occurs in April and October. So, keep up to date.

Ok! But now, how do I start to work with Yocto Project?

To get started with Yocto Project, we prepare a brief step-by-step to help you.

Great, right?

We hope to help those who want to join this great community using the Yocto Project. So, the next article will show you how to build an image using Yocto Project.

We hope you enjoy it.

--

--

Diandra Martini
O.S. Systems

Head of Business Ops. at O.S. Systems | Business Development | Sales Strategist | CRO | SEO