Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

I have been using Yocto for a while, but I have always been confused about the relationships between Poky, BitBake, OpenEmbedded, and OpenEmbedded-Core. With some free time at the end of the year, I decided to整理一下. Please correct me if there are any mistakes.

1. A brief description of their relationships:

Yocto, or the Yocto Project, is an initiative promoted by the Linux Foundation aimed at facilitating the distribution of different embedded Linux versions. It allows developers to easily build a Linux system that fits their development board or project. The Yocto project team discovered that the open-source project OpenEmbedded had this capability, so Yocto incorporated OpenEmbedded and developed a build system based on it. This build system, which is used for demonstration or as a product, is called Poky. Poky has two meanings: first, it is the reference implementation of the Yocto Project; second, it is a lightweight open-source Linux distribution. In most cases, we directly pull the Poky repository as a starting point, adding different recipes, machines, etc., to create our own Linux system. The content of the Poky repository mainly comes from the OpenEmbedded-Core repository, along with BitBake, meta-poky, and some documentation. OpenEmbedded-Core is the core repository provided by the OpenEmbedded project, which can be used by Poky or other projects that wish to provide Linux building capabilities (for example, Openmoko). Comparing OpenEmbedded-Core and the Poky repository, we can see that Poky basically imports the OpenEmbedded-Core repository intact. If we want to add a tool to our Yocto environment and are unsure how to write the corresponding .bb file, we can look in the OpenEmbedded repository, which serves as a data source specifically for different software recipes.

2. Individual explanations

2.1. Yocto Project

It is a project promoted by the Linux Foundation, providing a set of tools and original files that enable developers to easily build different embedded Linux systems. Yocto is just the name of this project and does not refer to a specific product.

2.2. OpenEmbedded

OpenEmbedded is a software architecture that uses the MIT License, aimed at building Linux distributions for embedded systems. Its automated build system uses BitBake, which is similar to Gentoo’s ebuild. In March 2011, it collaborated with the Yocto Project, using the OpenEmbedded-Core project as its development name. The OpenEmbedded build system is based on the BitBake build tool, and its operational behavior is similar to Gentoo Linux ebuilds. In the older OpenEmbedded-Classic platform, all automatically built recipes were grouped together, while in the new OpenEmbedded-Core, the structure is composed of many layers, making it easier for users to add customized automated build recipes. OpenEmbedded supports multiple platforms and architectures and provides a large number of packages and components to choose from. The Yocto Project is developed based on the OpenEmbedded build framework.

Developers looking to add a tool to their build project through .bb can find it in the OpenEmbedded repository. The method is as follows:

Official website: https://www.openembedded.org/wiki/Main_Page

Visit the official website

Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

From the left sidebar on the official website, enter the “Layer Index” to search for the corresponding .bb of the project you wish to obtain.

Select the appropriate Yocto version for yourself

Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

For example, choose the latest .bb for the dnsmasq project in Yocto version 4.1, with the search criteria set as follows:

Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

The search results are as follows:

Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

Through the Recipe file column on the search results page, you can see how to introduce this project into your Yocto project via .bb.

PS: How to check the version of Yocto you are using

Find the poky/meta-poky/conf/distro/poky.conf file, and search for the string “PREFERRED_VERSION”. The suffix with Yocto or Poky is basically what you need.

2.3. OpenEmbedded-Core

OE-Core is a metadata composed of base recipes, classes, and related files, aimed at sharing across many different OpenEmbedded-based systems, including the Yocto Project. It is a filtered subset of the original repository developed by the OpenEmbedded community, streamlined to a smaller set of continually validated recipes, forming a core recipe set that is strictly controlled and quality assured.
The content used in the Poky repository is basically all from the OpenEmbedded-Core repository, plus an additional BitBake repository, meta-poky, and some documentation.
Repository address: https://git.openembedded.org/openembedded-core/
Contents in the OE-Core repository:

Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

2.4. BitBake

It is a build tool.
The Yocto Project is based on the OpenEmbedded project. From a programmer’s perspective, OpenEmbedded is an automated build system composed of some scripts (shell and Python scripts) and data.
The scripts implement the build process, including fetching (fetch), unpacking (unpack), patching (patch), configuring (if using autotool), compiling (compile), installing (install), packaging (package), staging (to be discussed later), creating installation packages (package_write_ipk), building the filesystem, etc.

The data mainly provides two aspects of information:

  • Build information for specific packages. How to obtain source code and patches? How to build, using Makefile or Autotool? What files need to be output to the target compilation environment? What files need to be installed? Each package requires a description file. In fact, each version of a package has a description file.

  • Dependencies between packages. What host platform tools need to be built first for building package A? What target platform tools? What packages does package A depend on during compilation? What packages does package A depend on during runtime? What packages should a target contain? These dependencies link hundreds of packages together to form a complete system.

The scripts and data were originally intended to work together. As the system improved, their independence grew stronger.The independent scripts are called BitBake. The independent data is the OE metadata.

2.5. Poky

It is a reference implementation of the Yocto Project and a lightweight, open-source Linux distribution.
Repository address: https://git.yoctoproject.org/poky/
Its purpose is:
1) To provide a basic functional distribution that can be used to demonstrate how to customize a distribution;
2) To test Yocto project components, Poky is used to validate the Yocto project;
3) To serve as a tool for users to download the Yocto project.
Poky is not a product-level distribution, but it is a good starting point for customization. Poky is an integration layer on top of OE-Core.
Poky includes a pre-configured Yocto Project build environment, which includes the BitBake build tool, OpenEmbedded build framework, various packages, and components, etc. Poky aims to provide a fast and easily customizable toolchain for building custom Linux systems for embedded devices.
Opening the Poky code repository, it can be seen that Poky is basically BitBake + OE-Core + some of Poky’s own meta. The comparison between the Poky repository and the OE-Core repository is as follows:

Understanding the Relationship Between Yocto, Poky, and OpenEmbedded

The above content is for reference only. Please correct me if there are any mistakes.

Leave a Comment