qemu-build
Skill60 starsChanged 13 days 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. Use for the QEMU source tree only; kernel and U-Boot builds belong to qemu-kernel-build and qemu-uboot-build.
We split this skill into the rules it gives an agent
7 rules. About 0 are common, 2 are distinctive, and 5 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈2
Distinctive · estimate
This author's own choices. Worth a look.
5
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 43
Use a descriptive directory under source-root builds/ for every configuration, such as builds/build-aarch64/ or builds/build-riscv64-debug/.
- Very specific: line 56
Run scripts/preflight.sh first, or see references/host-matrix.md for host notes and failures.
- Distinctive: line 68
Run one configure step and one Ninja invocation per build directory at a time.
- Very specific: line 82
Use ../../configure --help in the build directory for options supported by the checked-out version.
- Very specific: line 101
Use -v only for diagnosis.
- Distinctive: line 105
Before a long build after source edits: confirm edited headers are included.
- Very specific: line 128
When background or sub-agent execution is unavailable, run the build as a bounded foreground command, keep the full log under task logs/, …
≈ “Common” is an estimate: at least 1 in 5 of the 308,232 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 a non-trivial task that writes to the workspace, use only the needed entries under
.oh-my-qemu/<task-slug>/: audit.md (baseline, plan, decisions, evidence, verification, and
gaps), commands.md (redacted commands, working directories, and results), logs/ (decisive
build, test, and runtime output), scripts/ (probes, parsers, and harnesses), and output/
(generated deliverables, third-party dependencies, and non-QEMU binaries). Keep QEMU's own build
tree at source-root builds/build-<target>/, never an unqualified build/. In a Git worktree,
add .agents/, .oh-my-qemu/, and builds/ to the file from
git rev-parse --git-path info/exclude before writing artifacts or configuring QEMU; preserve
existing entries and avoid duplicates. Never stage or commit these paths; stage source only when
the user explicitly requests that separate action. At handoff, reconcile git status --short
with the baseline and report the task directory, build directory, source changes, pre-existing
changes, and unresolved gaps.
QEMU upstream boundary
QEMU's official GitLab and mailing lists are upstream channels. A patch becomes an upstream
contribution when it is sent to the maintainers selected through MAINTAINERS. Do not prepare or
send agent-generated code, documentation, commit messages, or patches for upstream submission; see
the checked-out tree's docs/devel/code-provenance.rst. Research, debugging, analysis, local
experiments, verification, and workflow guidance remain allowed. Local branches, commits, patch
files, pushes, and pull requests are not by themselves upstream contributions; perform those Git
actions only when requested.
Scope boundary
This skill configures and builds the QEMU source tree only. Use qemu-kernel-build for Linux
kernel artifacts and qemu-uboot-build for U-Boot and firmware-stage artifacts. One named build
directory per component; one skill per build class.
Build directory rule
Use a descriptive directory under source-root builds/ for every configuration, such as
builds/build-aarch64/ or builds/build-riscv64-debug/. Never configure QEMU in build/, the
source root, or the task output/ directory. Reuse a directory only when its recorded
configuration matches the task.
Inspect before creating or reconfiguring: config.log for the configure command and source
path; build.ninja for configured state; pyvenv/bin/meson for Meson commands;
meson-logs/meson-log.txt for configure failures. If config.log names a different source
root, prefix, or toolchain, the directory is stale: create a new named directory instead.
Environment preflight
Record absolute paths and versions before the first build; do not rely on an interactive shell.
Run scripts/preflight.sh first, or see references/host-matrix.md for host notes and failures.
command -v ninja meson python3 pkg-config ccand each resolved path plus version.- The build directory's
pyvenv/bin/mesonand the configured Ninja whenPATHlacks them. - A readable and writable
HOMEfor the executing user; a Meson reconfigure can fail whenHOMEbelongs to another user. - Compiler, sysroot, and
pkg-configpaths recorded inconfig.log. - Host runtime libraries needed to run the built QEMU; if missing, build and run in the documented container and record both environments.
Concurrency
Run one configure step and one Ninja invocation per build directory at a time. Do not share a build directory between concurrent agents or tasks. If a build is already running, inspect its process and log, then wait or use a separate named build directory.
Configure
From the QEMU source root:
mkdir -p builds/build-aarch64
cd builds/build-aarch64
../../configure --target-list=aarch64-softmmuUse ../../configure --help in the build directory for options supported by the checked-out
version. Typical options are --enable-debug, --enable-trace-backends=log, and
--enable-asan or --enable-ubsan or --enable-tsan. Reconfigure from config.log,
changing only the needed option; keep the target list and diagnostic options unless the task
changes them.
Record any deviation, for example --disable-werror with the warning text that forced it. Do not
disable warnings silently, and for generated-source failures fix the generator input rather than
files under builds/build-<target>/.
Build
From the source root, build the whole configuration or prefer narrow targets:
ninja -C builds/build-aarch64
ninja -C builds/build-riscv64 qemu-system-riscv64 tests/qtest/<test-name>Use -v only for diagnosis.
Pre-compile checklist
Before a long build after source edits: confirm edited headers are included; confirm called QEMU APIs and struct fields exist in the checked-out tree; confirm feature guards match configured targets and options; confirm new sources and qtests are registered in Meson; confirm changed public signatures have all call sites updated.
Canonical gate
For a change or a build claim, record these results before reporting PASS: the narrow build of
the affected target from a named build directory; the matching qtest or focused verification;
scripts/checkpatch.pl when source patches exist; git diff --check and reconciliation of
git status --short. Record the build in assets/build-record-template.md; report every
skipped gate as an unresolved gap.
Failure classification
- Configure: missing dependency, unsupported option, Python/Meson issue, compiler mismatch,
unreadable
HOME, or stale build directory. - Compile: API/type/include/feature-guard mismatch; check the checked-out headers and nearby maintained code.
- Link: missing object in Meson, missing dependency, target-specific source not linked.
- Generated source: QAPI, trace-events, decodetree, or another Meson generator input.
- Toolchain/host: sanitizer or compiler incompatibility, missing host library.
When background or sub-agent execution is unavailable, run the build as a bounded foreground
command, keep the full log under task logs/, and report the exit status and failure excerpt
instead of claiming completion.
Upstream references
docs/devel/build-system.rstdocs/devel/testing/main.rstdocs/devel/submitting-a-patch.rstdocs/devel/code-provenance.rst
Paths can differ between QEMU versions; locate them in the checked-out tree.
In this repository19 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-modelerSkill
- qemu-model-reviewSkill
- 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
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.

