Skip to content
systemcoding.dev
Embedded Linux

What Poky, OpenEmbedded-Core and BitBake Actually Are

BitBake is the build engine, OpenEmbedded-Core holds the recipes, and Poky is the reference bundle that ties them together. Here is how the three fit.

7 min read
Summarize in AI
Flat illustration of a single-board computer with its SoC, memory, header and ports, with the Linux, Raspberry Pi and NXP logos.

Four names turn up in the first hour of any Yocto tutorial: Yocto Project, Poky, OpenEmbedded-Core and BitBake. Readers usually leave that hour believing these are four competing tools, and then wonder which one to install. They are not tools you pick between. They are layers of one stack, and each name answers a different question: who runs the build, what it builds from, what you start your own work from, and who looks after all of it. This post pulls them apart using the Scarthgap 5.0 LTS release and BitBake 2.8, and it assumes you have read nothing else. If you want the whole map afterwards, the complete Yocto guide in this series is the place to go next.

The short version of each name

NameWhat it isWhere you meet it
Yocto ProjectThe umbrella project under the Linux Foundation that hosts the tools, the documentation and the release scheduleThe website, the manuals, the release names such as Scarthgap
BitBakeThe task executor and recipe parser, written in PythonThe bitbake command and the bitbake/ folder
OpenEmbedded-Core (OE-Core)The shared metadata layer: core recipes, classes and configurationThe meta/ folder
PokyA reference distribution and a git repository that bundles BitBake, OE-Core and a few more layersThe repository you clone with git clone

The sections below take them in order from the bottom of the stack to the top.

BitBake: the engine

BitBake reads text files called recipes (.bb), recipe extensions (.bbappend), classes (.bbclass) and configuration files (.conf). From them it works out a list of tasks, orders the tasks by their dependencies, and runs them, often many at once. It does not know what a C compiler is or how to build a Linux kernel. All of that knowledge lives in the metadata it reads. BitBake only provides the language, the parser, the scheduler and the cache of what has already been built.

That separation is the idea that makes the rest make sense. A recipe is a small piece of data that says "fetch these sources, apply these patches, run ./configure, run make, install here". The shell and Python snippets inside it are executed by BitBake as tasks named do_fetch, do_unpack, do_patch, do_configure, do_compile, do_install and so on. BitBake itself ships with the documentation in its own manual, the BitBake User Manual at https://docs.yoctoproject.org/bitbake/, which describes the syntax independent of any distribution.

Because BitBake knows nothing about embedded Linux, you could in principle use it to build something unrelated. In practice every real user feeds it OpenEmbedded metadata.

OpenEmbedded-Core: the shared recipes

OE-Core is the folder named meta. It contains the recipes that almost every embedded Linux image needs: the C library (glibc and musl), busybox, systemd, openssl, python3, the kernel recipes, the toolchain recipes (gcc, binutils), and many small libraries. It also holds the classes that give recipes their shortcuts, such as autotools.bbclass, cmake.bbclass, image.bbclass and kernel.bbclass, plus the default configuration under meta/conf.

OE-Core is a project of its own, maintained jointly with the OpenEmbedded community, and it is the metadata that everything in the Yocto world builds on. It deliberately has no opinion about your product. It does not decide which init system you ship in your final image, because that is a distribution policy. It supplies the parts.

Three words you will keep meeting need defining here.

  • Layer: a directory of metadata with a conf/layer.conf file at its top. meta is a layer. meta-poky is a layer. Your own work will go in a layer.

  • Recipe: one .bb file that describes how to build one piece of software.

  • Metadata: the umbrella word for recipes, classes and configuration. The sources of the software are not metadata.

Poky: the starting point

Poky is what you actually clone. It is a git repository at https://git.yoctoproject.org/poky that contains, side by side, a copy of BitBake, OE-Core, and two further layers. It is built from the same sources as those projects, then assembled by the Yocto Project so that a first build works out of the box. The layout after a clone looks like this:

Text
poky/
├── bitbake/
├── documentation/
├── meta/
├── meta-poky/
├── meta-selftest/
├── meta-skeleton/
├── meta-yocto-bsp/
├── oe-init-build-env
├── scripts/
└── LICENSE.GPL-2.0-only

Reading it from the top: bitbake is the engine, meta is OE-Core, meta-poky holds the Poky distribution policy (the poky distro configuration), and meta-yocto-bsp holds reference board support for a few boards. meta-skeleton is example material and meta-selftest is used by the project's own tests. The script oe-init-build-env is the entry point you source to set up the shell.

The word Poky is used for two things, and mixing them up causes most of the confusion. Poky is the repository above, and it is also the name of the reference distribution, set by DISTRO = "poky". A distribution in this sense is a bundle of policy: the default C library, the default init system, the compiler flags, and the set of features turned on or off. When someone says "Poky is not for production", they mean the distribution policy is generic and you should write your own. They do not mean the repository is unusable. Many products keep Poky's repository as their base and replace the distribution.

How the pieces cooperate in one build

Source the setup script from the top of the cloned tree and ask BitBake to build an image:

Shell
git clone -b scarthgap git://git.yoctoproject.org/poky
cd poky
source oe-init-build-env build
bitbake core-image-minimal

The first line takes the branch named after the release. The third line does three things: it changes into a new directory called build, it creates conf/local.conf and conf/bblayers.conf there, and it puts the bitbake command on your PATH. The fourth line starts the build.

Within that single command, the stack plays out like this. BitBake starts, reads conf/bblayers.conf to learn which layers to use, and reads each layer's conf/layer.conf. It then parses every recipe in those layers. The recipe for core-image-minimal lives in OE-Core, at meta/recipes-core/images/core-image-minimal.bb, and it names the packages the image needs. BitBake follows those names into recipes, builds the toolchain first, and works up. The distribution policy from meta-poky decides, for instance, which package format the packages use through PACKAGE_CLASSES.

When the parse finishes you see a banner that records which layers and versions are in play:

Text
Build Configuration:
BB_VERSION           = "2.8.0"
BUILD_SYS            = "x86_64-linux"
NATIVELSBSTRING      = "ubuntu-24.04"
TARGET_SYS           = "x86_64-poky-linux"
MACHINE              = "qemux86-64"
DISTRO               = "poky"
DISTRO_VERSION       = "5.0.5"
TUNE_FEATURES        = "m64 core2"
TARGET_FPU           = ""
meta
meta-poky
meta-yocto-bsp       = "scarthgap:0123456789abcdef0123456789abcdef01234567"

Your values will differ: the commit hash, the point release and the host string depend on what you cloned and which machine you run it on. Every row is useful. BB_VERSION is the engine, DISTRO is the policy, MACHINE is the target hardware, and the bottom block lists the layers with the branch and commit each was taken from. If a bug report is ever needed, this banner is what the maintainers ask for.

Where the Yocto Project itself fits

The Yocto Project is the organisation that coordinates all of this. It publishes a release every six months (in spring and autumn), gives each a name, and designates some as long-term support releases. Scarthgap, released in April 2024 as version 5.0, is one of those long-term releases, with the support period stated in the project's release information at https://wiki.yoctoproject.org/wiki/Releases. The project also maintains the manuals, the Autobuilder that tests every change, the compatibility programme, and the tools around the edges: devtool, recipetool, runqemu, the extensible SDK and the toolchains. When you hear "Yocto" used alone, it usually means the whole ecosystem.

What this means when you start your own product

You rarely edit Poky itself. You add your own layers next to it, for your board, your applications and your distribution policy, and you leave the cloned layers alone so that you can update them later. Most teams settle on this arrangement:

  1. A clone of Poky (or just BitBake and OE-Core) at a pinned release branch.

  2. A layer for the board's support package, often from the board vendor.

  3. A layer of your own recipes, applications and image definitions.

  4. Optionally, a layer that defines your distribution instead of using poky.

You can use OE-Core and BitBake without cloning the Poky repository at all, and some projects do, pulling each repository separately. The reason to start with Poky is that it is already tested together at each release.

Where the names stop meaning one thing

Three loose usages deserve a warning.

  • "Poky" in older documentation sometimes means the whole build system. In current manuals it means the repository and the reference distribution, so read old posts with that in mind.

  • "OpenEmbedded" can mean the community, the older OpenEmbedded build system that preceded the merge, or the layer index at https://layers.openembedded.org/. Read it from context.

  • "Yocto image" is common shorthand for "an image built with OpenEmbedded metadata". There is no single Yocto image that you download.

Share

Keep reading

Flat illustration of user space above the system call boundary, the kernel and the hardware, with the Linux, C and GNU logos.
Kernels

Write a Pin Controller Driver With pinctrl

Write a Linux 6.12 pin controller driver: pinctrl_desc, pins, groups and functions, the set_mux callback, and the device tree states that consumers select.

8 min read

Get new posts by email

We send one email when a new post is published. No spam.

Unsubscribe in one click. No spam, ever.