OpenEmbedded User Manual

OpenEmbedded Team

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


Table of Contents

1. Introduction
Overview
History
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
Syntax
Classes
Writing Meta Data (Adding packages)
4. Special features
Debian package naming
Shared Library handling (shlibs)
BitBake Collections
Task-base
Overrides
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
buildroot
crosstool
handmade
7. Using bitbake and OpenEmbedded
Introduction
Configuration
Work space
work directory (tmp/work)
Tasks
Working with a single recipe
Interactive bitbake
Devshell
devshell via inherit
devshell addon
Working in the devshell
Patching and patch management
8. Recipes
Introduction
Syntax of recipes
Recipe naming: Names, versions and releases
Variables
Header
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
Philosophy
Default packages and files
Wildcards
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
Summary
Miscellaneous
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
cvs
svn
git
Mirrors
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