agentleFS
processmissionprocessmission/oh-my-qemu/skills/qemu-linux-boot/SKILL.md

qemu-linux-boot

Skill57 starsChanged 4 months agoMITView on GitHub

Use for booting Linux in QEMU through either direct kernel loading or firmware and bootloader stages, selecting the path from task inputs while preserving provenance, boot logs, debug handoff, and verification evidence.

The file

Show its rules and text

We split this skill into the rules it gives an agent

17 rules. About 0 are common, 12 are distinctive, and 5 are very specific to this project.

  • ≈0

    Common · estimate

    Many files like this have a rule of this kind.

  • ≈12

    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
  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 direct Linux boot when QEMU should load the kernel itself with options such as -kernel, -dtb, -initrd, and -append, without traversing …

    line 43
  4. Distinctive:

    Use firmware Linux boot when Linux must be reached through BIOS, pflash, ROM, SPL, TPL, U-Boot, TF-A, EDK2, OpenSBI, vendor firmware, or …

    line 46
  5. Distinctive:

    If the user explicitly names a path, follow that path.

    line 49
  6. Distinctive:

    If the request only asks for a fast Linux smoke boot and provides a kernel, prefer direct boot.

    line 50
  7. Distinctive:

    If the request is validating a board's real boot chain, firmware behavior, or boot media layout, prefer firmware boot.

    line 52
  8. Very specific:

    If required artifacts are missing or the path is ambiguous, record the gap in audit.md before running QEMU.

    line 54
  9. Distinctive:

    If boot fails, isolate the first failing stage with the narrowest reversible debug probe before changing source or artifacts.

    line 67
  10. Distinctive:

    When the goal is an interactive shell, provide the exact command separately from the timed smoke command.

    line 91
  11. Distinctive:

    Keep firmware inputs and boot media inputs distinct in the command record.

    line 117
  12. Distinctive:

    Use disposable or refreshed images when firmware writes runtime state.

    line 120
  13. Distinctive:

    If Linux uses a different console from firmware, state which QEMU chardev carries each log.

    line 123
  14. Distinctive:

    Do not claim board or device correctness from a banner alone.

    line 144
  15. Very specific:

    add -S -s or another gdbstub backend for guest state.

    line 154
  16. Distinctive:

    add focused QEMU log flags or trace events.

    line 155
  17. Distinctive:

    use instruction logs only around a bounded PC window when possible.

    line 156

≈ “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 Linux Boot

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.

Path Selection

Classify the boot path before composing primitives:

  • Use direct Linux boot when QEMU should load the kernel itself with options such as -kernel, -dtb, -initrd, and -append, without traversing firmware or bootloader stages.
  • Use firmware Linux boot when Linux must be reached through BIOS, pflash, ROM, SPL, TPL, U-Boot, TF-A, EDK2, OpenSBI, vendor firmware, or boot media that firmware reads.
  • If the user explicitly names a path, follow that path.
  • If the request only asks for a fast Linux smoke boot and provides a kernel, prefer direct boot.
  • If the request is validating a board's real boot chain, firmware behavior, or boot media layout, prefer firmware boot.
  • If required artifacts are missing or the path is ambiguous, record the gap in audit.md before running QEMU.

Workflow

  1. Freeze the selected boot path, named success marker, allowed writes, and acceptance checks in audit.md.
  2. Record the identity and hash of QEMU, kernel, DTB, initrd/rootfs, firmware, bootloader, and boot-media inputs that the selected path consumes.
  3. For writable media, record its layout and mutation/refresh policy before running QEMU.
  4. Construct one copy-pasteable QEMU command, capture the full console log, and record timeout, exit status, positive markers, and negative markers.
  5. If boot fails, isolate the first failing stage with the narrowest reversible debug probe before changing source or artifacts.
  6. Report the exact Linux milestone as PASS, FAIL, or INCONCLUSIVE, plus what the evidence does and does not prove.

The selected path determines the boot contract; do not run both paths unless the task explicitly asks for comparison or fallback evidence.

Direct Boot Contract

Record these inputs:

  • QEMU binary and machine name;
  • CPU, SMP, memory, accelerator, and machine properties;
  • kernel image type expected by the target architecture;
  • DTB path or generated FDT policy;
  • initrd or block rootfs path;
  • kernel command line, especially console=, root=, rdinit=, init=, and early console settings;
  • expected marker, such as a shell prompt, init banner, or workload output.

Direct boot command rules:

  • Route serial output deterministically, usually with -nographic.
  • When the goal is an interactive shell, provide the exact command separately from the timed smoke command.

Firmware Boot Contract

Record these inputs:

  • firmware, bootloader, kernel, DTB, rootfs, and QEMU inputs;
  • boot media, pflash, ROM, or disk image expectations;
  • serial markers for each firmware handoff stage;
  • the first failing stage when boot stalls;
  • the reached Linux milestone when boot succeeds.

Record each expected stage and marker:

  • reset vector or ROM entry;
  • first firmware console output;
  • SPL/TPL or early loader milestone;
  • trusted firmware or monitor handoff if present;
  • bootloader prompt or autoboot path;
  • boot media access;
  • kernel entry;
  • Linux console and rootfs or shell marker.

Firmware command rules:

  • Keep firmware inputs and boot media inputs distinct in the command record.
  • Record firmware environment assumptions and any interactive bootloader commands.
  • Use disposable or refreshed images when firmware writes runtime state.
  • Capture the entire serial log; summarize the first failing stage in audit.md.
  • If Linux uses a different console from firmware, state which QEMU chardev carries each log.

Stage Milestones

For firmware implementation or debugging, use the stages above as round boundaries. The final Linux result remains the acceptance criterion. Each milestone must name:

  • the expected serial, trace, or debugger marker;
  • the current verification gate;
  • the next firmware handoff stage it unlocks.

By default, a single debugging or implementation step should not span more than one firmware handoff stage. If it must cross stages, record why before making changes.

Success Criteria

Boot success should name the marker reached. Examples: kernel decompressed, init started, initramfs shell, login prompt, workload completed, or Linux shell. Do not claim board or device correctness from a banner alone.

Debug Handoff

For timeouts, narrow by path and stage before changing source:

  • for direct boot, compare kernel command line, console, DTB, initrd/rootfs, and machine options before assuming model behavior is wrong;
  • for firmware boot, compare image layout, firmware inputs, boot media access, and handoff markers before assuming model behavior is wrong;
  • add -S -s or another gdbstub backend for guest state;
  • add focused QEMU log flags or trace events;
  • use instruction logs only around a bounded PC window when possible.

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.