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.
In this repository17 other files it gives its agents.
- AGENTS.mdAGENTS.md
- qemu-agent-feedbackSkill
- qemu-board-modelingSkill
- qemu-boot-runSkill
- qemu-debugSkill
- qemu-imageSkill
- qemu-kernel-buildSkill
- qemu-linux-bootSkill
- qemu-model-verificationSkill
- qemu-peripheral-modelingSkill
- qemu-qtestSkill
- qemu-register-extractionSkill
- qemu-rst-documentationSkill
- qemu-tcg-backendSkill
- qemu-tcg-frontendSkill
- qemu-uboot-buildSkill
- qemu-workflowSkill
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
- Very specific: line 24
Before changing source or mutable artifacts, record the workspace root, revision, git status --short, pre-existing changes, goal, scope, …
- Very specific: line 31
Keep QEMU builds under source-root builds/build-<target>/.
- Very specific: line 50
Use a descriptive directory under source-root builds/ for every QEMU configuration.
- Very specific: line 58
Do not configure QEMU in build/, the source root, or the task output/ directory.
- Distinctive: line 62
Before creating or reconfiguring anything, inspect:
- Distinctive: line 70
Create another named directory for a materially different target or configuration, such as sanitizer versus non-sanitizer.
- Distinctive: line 116
Do not delete a named build directory merely to make an error disappear.
- Distinctive: line 127
Prefer narrow targets when possible:
- Distinctive: line 134
Use verbose mode only for diagnosis:
≈ “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.
Files
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 binariesBefore 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.logfor the configure command;<build-dir>/build.ninjafor configured state;<build-dir>/pyvenv/bin/mesonfor Meson commands;<build-dir>/meson-logs/meson-log.txtfor configure failures;<build-dir>/meson-info/intro-buildoptions.jsonfor 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-softmmuCommon targets:
x86_64-softmmuaarch64-softmmuriscv64-softmmuloongarch64-softmmux86_64-linux-useraarch64-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-aarch64Prefer 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.
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
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.

