agentleFS
processmissionprocessmission/oh-my-qemu/skills/qemu-build/SKILL.md

qemu-build

Skill57 starsChanged 4 months agoMITView on GitHub

Use for configuring, reusing, building, or diagnosing named QEMU build directories under source-root builds/, including target-specific, debug, sanitizer, and trace configurations.

The file

We split this skill into the rules it gives an agent

9 rules. About 0 are common, 5 are distinctive, and 4 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈5

    Distinctive · estimate

    This author's own choices. Worth a look.

  • 4

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Before changing source or mutable artifacts, record the workspace root, revision, git status --short, pre-existing changes, goal, scope, …

    line 24
  2. Very specific:

    Keep QEMU builds under source-root builds/build-<target>/.

    line 31
  3. Very specific:

    Use a descriptive directory under source-root builds/ for every QEMU configuration.

    line 50
  4. Very specific:

    Do not configure QEMU in build/, the source root, or the task output/ directory.

    line 58
  5. Distinctive:

    Before creating or reconfiguring anything, inspect:

    line 62
  6. Distinctive:

    Create another named directory for a materially different target or configuration, such as sanitizer versus non-sanitizer.

    line 70
  7. Distinctive:

    Do not delete a named build directory merely to make an error disappear.

    line 116
  8. Distinctive:

    Prefer narrow targets when possible:

    line 127
  9. Distinctive:

    Use verbose mode only for diagnosis:

    line 134

≈ “Common” is an estimate: at least 1 in 5 of the 213,897 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

QEMU Build

Audit workflow

For non-trivial workspace writes, use a stable .oh-my-qemu/<task-slug>/ directory and create only needed entries:

.oh-my-qemu/<task-slug>/
├── audit.md      # Baseline, scope, decisions, evidence, verification, and gaps
├── commands.md   # Redacted commands, working directories, and results
├── logs/         # Decisive build, test, runtime, or diagnostic logs
├── scripts/      # Temporary scripts, probes, parsers, and harnesses
└── output/       # Generated deliverables, dependencies, and non-QEMU binaries

Before changing source or mutable artifacts, record the workspace root, revision, git status --short, pre-existing changes, goal, scope, and acceptance checks in audit.md. Log exact redacted commands and results in commands.md; record revisions, configurations, tool versions, and hashes when they affect reproducibility. Separate observations from inferences and edit source only when requested.

Keep QEMU builds under source-root builds/build-<target>/; put third-party dependencies and non-QEMU binaries in task output/. Before writing audit artifacts or configuring QEMU in a Git worktree, add .agents/, .oh-my-qemu/, and builds/ to the repository-local file from git rev-parse --git-path info/exclude; preserve existing entries and avoid duplicates. Never stage or commit those directories. At handoff, verify them absent from git status --short. Report the task directory and unresolved gaps.

QEMU upstream boundary

QEMU's official GitLab and mailing lists are upstream project channels. A patch becomes an upstream contribution when sent to the mailing-list recipients selected through MAINTAINERS; do not prepare or send agent-generated patches for that submission. Local branches, commits, patch files, pushes, and pull requests are not by themselves QEMU upstream contributions. Perform those Git actions only when requested and follow the workspace's Git policy.

Build directory rule

Use a descriptive directory under source-root builds/ for every QEMU configuration. Derive the name from the target and important variant, for example:

  • builds/build-aarch64/;
  • builds/build-riscv64-debug/;
  • builds/build-x86_64-asan/.

Do not configure QEMU in build/, the source root, or the task output/ directory. Reuse a named build only when its recorded configuration matches the task.

Before creating or reconfiguring anything, inspect:

  • <build-dir>/config.log for the configure command;
  • <build-dir>/build.ninja for configured state;
  • <build-dir>/pyvenv/bin/meson for Meson commands;
  • <build-dir>/meson-logs/meson-log.txt for configure failures;
  • <build-dir>/meson-info/intro-buildoptions.json for options.

Create another named directory for a materially different target or configuration, such as sanitizer versus non-sanitizer.

Configure

From the QEMU source root:

mkdir -p builds/build-aarch64
cd builds/build-aarch64
../../configure --target-list=aarch64-softmmu

Common targets:

  • x86_64-softmmu
  • aarch64-softmmu
  • riscv64-softmmu
  • loongarch64-softmmu
  • x86_64-linux-user
  • aarch64-linux-user

Useful options:

  • --enable-debug
  • --enable-debug-info
  • --enable-trace-backends=log
  • --enable-asan
  • --enable-tsan
  • --enable-ubsan

From that build directory, use ../../configure --help for the checked-out QEMU version.

Reconfigure safely

Reconstruct the old command from <build-dir>/config.log, then change only the needed option.

Preserve:

  • target list unless the task changes it;
  • debug/sanitizer/trace options;
  • dependency/accelerator options;
  • build directory evidence until diagnosis is complete.

Do not delete a named build directory merely to make an error disappear. Keep its decisive logs until the failure is classified.

Build

From the source root:

ninja -C builds/build-aarch64

Prefer narrow targets when possible:

ninja -C builds/build-riscv64 qemu-system-riscv64
ninja -C builds/build-riscv64 tests/qtest/<test-name>

Use verbose mode only for diagnosis:

ninja -C builds/build-riscv64 -v <target>

Failure classification

  • Configure: missing dependency, unsupported option, Python/Meson issue, compiler mismatch.
  • Compile: API/type/include/feature guard mismatch.
  • Link: missing object in Meson, missing dependency, target-specific source not linked.
  • Generated source: QAPI, trace-events, decodetree, or Meson generator input.
  • Toolchain/host: sanitizer or compiler incompatibility.

For generated-source failures, fix the generator input, not generated files in builds/build-<target>/.

Report

Write/report:

  • PASS/FAIL/INCONCLUSIVE;
  • source root and build dir;
  • exact command;
  • target list and key options;
  • decisive failure excerpt;
  • full log paths under .oh-my-qemu/<task-slug>/;
  • what the build proves.

Upstream references

  • QEMU code provenance and AI policy: docs/devel/code-provenance.rst.
  • Testing overview: docs/devel/testing/main.rst.

Download now (ZIP)

Does it work?

Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.

No reviews yet

People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.

  • It worked
  • Partly
  • It didn't
What did you use it for? e.g. Reviewing pull requests in a Rails app

Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.

Your trail

Files you open will collect here, so you can find them again.

Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.

Now do this for your own.

Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.