OpenEmbedded User Manual

OpenEmbedded Team

This work is licensed under the Creative Commons Attribution License. To view a copy of this license, visit or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.

Table of Contents

1. Introduction
2. Getting Started
OpenEmbedded Directory Structure
Getting BitBake
Getting BitBake Using Subversion
Updating BitBake
Getting OpenEmbedded
Checking Out OpenEmbedded With Git
Updating OpenEmbedded
Changing Branches
Configuring OpenEmbedded
Environment Setup
Local Configuration
Building Software
Useful Target Recipes
3. Metadata
File Layout
Writing Meta Data (Adding packages)
4. Special features
Debian package naming
Shared Library handling (shlibs)
BitBake Collections
5. Common Use-cases/tasks
Creating a new Distribution
Adding a new Machine
Adding a new Package
building from unstable source code
Creating your own image
Using a prebuilt toolchain to create your packages
The toolchain
The prebuilt libraries
Setting up OpenEmbedded
Useful hints
Issues with this approach
Using a new package format
6. Comparing
7. Using bitbake and OpenEmbedded
Work space
work directory (tmp/work)
Working with a single recipe
Interactive bitbake
devshell via inherit
devshell addon
Working in the devshell
Patching and patch management
8. Recipes
Syntax of recipes
Recipe naming: Names, versions and releases
Sources: Downloading, patching and additional files
Directories: What goes where
WORKDIR: The working directory
S: The unpacked source code directory
D: The destination directory
Staging directories
FILESPATH/FILESDIR: Finding local files
Basic examples
Hello world
An autotools package
Dependencies: What's needed to build and/or run the package?
Methods: Inbuilt methods to make your life easier
Packaging: Defining packages and their contents
Default packages and files
Checking the packages
Excluding files
Debian naming
Empty packages
Tasks: Playing with tasks
Classes: The separation of common functionality
Staging: Making includes and libraries available for building
Autoconf: All about autotools
Installation scripts: Running scripts during package install and/or removal
Configuration files
Package relationships
Fakeroot: Dealing with the need for "root"
Native: Packages for the build host
Development: Strategies for developing recipes
Advanced versioning: How to deal with rc and pre versions
Require/include: Reusing recipe contents
Python: Advanced functionality with python
Preferences: How to disable packages
Initscripts: How to handle daemons
Alternatives: How to handle the same command in multiple packages
Example of alternative commands
Using update-alternatives
Volatiles: How to handle the /var directory
Declaring volatiles
Logging and log files
9. Reference
autotools class
oe_runconf / autotools_do_configure
Presetting autoconf variables (the site file)
binconfig class
Directories: Installation variables
Directories: Staging variables
distutils class
fakeroot (device node handling)
How fakeroot works
Root filesystem, images and fakeroot
Recipes and fakeroot
image class
Special node handling (fakeroot)
Device (/dev) nodes
Image types
Package feeds
Image types
Defining images
Available image types
Custom image types
pkgconfig class
rootfs_ipkg class
SECTION variable: Package category
siteinfo class
CONFIG_SITE: The autoconf site files
SRC_URI variable: Source code and patches
http/https/ftp (wget)
file: for patches and additional files
Manipulating SRC_URI
Source distribution (src_distribute_local)
update-alternatives class
Naming of the alternative commands
How alternatives work
The update-alternatives command
Priority of the alternatives
Tracking of the installed alternatives
Using the update-alternatives class
update-rc.d class
Multiple update-rc.d packages