Following is a list of terms and definitions users new to the Yocto Project development environment might find helpful. While some of these terms are universal, the list includes them just in case:
Append Files: Files that append build information to
a recipe file.
Append files are known as BitBake append files and .bbappend
files.
The OpenEmbedded build system expects every append file to have a corresponding
recipe (.bb
) file.
Furthermore, the append file and corresponding recipe file
must use the same root filename.
The filenames can differ only in the file type suffix used (e.g.
formfactor_0.0.bb
and formfactor_0.0.bbappend
).
Information in append files overrides the information in the similarly-named recipe file. For an example of an append file in use, see the "Using .bbappend Files" section.
BitBake:
The task executor and scheduler used by
the OpenEmbedded build system to build images.
For more information on BitBake, see the BitBake documentation
in the bitbake/doc/manual
directory of the
Source Directory.
Build Directory:
This term refers to the area used by the OpenEmbedded build system for builds.
The area is created when you source
the setup
environment script that is found in the Source Directory
(i.e. oe-init-build-env
).
The TOPDIR
variable points to the Build Directory.
You have a lot of flexibility when creating the Build Directory. Following are some examples that show how to create the directory:
Create the Build Directory in your current working directory
and name it build
.
This is the default behavior.
$ source poky-dylan-9.0.2/oe-init-build-env
Provide a directory path and specifically name the build
directory.
This next example creates a Build Directory named YP-9.0.2
in your home directory within the directory mybuilds
.
If mybuilds
does not exist, the directory is created for you:
$ source poky-dylan-9.0.2/oe-init-build-env $HOME/mybuilds/YP-9.0.2
Provide an existing directory to use as the Build Directory
and use the default build
name.
$ source poky-dylan-9.0.2/oe-init-build-env $HOME/mybuilds/
Build System: In the context of the Yocto Project, this term refers to the OpenEmbedded build system used by the project. This build system is based on the project known as "Poky." For some historical information about Poky, see the Poky term.
Classes: Files that provide for logic encapsulation
and inheritance so that commonly used patterns can be defined once and then easily used
in multiple recipes.
Class files end with the .bbclass
filename extension.
Configuration File: Configuration information in various
.conf
files provides global definitions of variables.
The conf/local.conf
configuration file in the
Build Directory
contains user-defined variables that affect each build.
The meta-yocto/conf/distro/poky.conf
configuration file
defines Yocto "distro" configuration
variables used only when building with this policy.
Machine configuration files, which
are located throughout the
Source Directory, define
variables for specific hardware and are only used when building for that target
(e.g. the machine/beagleboard.conf
configuration file defines
variables for the Texas Instruments ARM Cortex-A8 development board).
Configuration files end with a .conf
filename extension.
Cross-Development Toolchain: A collection of software development tools and utilities that allow you to develop software for targeted architectures. This toolchain contains cross-compilers, linkers, and debuggers that are specific to an architecture. You can use the OpenEmbedded build system to build a cross-development toolchain installer that, when run, installs the toolchain that contains the development tools you need to cross-compile and test your software. The Yocto Project ships with images that contain installers for toolchains for supported architectures as well. Sometimes this toolchain is referred to as the meta-toolchain.
Following is a list of toolchain recipes with brief descriptions of each:
gcc-cross-initial
:
The initial compiler needed to bootstrap the toolchain
that runs on the host and is used to build software
for the target.
This tool is a "native" package.
gcc-cross-intermediate
:
The second stage of the bootstrap process that runs
on the host and builds software for the target.
This tool is a "native" package.
gcc-cross
:
The the final stage of the bootstrap process that
results in the cross compiler that runs on the host
and builds software for the target.
If you are replacing the cross compiler toolchain
with a custom version, this is what you must replace.
This tool is a "native" package.
gcc-runtime
:
Runtime libraries from the toolchain bootstrapping
process.
This tool produces a binary for the target.
gcc-crosssdk-initial/intermediate
:
Stage 1 and 2 of the a cross compiler that runs on the
host and builds for the SDK.
Often the SDK is not the same target as the host.
This tool is a "native" binary.
gcc-crosssdk
:
The final stage of the SDK compiler.
This tool is a "native" binary.
The tool runs on the host and builds for the SDK.
gcc-cross-canadian
:
The compiler that runs on the SDK machine and is
included with the SDK that builds software for the
target.
This tool is a "nativesdk" package.
Image: An image is the result produced when BitBake processes a given collection of recipes and related Metadata. Images are the binary output that run on specific hardware or QEMU and for specific use cases. For a list of the supported image types that the Yocto Project provides, see the "Images" chapter in the Yocto Project Reference Manual.
Layer: A collection of recipes representing the core, a BSP, or an application stack. For a discussion on BSP Layers, see the "BSP Layers" section in the Yocto Project Board Support Packages (BSP) Developer's Guide.
Metadata:
The files that BitBake parses when building an image.
In general, Metadata includes recipes, classes, and
configuration files.
In the context of the kernel ("kernel Metadata"),
it refers to Metadata in the meta
branches of the kernel source Git repositories.
OE-Core: A core set of Metadata originating
with OpenEmbedded (OE) that is shared between OE and the Yocto Project.
This Metadata is found in the meta
directory of the
Source Directory.
Package: In the context of the Yocto Project, this term refers to the packaged output from a baked recipe. A package is generally the compiled binaries produced from the recipe's sources. You "bake" something by running it through BitBake.
It is worth noting that the term "package" can, in general, have subtle meanings. For example, the packages referred to in the "The Packages" section are compiled binaries that when installed add functionality to your Linux distribution.
Another point worth noting is that historically within the Yocto Project,
recipes were referred to as packages - thus, the existence of several BitBake
variables that are seemingly mis-named,
(e.g. PR
,
PRINC
,
PV
, and
PE
).
Poky: The term "poky" can mean several things.
In its most general sense, it is an open-source project that was initially developed
by OpenedHand. With OpenedHand, poky was developed off of the existing OpenEmbedded
build system becoming a build system for embedded images.
After Intel Corporation acquired OpenedHand, the project poky became the basis for
the Yocto Project's build system.
Within the Yocto Project source repositories, poky
exists as a separate Git repository
that can be cloned to yield a local copy on the host system.
Thus, "poky" can refer to the local copy of the Source Directory used to develop within
the Yocto Project.
Recipe: A set of instructions for building packages.
A recipe describes where you get source code and which patches to apply.
Recipes describe dependencies for libraries or for other recipes, and they
also contain configuration and compilation options.
Recipes contain the logical unit of execution, the software/images to build, and
use the .bb
file extension.
Source Directory:
This term refers to the directory structure created as a result of either downloading
and unpacking a Yocto Project release tarball or creating a local copy of
the poky
Git repository
git://git.yoctoproject.org/poky
.
Sometimes you might hear the term "poky directory" used to refer to this
directory structure.
The Source Directory contains BitBake, Documentation, Metadata and other files that all support the Yocto Project. Consequently, you must have the Source Directory in place on your development system in order to do any development using the Yocto Project.
For tarball expansion, the name of the top-level directory of the Source Directory
is derived from the Yocto Project release tarball.
For example, downloading and unpacking poky-dylan-9.0.2.tar.bz2
results in a Source Directory whose top-level folder is named
poky-dylan-9.0.2
.
If you create a local copy of the Git repository, then you can name the repository
anything you like.
Throughout much of the documentation, poky
is used as the name of
the top-level folder of the local copy of the poky Git repository.
So, for example, cloning the poky
Git repository results in a
local Git repository whose top-level folder is also named poky
.
It is important to understand the differences between the Source Directory created
by unpacking a released tarball as compared to cloning
git://git.yoctoproject.org/poky
.
When you unpack a tarball, you have an exact copy of the files based on the time of
release - a fixed release point.
Any changes you make to your local files in the Source Directory are on top of the release.
On the other hand, when you clone the poky
Git repository, you have an
active development repository.
In this case, any local changes you make to the Source Directory can be later applied
to active development branches of the upstream poky
Git
repository.
Finally, if you want to track a set of local changes while starting from the same point as a release tarball, you can create a local Git branch that reflects the exact copy of the files at the time of their release. You do this by using Git tags that are part of the repository.
For more information on concepts related to Git repositories, branches, and tags, see the "Repositories, Tags, and Branches" section.
Tasks: Arbitrary groups of software Recipes.
You use tasks to hold recipes that, when built, usually accomplish a single task.
For example, a task could contain the recipes for a company’s proprietary or value-add software.
Or, the task could contain the recipes that enable graphics.
A task is really just another recipe.
Because task files are recipes, they end with the .bb
filename
extension.
Upstream: A reference to source code or repositories that are not local to the development system but located in a master area that is controlled by the maintainer of the source code. For example, in order for a developer to work on a particular piece of code, they need to first get a copy of it from an "upstream" source.