• Pages

The Yocto Project

The Yocto Project is a collaborative, open-source initiative that operates under the Linux Foundation, the nonprofit consortium dedicated to fostering the growth of Linux. It comprises multiple projects related to embedded Linux software development under one umbrella.

Backed by many companies sharing the common goal of simplifying embedded Linux and benefiting from industry-wide support, Yocto allows developers to create a custom distribution. Yocto's family of open-source subprojects attempt to ease the process of configuring cross-compilation environments and retrieving, building and shipping Linux-based systems for various processor architectures. Developers interested in building a customised Linux distribution for their use case evaluate Yocto against common development-oriented Linux distros like Debian or Ubuntu.

To appreciate how the different Yocto sub-initiatives meet to simplify embedded Linux and their role under the auspices of the Linux Foundation, we will go through a brief overview of the Project's history.

Yocto comprises multiple open-source projects hosted by the Linux Foundation

1. A brief history of Yocto

The Yocto Project's history is long-winded, with its earliest origins tracing back to the early 2000s. Even before that, however, other embedded projects were seeding the grounds for what would, later on, evolve into Yocto. Among those is the Sharp Corporation, a Japanese manufacturer that designed a series of personal digital assistants (PDAs) during the 1990s. The Sharp Zaurus SL-5000D, now defunct, was their first PDA to run Linux.

The inherent constraints of the SL-5000D, with just 32 MB SDRAM and 16 MB of flash, led to community-driven efforts to improve the code of the first Linux-based PDA and ship alternative distribution to the default from Sharp. The OpenZaurus project in the early 2000s was one open source initiative whose intent was to align the Sharp system to what the developer community specifically desired by producing a kernel and root filesystem image.

Read more

2. Why Yocto for embedded

Under the sponsorship of the Linux Foundation, the ecosystem around Yocto is nowadays aligned with OpenEmbedded to form a broad community delivering state-of-the-art tools for developing custom Linux-based embedded systems. Supported by corporations and independent software developers, Yocto

is versatile and allows users to create Linux distributions tailored to their applications and a wide range of embedded devices.

Often, developers unfamiliar with Yocto mistakenly believe it is a development environment or a full-blown Linux distribution. Those categorisations are not strictly correct; a rather simplistic but more accurate way of referring to Yocto is in the form of a collection of methods enabling quick embedded Linux prototyping on popular boards.

Yocto provides tools for defining and building custom Linux distros. The content of the distribution and the building and integration of new components is still up to the end users.

Yocto enables rapid evaluations and is a sensible solution to get something up and running and generate Proof of Concepts (PoCs). Application developers can also build and test their embedded software without rebuilding the OS image via Yocto SDKs 18. Furthermore, to enable quick prototyping for testing PoCs or new silicons hitting the market, Yocto provides blueprint root filesystem images for typical Linux OS stacks.

Read more

3. The inner workings of Yocto

The output of a Yocto build is a compatible toolchain for the target device, a root filesystem image, a kernel, and a bootloader. Yocto builds those bootable full-system images from upstream source code by building packages first, as every code base resides in a particular software package.

Contrary to the Debian world, where the steps are disconnected from one another, Yocto bakes the end user's applications into the root filesystem image generated from the source code.

Metadata

With Yocto, developers build from upstream source code and have virtually complete control over every stage of compiling and creating the target.

Read more

Recipes

Recipes are metadata files specifying how to build a particular software package. A recipe standard layout includes descriptive metadata providing generic information about the recipe and the hosting location of the software package it builds.

Read more

Layers and BSPs

Layers are a collection of related recipes. With Yocto, developers can quickly build an image suitable for emulation and later customise their build for specific hardware by adding a hardware layer into their development environment.

Read more

4. The good, the bad and the ugly of Yocto

Yocto provides a flexible set of tools and an environment for embedded developers to share software stacks and configurations to create tailored Linux images for devices. Having understood the basic structure and layer-based architecture of Yocto, it is time to shift our attention to its value proposition.

The following section will address the premier reason for adopting Yocto for a quick PoC. Building on that knowledge, the remainder of the chapter will explore the downsides of using Yocto in production.

Flexibility

Yocto gives developers complete control over every stage of compiling and building the target. Its main value proposition is the unmatched granularity developers have when tailoring their system, from the bootloader all the way up to the Linux kernel and userspace libraries.

Read more

Complexity

Yocto invariably exposes lots of complexity to end users by providing high flexibility and customisation options. The consensus among the embedded Linux community is that Yocto is particularly complex, and the learning curve is steep.

Read more

Maintenance

Companies get pulled into Yocto because of the active community and availability of tools. Some device manufacturers choose to deploy Yocto-based systems in the field, given the ongoing investment in expensive kernel engineers.

Read more

Updates >>

Security >>

Dependencies >>

From the above, it should be clear that Yocto is a good solution for fast prototyping. However, if embedded teams want to avoid headaches after, they should evaluate something less complex and with long-term support. What are device manufacturers to do?

On the one hand, companies want to reap the benefits of the shift towards the embedded edge, driven by rapid progress in networking and communication technologies. On the other hand, while Linux is the best OS to take advantage of this new generation of compute, maintaining Yocto devices in production is a painful, resource-intensive activity.

Are there other options for companies aiming to ship an embedded Linux distribution?

Ubuntu Core

Next page