Top 20 BitBake Variables
Recipe identity
PN – Package name (usually recipe filename without version).
PV – Package version.
PR – Recipe revision (default r0).
P – Combination of PN and PV (e.g., foo-1.2).
Source and build dirs
SRC_URI – Where to fetch source (git, tarball, patches).
S – Source directory inside ${WORKDIR}.
WORKDIR – Work directory for this recipe.
B – Build directory (default = ${S}, but sometimes separate).
D – Destination dir for do_install (staging before packaging).
Build control
DEPENDS – Build-time dependencies (other recipes).
RDEPENDS – Runtime dependencies.
EXTRA_OECONF – Extra flags passed to ./configure.
EXTRA_OEMAKE – Extra flags passed to make.
FILES – Files included in binary packages.
PACKAGES – List of output packages generated from recipe.
Compiler & environment
CFLAGS – C compiler flags.
LDFLAGS – Linker flags.
CPPFLAGS – Preprocessor flags.
Staging & install
bindir, sbindir, libdir, includedir – Standard install dirs.
prefix, exec_prefix – Prefix for installation paths (default /usr).
Why these matter
PN, PV, PR define what you’re building.
SRC_URI, S, WORKDIR, B, D define where it builds.
DEPENDS, RDEPENDS define dependencies.
EXTRA_OECONF, EXTRA_OEMAKE, CFLAGS, LDFLAGS control how it builds.
FILES, PACKAGES, bindir… define what gets packaged and where it lands.