Files that hold global definitions of variables, user-defined variables, and hardware configuration information.
A collection of related recipes. Layers allow you to consolidate related metadata to customize your build.
A key element of the Yocto Project is the Metadata that is used to construct a Linux distribution and is contained in the files that the OpenEmbedded build system parses when building an image.
The terms “BitBake” and “build system” are sometimes used for the OpenEmbedded Build System.
Is a generic task execution engine that allows shell and Python tasks to be run efficiently and in parallel while working within complex inter-task dependency constraints
OE-Core is metadata comprised of foundation recipes, classes, and associated files that are meant to be common among many different OpenEmbedded-derived systems, including the Yocto Project.
In the context of the Yocto Project, this term refers to a recipe’s packaged output produced by BitBake (i.e. a “baked recipe”). A package is generally the compiled binaries produced from the recipe’s sources. You “bake” something by running it through BitBake.
The most common form of metadata.
- User manual
- Interprets metadata, decides what tasks are required to run, and executes those tasks.
- Controls how software is built.
- GNU Make achieves its control through “makefiles”, while BitBake uses “recipes”.
- Includes a fetcher library for obtaining source code from various places.
bitbake recipe
bitbake -h
-c CMD
Specify the task to execute-k
Continue as much as possible after an error-f
Force the specified targets/task
bitbake <recipe> -c listtasks
- Information about the package (author, homepage, license…)
- Version of the recipe
- Existing dependencies (both build and runtime dependencies)
- Where the source code resides and how to fetch it
- Whether the source code requires any patches, where to find them, and how to apply them
- How to configure and compile the source code
- How to assemble the generated artifacts into one or more installable packages
- Where on the target machine to install the package or packages created
- Extend or override information in an existing recipe file
- See the online Style Guide
- Define various configuration variables that govern the project’s build process.
- Machine configuration
- Distribution configuration
- Compiler tuning
- User configuration
- Contain information that is useful to share between metadata files
- A class usually contains definitions for standard basic tasks such as:
- Fetch, unpack, configure, compile, install, package
The online documentation can be found here
- See documentation:
ye d var
- View package content:
ye pv recipe
- Expand variable:
ye x recipe var
- Get workdir location:
ye wd recipe
- See logs:
ye l recipe
6.1 Recipe Overview: Online Image
<packagename>_<version>.bb
${PN}_${PV}.bb
- Summary and Description
- Package information - Homepage, sections
- License - License checksum
- Package dependency
- Where to fetch source code
- Where unpacked recipe source code resides
- Classes that I need to inherit
- Tasks
- Runtime dependencies
- etc …
DESCRIPTION = ""
LICENSE = ""
LIC_FILES_CHKSUM = ""
DEPENDS = ""
SRC_URI = ""
do_configure() {
:
}
do_compile() {
:
}
do_install() {
:
}
RDEPENDS_${PN} += ""
SUMMARY = "Short summary of package"
DESCRIPTION = "A piece of more detailed information about the package"
6.6 License: Documentation
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302"
6.7 Package dependency: Documentation
Lists a recipe’s build-time dependencies
DEPENDS = "foo"
DEPENDS = "foo-native bar-native"
DEPENDS += "foo bar"
DEPENDS_append = "bar"
Use ye
to get final variable value
6.8 Fetching: Documentation
- Local file fetcher
- HTTP/FTP wget fetcher
- Git Fetcher
SRC_URI = "file://relativefile.patch"
SRC_URI = "http://oe.handhelds.org/not_there.aac"
SRC_URI = "git://git.oe.handhelds.org/git/vip.git;protocol=http"
Use ye
to get final variable value
6.9 Unpacking: Documentation
S = "{WORKDIR}/${PN}-${PV}"
S = "${WORKDIR}/git"
Use ye
to get final variable value
6.11 Patching: Documentation
SRC_URI += "file://foo.patch"
SRC_URI_append = " file://foo.patch"
- Why do I need to inherit classes?
- How do I know what classes I need?
- Lists runtime dependencies of a package
- These dependencies are other packages that must be installed in order for the package to function correctly
Use ye
to get final variable value
ye d variable
- Documentation
- Is a class that exists to help you maintain the quality of your build output
- It records information about the contents of each package and image
- Highlight unexpected and possibly unwanted changes in the build output
INHERIT += "buildhistory"
BUILDHISTORY_COMMIT = "1"
- image-files: A directory containing selected files from the root filesystem
- files-in-image.txt: A list of files in the image
- installed-package-names.txt: A list of installed packages by name only
- installed-package-sizes.txt: A list of installed packages ordered by size
- installed-packages.txt: A list of installed packages with full package filenames