Embitel

logo-2-1
Search
Close this search box.

Why Yocto is a Framework of Choice for Creation of Embedded Linux Distributions

The Prelude:

The Yocto Framework is an open source collaboration project, led by Linux Foundation, with an objective to simplify the software development process for Linux distributions.

This framework is especially designed to customize Linux image for embedded applications for deployment in Embedded and IoT application, that are independent of the underlying architecture of the embedded hardware.

The Yocto project facilitates creation of customized and hardware-agnostic Linux distributions with the help of an integrated environment. This consists of all the necessary tools and processes.

Thus the project has successfully created a flexible ecosystem for embedded software developers to create and share software stacks and technology best practices, for custom development of Embedded Linux distribution.

Android vs Linux Build Systems: Understanding the Times Before the Emergence of Yocto

Linux OS has been a standard OS deployed in several embedded devices/appliances like smart TV’s, gaming console, medical devices and more. On the other hand, Android was introduced as an OS for smartphones, tablets and other hand-held devices.

Android is managed by Google Inc., who offers periodic version releases and software updates for the same. Android consists of pre-defined GUI framework, build system, OS abstractions- that saves precious time required to build an Android based smart device from scratch.

Android as an operating system for smart mobile devices has been a popular choice amongst the device manufacturers, thanks to availability of standardised APIs and support from a very vibrant Google App Development Community.

Contrary to this well-defined Android OS ecosystem, the Linux development ecosystem was fragmented between discreet built systems developed by each SOC or microprocessor vendor  like Intel, Texas Instrument, FreeScale.

This meant that for each different project, a developer had to start from scratch. This involved the following a rather tedious process, as described below:

  • Fetching the source file.
  • Integrating the discreet software components.
  • Customization of BSP software and porting of the OS.
  • Creation of a custom-build OS distribution– this depended on the manual and guidance provided by the vendor of the microprocessor platform being used.

Launching of the Yocto Project

Hence the community of Linux Developers realised the need for a standard set of tools and framework in order to simplify the process of designing a custom Linux Build for embedded devices. In the year 2010, the Yocto project was initiated by the Linux Foundation. Later, in 2011, the project was officially launched in association with 22 organizations, alongside OpenEmbedded.

The Yocto project was launched with an objective to create a collaborative space, where the developers working on Embedded Linux applications can share tools and processes. This in turn, would save crucial time and effort that can be invested in more value-add development tasks.

Overview of the Yocto Framework:

All the objectives that Yocto Project has mandated for itself are firmly supported by its underlying Technology Architecture.

This architecture of the Yocto framework is modular in nature, as it has been designed by as a software stack consisting of various layers that manage a specific task/function.

With the objective to help us understand why this architecture makes Yocto such a powerful framework, let’s look at some of the layers and the benefits this model offers.

YOCYO IDE

Yocto IDE. Image Source: Yocto
Metadata: It is a software layer that contains user supplied recipe files, configuration & append files and patches. It basically consists of build specific information and data that tells BitBake what is to be done next.

Machine/ BSP Layer: This layer provides machine configurations. This layer consists of information and components, specific to the target hardware for which the image/ SDK is being built. You can customize the BSP layer to cater to your embedded project requirement by configuring the Meta layer.

Distro Layer/Policy Configuration: The Distro layer includes general or top-level policies specific to a particular distribution. The layer can consist of class files, configuration files, and various recipes for custom image, distribution-specific configuration, initialization scripts etc.

OpenEmbedded Build System:  This is the build system for the Yocto Project that is based on “Poky”, a reference embedded distribution. It is often referred simply as “the build system” in the Yocto Project documentations.

BitBake: BitBake is the key component of the OpenEmbedded build system used for image generation. BitBake works by parsing the metadata, locating patch files and applying them to source files. It can also find and apply multiple patches for a single recipe.

Poky Build System: The Poky build system acts as reference embedded distribution as well as a test configuration for Yocto project. It is used to validate the Yocto Project components and to specify how to customize a distribution.

Benefits of Yocto:

  1. Modular Architecture Supports Easy Customization: As already mentioned, the Yocto layered infrastructure is the fundamental part of the Yocto model. The layers categorize all the related functionality into separate bundles such as Platform layers, GUI layer, and so on.You can include or exclude these layers to your build set up as required by your project. Segmenting related information into one layer means you can make the required edits in easy steps rather than having to change the entire build system.The layering simplifies the process of customization and reuse of Yocto layers for various project needs.
  2. Easy accessibility and flexibility: Being an open source project, components of Yocto, such as the Poky build specifics, can be altered, shared, reused according to the requirements of the particular embedded project. Additionally, all the Yocto Project files are systematically maintained within specific repositories on its web-based source code browser. These source code files are neatly organized into segment such as Poky, IDE Plugins, Yocto Linux Kernel, and more.As a developer, you can easily access these source code files, create a local / Git clone of them, and modify them – as per your requirements.
  3. Mechanism over Policy: Yocto is mainly based on mechanism than the policy. This helps system developers to have the freedom to set the policy according to the needs of their project/assignment.
  4. Simplified Configuration Process: Unlike a traditional Linux distribution model, which includes full installations and configurations, you can the Yocto Project to either create a customized Linux distribution or just use certain packages to add a specific feature to your embedded device.For example, if you wish to have a rich GUI in your embedded application, you can enable any of the available options- Qt, X11, GTK+, or SDL for your device, if it has display hardware.If your target device doesn’t contain display hardware, you need not install these components at all.
  5. Streamlined Version Releases & Update Process: Yocto follows a strict release schedule with major release happening every 6 months. This allows its development teams to plan their work better.The developers can easily select the required Yocto branch, which offers access to the latest features. Such a streamlined update schedule also means that common security vulnerabilities and other potential issues are addressed on time. Below is the release schedule of Yocto.
    Schedule of YOCTO
  6. Community Wide Support: Developers using Yocto for Embedded Linux distributions can seek support from the community of developers working on improving the Yocto Project. This means if you find any challenges at any stage of embedded project development, you can reach out to the developer community.This is useful, especially for the novice developers who are fairly new to the Yocto‘s build systems.
  7. Access to Wide array of Tools and SDK: The Yocto community supports pre-tested tool-chains and SDKS, compatible with a wide variety of platforms and architectures.These tool-chains are easy to customize using the standard Yocto recipe mechanisms. In fact, the default Yocto source code supports several commercial tool-chains. This offers a lot of options to the developers and helps them support variety of applications.Additionally, the project also provides access to Application development Toolkit, ECLIPSE IDE Plug-in, Graphical UI.
  8. Facilitates easier Linux Porting process: Due to change in project requirements or for development of new product lines, development teams are tasked with migration of the embedded application to a new Hardware Platform. This requires porting of Linux OS to the new hardware architecture. Contrary to the traditional process, Yocto Project has made this Embedded Linux OS Porting , a fast and seamless task for the developers.

Yocto Goes Mainstream!

Ever since Yocto has been found to make life easier for the embedded Linux developers, it has become a mainstream choice for creating custom Linux systems.

Realising the benefits of a unified framework for Embedded Linux application development, several industry stakeholders have pledged support for the Yocto project.

Some of these organizations include:  Intel, LSI, Freescale Semiconductor, Dell, MontaVista Software, Texas Instruments, Mentor Graphics, Cavium Networks, Timesys, Tilera Corporation, NetLogic Microsystems, and Wind River.

Additionally, new industry initiatives such as Automotive Grade Linux and GENIVI Alliance have opened their doors for the Yocto Project. Needless to say, this will greatly encourage the widespread usage the Yocto Project for Embedded Linux applications.

Vaibhav

About the Author

Vaibhav is a digital-marketing professional with a deep-rooted interest in everything automotive. Regular collaborations with automotive tech guys keep him apprised of all new trends in the automotive industry. Besides digital marketing, Vaibhav is fond of writing and music.

Scroll to Top