Introduction to the Yocto Project, Poky, and Bitbake

The Yocto Project combines multiple open-source projects to help developers create custom Linux images for target boards. It provides tools, metadata, and a build framework to create custom Linux distributions for embedded and IoT devices, automating the entire build process. Poky is the reference distribution of the Yocto Project and includes metadata, the OpenEmbedded core, and Bitbake. Bitbake is a task executor that runs tasks according to recipes.Yocto Project Development

What are the advantages of the Yocto Project over other build tools?

  1. The Yocto Project automates the build process and makes it easy to customize (add, remove, modify) the packages in a Linux distro.
  2. It is the most popular and widely used build tool in the semiconductor industry.
  3. It is easy to maintain layers and recipes.
  4. Very good training documentation is available.

In this Yocto tutorial, we are focusing on learning the following topics:

  1. Overview of the Yocto Project
  2. Yocto Project Major Component
  3. Poky Directory Layout

Overview of the Yocto Project:

  • It is an open-source project for building custom Linux OS for target boards. It is a collection of build frameworks (build systems), tools, and metadata. Its major components are OpenEmbedded, Poky, and Bitbake. The Yocto Project supports many different architectures (PowerPC, ARM, x86/64, etc.) and hardware platforms.

What are the major components of the Yocto Project:

The Yocto Project has collaborated with many other open-source projects to ease the development of custom Linux images. Its core components are the Poky and OpenEmbedded build systems.

Poky

  • It is the reference distribution of the Yocto Project and provides an OpenEmbedded build system (Bitbake and OpenEmbedded Core) as well as a set of metadata to help create custom distros.
  • Poky =Bitbake + meta data
  • It supports as a reference for the following platforms: BeagleBone Black, Raspberry Pi,  QEMU (Emulator), and generic x86-64.
  • Every six-month Yocto project team releases a new version of poky.
  • Download the Poky from the below link:
  • git clone https://git.yoctoproject.org/git/poky

 Downloading Poky for remote repository

Downloading Poky for the remote repository

OpenEmbedded

  • OpenEmbedded is a build framework that consists of OE-core metadata and Bitbake build engine.
  • OE-core is the base layer of the Yocto project and contains a Bitbake layer, recipe, classes, and tools.

Bitbake

  • It is the build engine in the Yocto Project. It executes tasks according to provided recipes, classes, configuration files, and metadata.
  • Bitbake is a Python program that takes recipe files (.bb and .bbappend) as input and performs the following tasks –
    1. Fetch: Downloads the source file from a local or remote repository.
    2. Unpack: Extracts the source files into the source directory.
    3. Patch: Applies the patch to the source code.
    4. Configure: Sets the flags for the software being built.
    5. Build: Compiles the source files and generates the executable program.
    6. Installation: Copies the executable program and other files to the target directory.
    7. Package: Generates the package for the target system according to the chosen package management system.

Directory Layout of Poky in the Yocto Project:

In the Yocto Project, Directory Structure is very optimized and always follows the same. Poky directory contains meta-directory layers, Bitbake, etc. 

Directory Structure of Poky

poky directory layout

Bitbake Directory 

  • It is the main part of the OpenEmbedded build system that parses the Recipe and executes the tasks. 

Meta Directory

  • It contains recipes, class, and configuration files for many packages.
  • Machine configuration: It provides information about the architecture and which kernel to build.

Yocto Meta Directory Structure

Yocto recipe layer directory structure

NOTE: Always start the Yocto build process without a root user.  

Add comment


Security code
Refresh