1---2name: yocto-build-debug3description: Advanced Yocto Project build and debug skill for AI coding agents. Use for BitBake parse failures, fetch failures, patch/configure/compile/install/package failures, QA errors, missing providers, layer dependency errors, sstate/hash/signature problems, long build times, disk pressure, host dependency issues, TMPDIR confusion, and commands such as bitbake, bitbake-layers, bitbake -e, bitbake -g, bitbake-diffsigs, devtool, oe-pkgdata-util, runqemu, and testimage.4---56# Yocto Build Debug78## Workflow9101. Identify the build entrypoint: Makefile, `kas`, `repo`, `oe-init-build-env`, container script, CI job, or vendor wrapper.112. Confirm `MACHINE`, `DISTRO`, `BBLAYERS`, `TMPDIR`, `DL_DIR`, `SSTATE_DIR`, and target image/recipe.123. Reproduce the smallest failing command. Prefer parse, fetch, or one task over a full image rebuild.134. Inspect logs before editing metadata. Use [yocto_log_triage.py](scripts/yocto_log_triage.py) with the build directory for a quick scan.145. Classify the failure: parse, layer, provider, fetch, patch, configure, compile, install, package, QA, image, test, or signature.156. Route metadata questions to `$bitbake-metadata`; route board boot/deploy issues to `$yocto-deploy-flash` or `$yocto-bsp-bringup`.1617## Commands1819```sh20bitbake-layers show-layers21bitbake-layers show-recipes RECIPE22bitbake-layers show-appends23bitbake -e RECIPE24bitbake -c listtasks RECIPE25bitbake -c TASK -f RECIPE26bitbake -g RECIPE27bitbake-diffsigs SIGDATA_A SIGDATA_B28oe-pkgdata-util list-pkgs29```3031## References3233- [failure-playbook.md](references/failure-playbook.md): failure categories and fixes.34- [performance-cache.md](references/performance-cache.md): sstate, downloads, disk, parallelism, and reproducibility debugging.3536## Guardrails3738- Do not recommend deleting `tmp/` or `sstate-cache/` until narrower evidence has been checked.39- Do not silence QA with `INSANE_SKIP` until the package/file/license root cause is known.40- Do not assume deploy output is under `tmp/`; many builds use `tmp-glibc`, multiconfig paths, or custom `TMPDIR`.41- Do not change provider/version policy globally without checking affected recipes and images.