This work is licensed under the Creative Commons Attribution License. Welcome to the BitBake User Manual. This manual provides information on the BitBake tool. The information attempts to be as independent as possible regarding systems that use BitBake, such as OpenEmbedded and the Yocto Project. In some cases, scenarios or examples within the context of a build system are used in the manual to help with understanding. For these cases, the manual clearly states the context.
|Published (Last):||16 November 2016|
|PDF File Size:||16.49 Mb|
|ePub File Size:||14.52 Mb|
|Price:||Free* [*Free Regsitration Required]|
This manual provides reference information for the current release of the Yocto Project. The Yocto Project is an open-source collaboration project focused on embedded Linux developers. Amongst other things, the Yocto Project uses the OpenEmbedded build system, which is based on the Poky project, to construct complete Linux images. You can find complete introductory and getting started information on the Yocto Project by reading the Yocto Project Quick Start.
Finally, you can also find lots of Yocto Project information on the Yocto Project website. Using the Yocto Project : Provides an overview of the components that make up the Yocto Project followed by information about debugging images created in the Yocto Project. A Closer Look at the Yocto Project Development Environment : Provides a more detailed look at the Yocto Project development environment within the context of development. Technical Details : Describes fundamental Yocto Project components as well as an explanation behind how the Yocto Project uses shared state sstate cache to speed build time.
Directory Structure : Describes the Source Directory created either by unpacking a released Yocto Project tarball on your host development system, or by cloning the upstream Poky Git repository. Classes : Describes the classes used in the Yocto Project. Tasks : Describes the tasks defined by the OpenEmbedded build system. Images : Describes the standard images that the Yocto Project supports. Features : Describes mechanisms for creating distribution, machine, and image features during the build process using the OpenEmbedded build system.
Entries describe the function of the variable and how to apply them. Variable Context : Provides variable locality or context. Contributing to the Yocto Project : Provides guidance on how you can contribute back to the Yocto Project.
The remainder of this section provides details on system requirements not covered in the Yocto Project Quick Start. Currently, the Yocto Project is supported on the following distributions:. Yocto Project releases are tested against the stable Linux distributions in the following list. The Yocto Project should work on other distributions but validation is not performed against them. In particular, the Yocto Project does not support and currently has no plans to support rolling-releases or development distributions due to their constantly changing nature.
We welcome patches and bug reports, but keep in mind that our priority is on the supported platforms listed below. If you encounter problems, please go to Yocto Project Bugzilla and submit a bug. We are interested in hearing about your experience. The list of packages you need on the host development system can be large when covering all build scenarios using the Yocto Project. This section provides required packages according to Linux distribution and function.
The following list shows the required packages by function given a supported Ubuntu or Debian Linux distribution:. Essentials: Packages needed to build an image on a headless system:. Documentation: Packages needed if you are going to build out the Yocto Project documentation manuals:. The following list shows the required packages by function given a supported Fedora Linux distribution:. Essentials: Packages needed to build an image for a headless system:. The following list shows the required packages by function given a supported openSUSE Linux distribution:.
The following list shows the required packages by function given a supported CentOS Linux distribution:. In order to use the build system, your host development system must meet the following version requirements for Git, tar, and Python:. If your host development system does not meet all these requirements, you can resolve this by installing a buildtools tarball that contains these tools. You can get the tarball one of two ways: download a pre-built tarball or use BitBake to build the tarball.
Downloading and running a pre-built buildtools installer is the easiest of the two methods by which you can get these tools:. Execute the installation script. Here is an example:. During execution, a prompt appears that allows you to choose the installation directory. For example, you could choose the following:. Source the tools environment setup script by using a command like the following:. Of course, you need to supply your installation directory and be sure to use the right file i.
After you have sourced the setup script, the tools are added to PATH and any other environment variables required to run the tools are initialized. The results are working versions versions of Git, tar, Python and chrpath.
Building and running your own buildtools installer applies only when you have a build host that can already run BitBake. In this case, you use that machine to build the. Here are the steps to take to build and run your own buildtools installer:. On the machine that is able to run BitBake, be sure you have set up your build environment with the setup script oe-init-build-env or oe-init-build-env-memres. Once the build completes, you can find the. The installer file has the string "buildtools" in the name.
Transfer the. On the machine that does not meet the requirements, run the. The Yocto Project development team makes the Yocto Project available through a number of methods:. Source Repositories: Working from a copy of the upstream poky repository is the preferred method for obtaining and using a Yocto Project release.
These builds include Yocto Project releases, meta-toolchain tarball installation scripts, and experimental builds. Along with these downloads, you can find lots of other information at this site.
Development using the Yocto Project requires a local Source Directory. You can set up the Source Directory by cloning a copy of the upstream poky Git repository. This chapter describes common usage for the Yocto Project.
The information is introductory in nature as other manuals in the Yocto Project documentation set provide more details on how to use the Yocto Project. This section provides a summary of the build process and provides information for less obvious aspects of the build process.
For general information on how to build an image using the OpenEmbedded build system, see the " Building an Image " section of the Yocto Project Quick Start. The first thing you need to do is set up the OpenEmbedded build environment by sourcing an environment setup script i. If you do not specify a Build Directory, it defaults to a directory named build in your current working directory. A common practice is to use a different Build Directory for different targets.
The target is the name of the recipe you want to build. Or, the target can be the name of a recipe for a specific piece of software such as BusyBox. For more details about the images the OpenEmbedded build system supports, see the " Images " chapter. When building an image using GPL components, you need to maintain your original settings and not switch back and forth applying different versions of the GNU General Public License.
If you rebuild using different versions of GPL, dependency errors might occur due to some components not being rebuilt. Once an image has been built, it often needs to be installed. For information about how to install these images, see the documentation for your particular board or machine. The exact method for debugging build failures depends on the nature of the problem and on the system's area from which the bug originates. Standard debugging practices such as comparison against the last known working version with examination of the changes and the re-application of steps to identify the one causing the problem are valid for the Yocto Project just as they are for any other system.
Even though it is impossible to detail every possible potential failure, this section provides some general tips to aid in debugging. A useful feature for debugging is the error reporting tool. Configuring the Yocto Project to use this tool causes the OpenEmbedded build system to produce error reporting commands as part of the console output.
You can enter the commands after the build completes to log error information into a common database, that can help you figure out what might be going wrong. To see what BitBake runs to generate that log, look at the corresponding run.
Any given package consists of a set of tasks. If you wish to run a task that is not part of the default build chain, you can use the -c option in BitBake. If you wish to rerun a task, use the -f force option. For example, the following sequence forces recompilation after changing files in the work directory.
This sequence first builds and then recompiles matchbox-desktop. The last command reruns all tasks basically the packaging tasks after the compile. Sometimes it can be hard to see why BitBake wants to build other packages before building a given package you have specified. The bitbake -g targetname command creates the pn-buildlist , pn-depends.
These files show what will be built and the package and task dependencies, which are useful for debugging problems. You can use the bitbake -g -u depexp targetname command to display the results in a more human-readable form. You can see debug output from BitBake by using the -D option. The debug output gives more information about what BitBake is doing and the reason behind it.
Each -D option you use increases the logging level. The most common usage is -DDD. The output from bitbake -DDD -v targetname can reveal why BitBake chose a certain version of a package or why BitBake picked a certain provider.
This command could also help you in a situation where you think BitBake did something unexpected. Sometimes issues on the host development system can cause your build to fail. Following are known, host-specific problems. Be sure to always consult the Release Notes for a look at all release-related issues.
Yocto Project Mega-Manual
Current Publication. Wind River Linux. Wind River Linux CD. Getting Started.
Yocto Project Reference Manual
If you read this tutorial you probably know already that BitBake is used as a build tool, primary by the OpenEmbedded and the Yocto project, to build Linux distributions. You might also have noticed that working with BitBake has a somewhat steep learning curve. This document was made to flatten this curve. This document does not tell you everything about BitBake, this is in short not possible, but it tries to explain some of the fundamental functionalities that BitBake uses. Understanding these basics should help if you ever start to write your own BitBake recipes.
A practical guide to BitBake
Toggle navigation. Home Messages Hashtags Subgroups. Search Cancel. Topics Toggle Dropdown Messages Expanded. Return to Calendar Select Month and Year. Ignoring the mailing list issue, I think there is something odd going on with different python versions somewhere in here.