Skip to content

BitBake Command Reference

Quick reference for the most commonly used BitBake commands during Engicam BSP development.


Build Commands

Command Description
bitbake <image> Build a full image (e.g. engicam-evaluation-image)
bitbake <recipe> Build a single recipe
bitbake <recipe> -c <task> Run a specific task (e.g. compile, install, package)
bitbake <recipe> -c clean Clean build artifacts for a recipe
bitbake <recipe> -c cleanall Clean artifacts + downloads + sstate cache
bitbake <recipe> -f Force rebuild even if up to date
bitbake <recipe> -c menuconfig Open kernel/U-Boot menuconfig

Inspection Commands

Command Description
bitbake <recipe> -c listtasks List all available tasks for a recipe
bitbake -s Show all available recipes and their versions
bitbake -e <recipe> Dump the full environment for a recipe
bitbake -g <recipe> Generate dependency graph files
bitbake -g -u taskexp <recipe> Open graphical dependency viewer

Layer Commands

Command Description
bitbake-layers show-layers List all configured layers
bitbake-layers show-recipes List all recipes across layers
bitbake-layers show-overlayed Show recipes overriding another layer
bitbake-layers add-layer <path> Add a layer to bblayers.conf

Useful Task Combinations

# Rebuild kernel from scratch
bitbake virtual/kernel -c cleanall && bitbake virtual/kernel

# Rebuild U-Boot from scratch
bitbake virtual/bootloader -c cleanall && bitbake virtual/bootloader

# Build and install a recipe into the sysroot
bitbake <recipe> -c populate_sysroot

# Generate the root filesystem only
bitbake <image> -c rootfs

Verbosity Flags

Flag Effect
-v Verbose output
-DDD Maximum debug output
--help Show all available options

Common Variables

Set in conf/local.conf or a distro/machine config:

Variable Purpose
MACHINE Target machine (e.g. imx8mp-icore)
DISTRO Distribution (e.g. fsl-imx-wayland)
IMAGE_ROOTFS_SIZE Root filesystem size in KB
EXTRA_IMAGE_FEATURES Add features like debug-tweaks, ssh-server-openssh
BB_NUMBER_THREADS Parallel BitBake tasks
PARALLEL_MAKE Parallel make jobs (-j N)