agentsclimarketplace

Bitbake debugger

Skill BenGardiner/bitbake-yocto-agent-skills/bitbake-debugger

Agent skills for making and fixing bitbake stuff

Install
npx -y skills add BenGardiner/bitbake-yocto-agent-skills --skill bitbake-debugger

Assembled from the repository path, not quoted from the project. Check it against their README if it does not work.

One thing to look at

  • 1 stars1 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.

What its author says it does

Copied from the file, not written here

Troubleshoots Yocto/BitBake build failures, task errors, and sstate cache misses. Use when a build fails with a specific error, a task needs isolation in a devshell, or a variable value needs tracing via bitbake-getvar. Do not use for initial metadata setup, generic Linux debugging, or analyzing package dependencies in a successful image.

SKILL.md

2.8 KB, as published. Nobody here has run it

BitBake Debugging Procedures

Follow these steps to resolve BitBake failures, variable overrides, and cache issues.

1. Interrogate the Datastore

Use these commands to discover where variables are defined or overridden.

  • Trace a specific variable: Run bitbake-getvar -r <recipe> <VARIABLE_NAME> to see a history of every operation (set, append, prepend) and the specific file/line responsible for each change.
  • Dump the full environment: Run bitbake -e <recipe> to view the entire environment after parsing. Pipe the output to grep to find variable definitions or understand why an override (like _append) is not functioning.
  • Variable/Environment Inspector: Use the helper script to extract a specific variable value quietly.
    ./.gemini/skills/bitbake-debugger/scripts/get_recipe_env.sh <VARIABLE_NAME> [recipe_name]
    
    This script sources the environment and uses bitbake-getvar --value to return only the requested string.

2. Isolate and Reproduce Task Failures

When a specific task (e.g., do_compile) fails, isolate its execution environment rather than digging through the main BitBake output.

  • Launch a devshell: Run bitbake <recipe> -c devshell to open an interactive shell mimicking the exact environment of the failing task.
  • Trace script execution: Once inside the devshell (you will be in the source directory), locate the task's execution script at ../temp/run.do_<task>. Edit this file and add set -x at the top to enable a real-time command trace, then execute it.

3. Debug Task Signatures (Sstate Cache Issues)

If BitBake unexpectedly rebuilds a component or fails to rebuild one, investigate the task signatures.

  • Find signature differences: Run bitbake <recipe> -S printdiff. This attempts to find the closest match in the sstate cache and uses bitbake-diffsigs to report exactly which variable or dependency changed to cause the cache miss.

4. Advanced Logging and Output

  • Enable maximum verbosity: Add -DDD to the BitBake command to reveal why BitBake chose a specific provider or version for a package.
  • Inject custom logs: For custom recipes, inject markers into the logs by adding bb.debug(level, "message") or bb.warn("message") within Python tasks. Run the build with the -v flag to ensure these appear in the terminal.
  • Visualize dependencies: Run bitbake -g <target> to generate dependency graphs to visualize build order and complex dependencies.

Keep looking

Skills are one crate of 328,083. Ordering is by how many stacks a row turns up in, so the top of any crate is what has actually been picked rather than what has the most stars.