ES: Introduction to the Yocto Project

The Yocto Project is the industry-standard framework for building custom embedded Linux distributions. Understanding its history, components, and workflow is the entry point for professional embedded Linux development.

The Yocto Project is not a Linux distribution — it is a set of templates, tools, and methods that allow you to build a custom embedded Linux distribution for any hardware platform. It is the de facto standard for professional embedded Linux development and is widely used in automotive, industrial, medical, and consumer electronics.


What is the Yocto Project?

The Yocto Project is an umbrella organisation under the Linux Foundation. Its Linux build infrastructure is based on OpenEmbedded Core, and it brings together:

  • A reference distribution (Poky)
  • A task scheduler (BitBake)
  • Core metadata (oe-core)
  • Board support packages (BSPs)
  • Tooling and documentation

md
Yocto Project Structure:
+-------------------------------------------+
|           Yocto Project                   |
|  +----------+  +-----------+             |
|  |  Poky    |  |  BitBake  |             |
|  | (distro) |  | (build    |             |
|  |          |  |  engine)  |             |
|  +----------+  +-----------+             |
|  +----------+  +-----------+             |
|  | oe-core  |  |  BSPs     |             |
|  | (metadata|  | (hardware |             |
|  | shared)  |  |  support) |             |
|  +----------+  +-----------+             |
+-------------------------------------------+


History and Background

The Yocto Project has a rich history rooted in the open-source embedded Linux community:

YearEvent
2005Richard Purdie forks OpenEmbedded — a project porting Linux to hand-held computers — and names it Poky
2008Intel acquires OpenedHand (Richard Purdie's company)
2010Intel transfers Poky to the Linux Foundation, forming the Yocto Project
2010+OpenEmbedded and Poky merge their common components into OpenEmbedded Core (oe-core)

The Yocto Project is managed by its founder Richard Purdie and releases new versions every six months, in April and October.


Yocto Components

ComponentDescription
PokyThe Linux distribution reference — a complete working build system
oe-coreCore metadata shared between Yocto and OpenEmbedded
BitBakeThe task scheduler and build engine
HobGraphical user interface to OpenEmbedded and BitBake
ToasterWeb-based interface for BitBake
ADT EclipseEclipse plugin for building with Yocto SDK
DocumentationUser manuals and developer guides

Yocto Releases

Yocto releases twice per year and uses codenames. Key releases include:

CodenameVersionNotes
Dunfell3.1Long-term support (LTS)
Kirkstone4.0Long-term support (LTS)
Scarthgap5.0April 2024, Long-term support (LTS)

The full release list is available at:

`https://wiki.yoctoproject.org/wiki/Releases`

Getting Started with Yocto

Step 1: Check System Requirements

Yocto requires a supported Linux distribution on the host. Check compatible distributions and required packages at:

`https://docs.yoctoproject.org/ref-manual/system-requirements.html`

Step 2: Install Prerequisites

bash
sudo apt install gawk wget git diffstat unzip texinfo gcc \
    build-essential chrpath socat cpio python3 python3-pip \
    python3-pexpect xz-utils debianutils iputils-ping \
    python3-git python3-jinja2 python3-subunit zstd \
    liblz4-tool file locales libacl1

sudo locale-gen en_US.UTF-8

Step 3: Clone Poky

bash
git clone git://git.yoctoproject.org/poky

Step 4: Check Out a Stable Release

bash
cd poky
git checkout -b scarthgap origin/scarthgap

Scarthgap is the Yocto Project April 2024 Long Term Support release — a good starting point for new projects.

Step 5: Initialise the Build Environment

bash
source oe-init-build-env

This script:

  • Configures all required environment variables
  • Creates a default build directory called build
  • Changes the current directory to build
**Best practice:** Specify a custom build directory to support multiple simultaneous builds.

bash
source oe-init-build-env my-build-dir


Standard Yocto Images

Yocto provides four commonly used reference images:

Image NameDescription
core-image-minimalSmall console-based system, good for testing
core-image-minimal-initramfsSame as above but built as a ramdisk image
core-image-x11Graphical system with X11 server and xterminal
core-image-satoFull graphical system based on Sato/GNOME (mobile UI)

These images are defined in the meta/recipes-core/images/ and meta/recipes-sato/ directories.


Building Your First Image

After initialising the environment and configuring local.conf for your target machine (covered in the next post), build an image with BitBake:

bash
bitbake core-image-minimal

This triggers BitBake to:

  1. Parse all recipe metadata
  2. Resolve dependencies
  3. Fetch and build all required components
  4. Assemble the root filesystem
  5. Create deployable image files

Key Yocto Concepts at a Glance

md
Yocto Conceptual Map:
Layers (meta-*)
    |
    | contain
    v
Recipes (.bb files)
    |
    | define
    v
Tasks (do_fetch, do_compile, do_install)
    |
    | scheduled by
    v
BitBake
    |
    | produces
    v
Images (bootloader + kernel + rootfs)

Understanding these four layers of abstraction — layers, recipes, tasks, and BitBake — is the key to mastering Yocto.


Final Thoughts

The Yocto Project is the professional standard for embedded Linux development. It has a steep learning curve, but the investment pays off with:

  • Reproducible, customisable builds
  • Scalability from simple to highly complex products
  • Industry-wide community support
  • Comprehensive tooling and documentation

md
Yocto Learning Path:
Install prerequisites and clone Poky
    |
    v
Understand the four elements (toolchain, bootloader, kernel, rootfs)
    |
    v
Configure local.conf and bblayers.conf
    |
    v
Build core-image-minimal on QEMU
    |
    v
Add custom layers and recipes
    |
    v
Build for real hardware (Raspberry Pi, BeagleBone, etc.)

Start with core-image-minimal on QEMU — it is the fastest path to a working Yocto build.