Bitbake options
Contents
BitBake options
BitBake is a make-like build tool with the special focus of distributions and packages for embedded Linux cross compilation although it is not limited to that. It is derived from Portage, which is the package management system used by the Gentoo Linux distribution. BitBake existed for some time in the OpenEmbedded project until it was separated out into a standalone, maintained, distribution-independent tool. BitBake is co-maintained by the Yocto Project and the OpenEmbedded project.
BitBake Recipes
BitBake recipes specify how a particular package is built. It includes all the package dependencies, source code locations, configuration, compilation, build, install and remove instructions. It also stores the metadata for the package in standard variables.
The BitBake recipes consist of the source URL (http, https, ftp, cvs, svn, git, local file system) of the package, dependencies and compile or install options. During the build process they are used to track dependencies, performing native or cross-compilation of the package and package it so that it is suitable for installation on the local or a target device. It is also possible to create complete images consisting of a root file system and kernel. As a first step in a cross-build setup, the framework will attempt to create a cross-compiler toolchain suited for the target platform.
Basic options
Build performance tuning for OE/Yocto
- bitbake -h
bitbake -h Usage: bitbake [options] [recipename/target ...]
Executes the specified task (default is 'build') for a given set of target recipes (.bb files). It is assumed there is a conf/bblayers.conf available in cwd or in BBPATH which will provide the layer, BBFILES and other configuration information.
Options:
--version show program's version number and exit -h, --help show this help message and exit -b BUILDFILE, --buildfile=BUILDFILE Execute tasks from a specific .bb recipe directly. WARNING: Does not handle any dependencies from other recipes. -k, --continue Continue as much as possible after an error. While the target that failed and anything depending on it cannot be built, as much as possible will be built before stopping. -a, --tryaltconfigs Continue with builds by trying to use alternative providers where possible. -f, --force Force the specified targets/task to run (invalidating any existing stamp file). -c CMD, --cmd=CMD Specify the task to execute. The exact options available depend on the metadata. Some examples might be 'compile' or 'populate_sysroot' or 'listtasks' may give a list of the tasks available. -C INVALIDATE_STAMP, --clear-stamp=INVALIDATE_STAMP Invalidate the stamp for the specified task such as 'compile' and then run the default task for the specified target(s). -r PREFILE, --read=PREFILE Read the specified file before bitbake.conf. -R POSTFILE, --postread=POSTFILE Read the specified file after bitbake.conf. -v, --verbose Output more log message data to the terminal. -D, --debug Increase the debug level. You can specify this more than once. -n, --dry-run Don't execute, just go through the motions. -S DUMP_SIGNATURES, --dump-signatures=DUMP_SIGNATURES Dump out the signature construction information, with no task execution. Parameters are passed to the signature handling code, use 'none' if no specific handler is required. -p, --parse-only Quit after parsing the BB recipes. -s, --show-versions Show current and preferred versions of all recipes. -e, --environment Show the global or per-package environment complete with information about where variables were set/changed. -g, --graphviz Save dependency tree information for the specified targets in the dot syntax. -I EXTRA_ASSUME_PROVIDED, --ignore-deps=EXTRA_ASSUME_PROVIDED Assume these dependencies don't exist and are already provided (equivalent to ASSUME_PROVIDED). Useful to make dependency graphs more appealing -l DEBUG_DOMAINS, --log-domains=DEBUG_DOMAINS Show debug logging for the specified logging domains -P, --profile Profile the command and save reports. -u UI, --ui=UI The user interface to use (e.g. knotty, hob, depexp). -t SERVERTYPE, --servertype=SERVERTYPE Choose which server to use, process or xmlrpc. --revisions-changed Set the exit code depending on whether upstream floating revisions have changed or not. --server-only Run bitbake without a UI, only starting a server (cooker) process. -B BIND, --bind=BIND The name/address for the bitbake server to bind to. --no-setscene Do not run any setscene tasks. sstate will be ignored and everything needed, built. --remote-server=REMOTE_SERVER Connect to the specified server. -m, --kill-server Terminate the remote server. --observe-only Connect to a server as an observing-only client. --status-only Check the status of the remote bitbake server.
Advanced options
- bitbake -c listtasks core-image-minimal
bitbake -c listtasks core-image-minimal do_build Default task for a recipe - depends on all other normal tasks required to 'build' a recipe do_bundle_initramfs Combines an initial ramdisk image and kernel together to form a single image do_checkuri Validates the SRC_URI value do_checkuriall Validates the SRC_URI value for all recipes required to build a target do_clean Removes all output files for a target do_cleanall Removes all output files, shared state cache, and downloaded source files for a target do_cleansstate Removes all output files and shared state cache for a target do_compile Compiles the source in the compilation directory do_configure Configures the source by enabling and disabling any build-time and configuration options for the software being built do_devshell Starts a shell with the environment set up for development/debugging do_fetch Fetches the source code do_fetchall Fetches all remote sources required to build a target do_install Copies files from the compilation directory to a holding area do_listtasks Lists all defined tasks for a target do_package Analyzes the content of the holding area and splits it into subsets based on available packages and files do_package_setscene Analyzes the content of the holding area and splits it into subsets based on available packages and files (setscene version) do_package_write_rpm Creates the actual RPM packages and places them in the Package Feed area do_package_write_rpm_setscene Creates the actual RPM packages and places them in the Package Feed area (setscene version) do_packagedata Creates package metadata used by the build system to generate the final packages do_packagedata_setscene Creates package metadata used by the build system to generate the final packages (setscene version) do_patch Locates patch files and applies them to the source code do_populate_lic Writes license information for the recipe that is collected later when the image is constructed do_populate_lic_setscene Writes license information for the recipe that is collected later when the image is constructed (setscene version) do_populate_sdk Creates the file and directory structure for an installable SDK do_populate_sysroot Copies a subset of files installed by do_install into the sysroot in order to make them available to other recipes do_populate_sysroot_setscene Copies a subset of files installed by do_install into the sysroot in order to make them available to other recipes (setscene version) do_rootfs Creates the root filesystem (file and directory structure) for an image do_unpack Unpacks the source code into a working directory
bitbake-layers
- bitbake-layers
bitbake-layers usage: bitbake-layers <command> [arguments] Available commands: help display general help or help on a specified command show-recipes list available recipes, showing the layer they are provided by show-cross-depends figure out the dependency between recipes that crosses a layer boundary. show-appends list bbappend files and recipe files they apply to flatten flattens layer configuration into a separate output directory. show-layers show current configured layers show-overlayed list overlayed recipes (where the same recipe exists in another layer)
- bitbake-layers show-layers
bitbake-layers show-layers layer path priority ========================================================================== meta /home/koan/yocto/poky/meta 5 meta-yocto /home/koan/yocto/poky/meta-yocto 5 meta-yocto-bsp /home/koan/yocto/poky/meta-yocto-bsp 5 meta-oe /home/koan/yocto/poky/meta-openembedded/meta-oe 6
- bitbake-layers show-overlayed
bitbake-layers show-overlayed Parsing recipes..done. === Overlayed recipes === xserver-nodm-init: meta-oe 2.0 meta 1.0