Skip to content
phuonglab edited this page Feb 14, 2022 · 3 revisions

Title

1. Bitbake Cheat Sheet

1.1. Command Line options

bitbake command

Description

bitbake <package> -c <task>

Execute a particular package’s task. Default Tasks names: fetch, unpack, patch, configure, compile, install, package, package_write, configme, kernel_configcheck, compile_kernelmodules, clean, cleanall, cleansstate, and build, listtasks, populate_sysroot.

Example: To (force) compiling a kernel and then build, type:

$ bitbake linux-imx -f -c compile

$ bitbake linux-imx

bitbake <image>

Bake an image (add -k to continue building even errors are found in the tasks execution)

bitbake <image > -g -u depexp

Show the package dependency for image.

Example: To show all packages included on fsl-image-gui

$ bitbake fsl-image-gui -g -u depexp

NOTE: This command will open a UI window, so it must be execute on a console inside the host machine (either virtual or native).

bitbake <package> -c devshell

Open a new shell where with neccesary system values already defined for package

hob

bitbake frontend/GUI.

bitbake <package> -c listtasks

List all tasks for package

bitbake virtual/kernel -c menuconfig

Interactive kernel configuration

bitbake <image> -c fetchall(or --runall=fetch)

Fetch sources for a particular image

bitbake-layers show-layers

Show layers

bitbake-layers show-recipes "-image-"

Show possible images to bake. Without "-images-", it shows ALL recipes

bitbake –v <image> 2>&1

tee image_build.log

2. Control the number of parallel builds

  • add this lines to file [your_yocto_build_dir]/conf/local.conf

    BB_NUMBER_THREADS = "2"
    PARALLEL_MAKE = "-j 2"
  • run command source setup-environment ./your_build_folder

Clone this wiki locally