Introduction to the Yocto Project, Poky, and Bitbake

Yocto Project combines multiple open-source projects that help developers to create custom Linux image for target boards. A Yocto Project provides tools, metadata, and a build framework to create the custom Linux distro for your embedded and IoT devices. It automates the complete build process. Poky is the reference distribution system of the Yocto Project and It contains some metadata, OpenEmbedded core, and Bitbake. Bitbake is a task executor that executes the task according to the recipe.

Yocto Project Development

What are the advantages of the Yocto Project as compare to the other Build tools:

  1. Yocto Project automates the build process and makes it easy to customize (add, remove, modify ) the packages in Linux Distro.
  2. It is the most popular and widely used build tool in the semiconductor industry.
  3. Easy to maintain the layer and recipes.
  4. A very good training document is present.

In this Yocto tutorial, we are focusing to learn 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 to build a 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 the Bitbake. Yocto Project supports many different architectures (PowerPC, ARM, x86/64, etc) and hardware platforms.

What are the major components of the Yocto Project:

Yocto Project has collaborated with many other open-source projects to ease developing the custom Linux Image. Its core part is the Poky and OpenEmbedded build system.

Poky

  • It is the reference distribution of the Yocto Project and it provides an OpenEmbedded build system (Bitbake and OpenEmbedded Core) as well as a set of metadata that helps to create the custom distro.
  • 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 the task according to provided recipes, classes, configuration files, and metadata.
  • Bitbake is a python program that takes recipe files (.bb and .bbappend files ) as an input and does the following task –
    1. Fetch: It downloads the source file from a local or remote repository.
    2. Unpack: It extracts the source files into the source directory.
    3. Patch: Apply the patch on the source code.
    4. Configure: Set the flag for the software being build.
    5. Build: Compile the source files and generate the executable program.
    6. Installation: Executable program and other file copy to the target directory.
    7. Package: Generate the package for the target system according to the chosen package management systems.

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 tells the information about 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