[Yocto-BBB] 0. Theory, documents, and common commands in the Yocto series
Part of the series Yocto-BBB · 1/21
Translated from the Vietnamese original; wording may still be rough. Read the original →
When following the posts in the series, there are commands I use often, some theory that is easy to forget, and some extra documents. In this post I gather them together so it is easier for you to follow along.
1. Theory
What is the Yocto Project?
bash
Open-source project for building custom Linux operating systems for embedded devices.
What is Poky?
bash
Reference distribution of the Yocto Project.
It is not a Linux distro for end users
but a "demo + template" kit: BitBake, basic metadata (recipes, classes, conf)
and the standard layers (meta, meta-poky, meta-yocto-bsp).
What is OpenEmbedded?
bash
The foundation framework of Yocto, providing the metadata, recipes and tools to build Linux
What is Bitbake?
bash
Yocto's main build tool (like make): reads recipes and runs the build steps.
What are Recipes?
bash
A file describing how to fetch, compile and install a software package (like a build recipe).
What is a Layer?
bash
A collection of recipes, configs, classes… to organise and extend the build (e.g. meta-oe, meta-bbb).
.bb, .bbappend, .bbclass files
bash
.bb: the main recipe.
.bbappend: a file that adds to/overrides the original recipe without editing it directly.
.bbclass: a file for logic shared by many recipes
2. Documents
- Beaglebone Black Reference Manual: https://www.ti.com/lit/ug/spruh73q/spruh73q.pdf?ts=1757666524292&ref_url=https%253A%252F%252Fwww.google.com%252F
- Yocto Project Reference Manual: https://docs.yoctoproject.org/ref-manual/index.html
3. Common commands
3.1 Yocto commands
bash
source poky/oe-init-build-end
#Initialise the build environment, add bitbake to PATH
bash
bitbake
# build
bash
bitbake -c
# build from start to finish
bash
bitbake -e | grep ^
# get the environment variables (env) of recipes
# grep lines starting with
bash
bitbake-layers show-recipes
# Show where every recipe (.bb file) lives, i.e. in which meta-layer
# If you name explicitly, only the meta-layer containing it is shown
bitbake-layers show-recipes
bash
bitbake-layers show-appends
# Same as the command above but shows the paths of append files (bbappend)
bash
bitbake-layers show-layers
# Show every layer in /conf/bbalyers.conf with its Priority
bash
bitbake-layers create-layer
# Create a new layer
bash
bitbake-layers add-layer
# add a layer to bblayers.conf
bash
oe-pkgdata-util lookup-recipe kernel
# Find the kernel recipe so you can create an append file
bash
bitbake -c menuconfig virtual/kernel
# Open menuconfig to change the kernel build config
3.2 Linux commands
bash
lsblk
# list block devices, used to find the SD card device
# for example /dev/sda, /dev/sdb, /dev/mmcblk0
bash
bmaptool copy .wic.xz
# Flash the SD card with the image, for example
bmaptool copy core-image-minimal-beaglebone.wic.xz /dev/mmcblk0
bash
find . -name
# recursive search from the current folder for file-name
bash
df -h
# disk filesystem
# -h : Human readable, shows Gb, Mb, Kb so it is easier to read
bash
free -h
# check memory (RAM) usage