DE · Topics ·

Using Yocto Project for Embedded Systems Design

Choosing an operating system for embedded systems design is a complex decisions facing an engineer during the beginning phases of new product development.
Alex Gonzalez Digi International Alex Gonzalez
Digi International

Choosing an operating system (OS) for embedded systems design is one of the most important and complex decisions facing an engineer during the beginning phases of new product development. The OS must be robust enough to deliver the desired user experience and also enable an ecosystem of developers to build applications. Among the main factors designers need to consider in selecting OS are acquisition cost, source code availability and broad architecture support.

Until recently, “embedded” would have been synonymous with a small resource-constrained dedicated system. Today, it’s easy to find embedded systems with 1GB or more of memory, adequate storage and dedicated hardware accelerators for graphics, video and cryptography. At the high end, multi core systems are available that hardly resemble the embedded systems of a few years back.

Although embedded systems have become difficult to generalize, there are some common elements shared by most embedded systems:

  • dedicated applications;
  • power management options;
  • security considerations; and
  • a limited time-to-market window.
There are also tradeoffs that should be considered when using embedded systems:
  • startup time;
  • real-time capabilities;
  • network connectivity and bandwidth; and
  • user interface.

Types of Applications

At the low end are applications that need to consume fewer resources, provide quick startup, need real-time determinism and have no demanding user interface considerations. They also typically use a microcontroller running a bare metal operating system. However, many of today’s embedded systems typically require a rich user interface, advanced configuration and management capabilities and a wide selection of interfaces typically including wireless technologies.

As a result, modern embedded devices are increasingly complex systems that must often accomplish seemingly conflicting tasks. For example, it is common to require some level of real-time determinism while concurrently driving a user-friendly graphical user interface.

Given these considerations, there are typically three basic options when selecting the best OS for embedded system design:

  1. A hard real-time OS to perform both the deterministic and the non-deterministic tasks
  2. A soft real-time OS for real-time requirements that are not as strict
  3. Splitting the hard real-time into a dedicated microcontroller and using a non-real-time OS for the UIs and processing intensive tasks in a microprocessor.

Where to Start

Modern system-on-module solutions that embed an ARM-based CPU with precertified wireless connectivity and include a microcontroller are a recommended starting block for a new embedded system design with a tight time to market.

Most embedded systems need to be quick and fluent in reacting to events, but whether an event is handled a few microseconds earlier or later is only important to a few hard real-time applications. For those, using a dedicated microcontroller along with a non-real-time microprocessor to handle the user interface, configuration and management of the embedded device is often the best approach.

Given these considerations, the choice of an appropriate operating system is one that should be made early on, and it comes down to choosing between closed and open source solutions.

In the last 10 years, GNU/Linux has gained momentum in the embedded world for a handful of reasons:

  • Linux is free, whereas most closed-source competitors have some kind of royalty-based pricing model;
  • it is open, so the user owns the source and can modify and maintain it for the life of the product;
  • it is secure, with vulnerabilities being discovered and dealt with in a much more efficient way by the open source community;
  • it is robust, as it is the most commonly used operating system in the world not only in server systems but also in embedded devices; and
  • it is where innovation happens first.
However, when selecting Linux, the decision-making process has only started, as a Linux distribution suitable for embedded system needs to be chosen next. There are two main options: a binary-only distribution or a source-compiled distribution.

Binary-only distributions are popular on the server and desktop worlds. These are well-known distributions like Debian, Ubuntu or Red Hat. However, distributions that target the server world are ill-suited for embedded products and have serious disadvantages for embedded systems that are often overlooked.

Additionally, another factor to be considered is the need to cross-compile an open-source distribution—a daunting, difficult task. Companies used to rely on in-house build systems to build a handful of applications. This model was maintainable while embedded systems remained small and resource constrained; however, maintaining hundreds of packages (which is essentially what a modern distribution needs) became impossible.

Yocto Project Highlights

Because of this, Linux distribution builders began to appear, two examples being buildroot and OpenEmbedded. It was only a matter of time for a standard Linux distribution builder to appear, and that is the Yocto Project. The Yocto Project took an OpenEmbedded-based distribution, Poky Linux, and created an umbrella collaborative open source project, which has become the standard Linux distribution builder.

The Yocto Project is often described as an umbrella project, that is, a group of different open source projects hosted by the Linux Foundation that come together to collaborate on tools, best practices and software to help create custom Linux-based embedded operating systems.

As such, the Yocto project is composed of a community of developers and companies, including silicon vendors like Intel, NXP, Renesas and Texas Instruments, as well as traditional embedded operating systems vendors like MontaVista, Wind River or Mentor Graphics, and hardware vendors like Digi International and individual developers. The Linux Foundation guarantees that the Yocto Project remains independent while keeping it compatible with almost all embedded systems processors, Systems-On-Chip and System-On-Modules in the market.

The Yocto Project was created specifically for embedded systems. This is something designers should keep in mind when considering non-embedded focused distributions, as those lack the flexibility needed to accomplish target footprint sizes and functionality tweaks. It is not uncommon to see embedded companies choosing binary based distributions, such as Debian, struggling to modify them for specific needs and ending with custom and increasingly complex operating systems difficult to maintain and port.

Security and how a product gets updated once in the field are also key considerations. The Yocto Project issues a new stable release every six months and maintains stable branches for up to two years, and some silicon vendors and OEMs like Digi International often extend the support period to up to five years or even more. The Yocto Project community is quick to react to software vulnerabilities, and patches are upstreamed and backported very quickly. These updates include specific embedded software packages, which non-embedded distributions often don’t bother to update as they are not used by their community.

Software updates in embedded systems also require special consideration. Most Linux-based operating systems, including the Yocto Project, can update software packages using standard package management software like RPM or APT. However, most embedded developers prefer whole system updates that guarantee the systems run well-tested software that has not been incrementally patched.

One often overlooked area when choosing a Linux-based OS is that of software licenses. Legal departments are not often involved in technical decisions like choosing an embedded OS, but sooner or later they will have to deal with license compliance issues such as open source license contamination, digital rights management, patent retaliation, etc. Such issues can serve to delay the delivery of a product significantly.

Again, the Yocto Project has been designed with license compliance at heart. It has a dedicated group, the License Infrastructure Interest Group, that works on making the Yocto Project license aware. It can add and remove software based on specific license groups, identifies license incompatibilities and generates open source license inventories that legal departments can use to audit software products.

When choosing a System-On-Module solution, engineers should be sure to give the software package offered by the manufacturer careful consideration. Manufacturers that build upon the Yocto Project and provide comprehensive testing and support will speed up design while guaranteeing the long lifecycle maintenance an embedded product requires.

Specifically, engineers should seek a fully featured, robust and extensively tested Linux based distribution, as well as support packages for that hardware vendor’s embedded modules. They should also seek to partner with a vendor that is continuously adding additional software features that are not part of the standard Yocto Project, such as a comprehensive device security framework, local and over-the-air firmware update capabilities, device cloud support for remote management, monitoring and updates, and out-of-the-box support for a wide range of popular cellular modems and other RF protocols.

More info:

Digi International


Mentor Graphics




Texas Instruments

Wind River

Alex González, of Spain, has been using Linux since 1994 and started working professionally with embedded systems in 1999, designing products for video advertising over IP networks. He is currently Software Engineering Supervisor at Digi International, working on Linux Board Support Packages (BSPs) for Digi’s embedded modules range, and Product Owner of the Digi Embedded Linux and Android Scrum team.

Share This Article

Subscribe to our FREE magazine, FREE email newsletters or both!

Join over 90,000 engineering professionals who get fresh engineering news as soon as it is published.