bitbake - FrankBau/meta-marsboard-bsp GitHub Wiki
Bitbake is used by Yocto Project for building a complete linux distribution and individual packages by executing recipes in the bitbake shell.
During execution, bitbake displays progress like:
NOTE: Preparing RunQueue NOTE: Executing SetScene Tasks NOTE: Executing RunQueue Tasks Currently 8 running tasks (655 of 1886): 0: gcc-cross-initial-arm-4.9.2-r0 do_compile (pid 6221) 1: linux-boundary-3.10.53-r0 do_fetch (pid 20242) 2: u-boot-mkimage-native-v2015.01+gitAUTOINC+92fa7f53f1-r0 do_fetch (pid 23785) 3: cross-localedef-native-2.21-r0 do_populate_sysroot (pid 2484) 4: lzo-native-2.09-r0 do_configure (pid 4561) 5: binutils-native-2.24-r0 do_compile (pid 8101) 6: kmod-native-19+gitAUTOINC+fd56638aed-r0 do_configure (pid 20808) 7: intltool-native-0.50.2-r0 do_configure (pid 21330)
Each recipe consists of a number of tasks. For a simple application this could be:
do_fetch: download source code from an online repository (git, svn, tgz, ...)
do_unpack: unpack that code to a local folder (WORKDIR)
do_patch: apply specific patches (listed in the recipe)
do_configure: configure source code for build environment and target (like "configure")
do_compile: do cross-compilation (like "make")
do_install: install build artefacts (like "make install")
...
Recipes (.bb) already exist for many applications, drivers, etc.. Most common build technologies (make, cmake, autotools, configure,...) are already supported and can be reused by inheriting from recipe classes (*.bbclass).
Recipes are organized in layers. Different layers are usually maintained by different people /organizations.
While bitbake is running, it's a great time to check the ../source
folder for layers and recipes.
Here is a good overview about the relation between recipes and packages: https://blogs.mentor.com/chrishallinan/blog/2012/04/27/more-on-yocto-terminology-recipes-and-packages/
- show the packages that a recipe (example: pulseaudio) builds:
bitbake -e pulseaudio | grep ^PACKAGES=
- show available tasks for a recipe:
bitbake -c listtasks
- show recipe dependencies graphically:
bitbake -g -u depexp
- show version of recipes used:
bitbake -s | grep pulseaudio
- show layers:
bitbake-layers show-layers
- find certain recipes in all layers:
bitbake-layers show-recipes "*-image-*"
- show recipe dependencies:
bitbake-layers show-cross-depends
- show overlayed recipes:
bitbake-layers show-overlayed
- show appended recipes:
bitbake-layers show-appends
- http://elinux.org/Bitbake_Cheat_Sheet
- https://www.yoctoproject.org/sites/default/files/elc-e_2013_devday_introyocto_0.pdf
- http://www.yoctoproject.org/docs/latest/dev-manual/dev-manual.html
- http://www.yoctoproject.org/docs/latest/bitbake-user-manual/bitbake-user-manual.html
- https://community.freescale.com/docs/DOC-94849
- http://aosabook.org/en/yocto.html
- http://www.openembedded.org/wiki/
- http://www.crashcourse.ca/wiki/index.php/BitBake_Tutorial
- http://hambedded.org/blog/2012/11/24/from-bitbake-hello-world-to-an-image/