bb
Bitbake build tool for embedded Linux
TLDR
Evaluate an expression
Evaluate a script file
Bind [i]nput to a sequence of lines from stdin
Bind [I]nput to a sequence of EDN (Extensible Data Notation) values from stdin
SYNOPSIS
bb [options] [target_recipe ...]
PARAMETERS
-c task
Execute a specific task for the target recipe(s), e.g., 'do_compile', 'do_install', 'do_clean'.
-k
Continue building as much as possible after encountering an error, rather than stopping immediately.
-s
List all available recipes in the current build configuration.
-e
Dump the entire global environment and configuration, useful for debugging.
--dry-run
Perform all parsing and dependency resolution but do not actually execute any build tasks.
-g
Generate a dependency graph of the build tasks, often in dot format.
-D
Increase the debug level for more verbose output during the build process.
--runall=PN
Execute all defined tasks for a specified package name (PN).
-h
Display the help message and exit.
-v
Display the version information and exit.
DESCRIPTION
The command 'bb' is not a standard, standalone Linux utility found in most general-purpose distributions. However, it is an extremely common alias for bitbake, the core build automation tool of the Yocto Project and OpenEmbedded.
Bitbake is a sophisticated, make-like build system designed for cross-compilation and the creation of complete Linux distributions for embedded devices. It manages complex dependencies, parses 'recipes' (typically '.bb' files) that define how software components are fetched, configured, compiled, and packaged. It can build in parallel, leverage shared state caching for incremental builds, and generate entire root filesystems, bootloaders, kernels, and toolchains for various target architectures. Its primary goal is to provide a reproducible and customizable build environment for embedded Linux development.
CAVEATS
The command 'bb' is almost exclusively used as an alias for 'bitbake' within the context of embedded Linux development, particularly with the Yocto Project and OpenEmbedded. If you're not working with these projects, 'bb' is unlikely to be a pre-existing command on your system.
Bitbake itself has a steep learning curve and requires a significant understanding of its recipe format, layers, and configuration files (like 'local.conf' and 'bblayers.conf'). It is not a general-purpose build tool for typical application development but is highly specialized for creating custom Linux distributions and SDKs.
HISTORY
Bitbake was originally developed by Chris Larson for the OpenEmbedded project, which aimed to provide a comprehensive build framework for embedded Linux. It later became the central build engine for the Yocto Project, an open-source collaboration project that helps developers create custom Linux-based systems for embedded products. Its development has focused on handling the complexities of cross-compilation, managing vast numbers of software packages, and ensuring build reproducibility for diverse embedded hardware architectures.