BitBake User Manual
Introduction BitBake is a tool for executing tasks commonly performed by software developers when building systems on a daily basis. BitBake can build Systems consisting of numerous individual pieces of software, or can be used to build a single application. Example tasks that BitBake can execute are fetching source code, applying patches to source code, configuring, compiling, and packaging applications into a complete system, and managing metadata. BitBake abstracts the information for completing individual tasks into files known as recipes. Recipes contain all of the relevant information required by BitBake to complete a given task including dependencies, source file locations, etc. BitBake is similar to GNU Make and other build tools.
History and Goals BitBake was originally a part of the OpenEmbedded project. It was inspired by the Portage package management system used by the Gentoo Linux distribution. On December 7, 2004, OpenEmbedded project team member, Chris Larson split the project into two distinct pieces: BitBake, a generic task executor OpenEmbedded, a metadata set utilized by BitBake. Today, BitBake is the primary basis of the OpenEmbedded project, which is being used to build and maintain a number of projects and embedded Linux distributions such as the Angstrom Distribution and the Yocto Project. Prior to BitBake, no other build tool adequately met the needs of an aspiring embedded Linux distribution. All of the buildsystems used by traditional desktop Linux distributions lacked important functionality, and none of the ad-hoc buildroot systems, prevalent in the embedded space, were scalable or maintainable. Some important original goals for BitBake were: Handle crosscompilation. Handle interpackage dependencies (build time on target architecture, build time on native architecture, and runtime). Support running any number of tasks within a given package, including, but not limited to, fetching upstream sources, unpacking them, patching them, configuring them, etc. Must be Linux distribution agnostic (both build and target). Must be architecture agnostic Must support multiple build and target operating systems (including Cygwin, the BSDs, etc). Must be able to be self contained, rather than tightly integrated into the build machine's root filesystem. There must be a way to handle conditional metadata (on target architecture, operating system, distribution, machine). It must be easy for the person using the tools to supply their own local metadata and packages to operate against. Must make it easy to collaborate between multiple projects using BitBake for their builds. Should provide an inheritance mechanism to share common metadata between many packages. Over time it has become apparent that some further requirements were necessary: Handle variants of a base recipe (native, sdk, multilib). Able to split metadata into layers and allow layers to override each other. Allow representation of a given set of input variables to a task as a checksum. Based on that checksum, allow acceleration of builds with prebuilt components. BitBake satisfies all the original requirements and many more with extensions being made to the basic functionality to reflect the additional requirements. Flexibility and power have always been the priorities. It is highly extensible, supporting embedded Python code and execution of any arbitrary tasks.