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
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
For example, choose the latest .bb for the dnsmasq project in Yocto version 4.1, with the search criteria set as follows:
The search results are as follows:
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
2.4. BitBake
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
The above content is for reference only. Please correct me if there are any mistakes.