/claude-for-hardware:firmware-boot-chainfrom claude-for-hardware
Debug and build firmware boot chains (RISC-V SBI, UEFI, ACPI, bootloader handoffs like Limine) and measured boot with TPM. Isolates handoff failures.
Ships in claude-for-hardware. Installing the plugin adds it to Claude Code.
What the skill costs in Claude's context, stage by stage
Name and description: Claude knows it exists.
SKILL.md joins the conversation and stays.
Read when SKILL.md points to them.
A boot chain is a relay of stages, each responsible for setting up just enough state to hand control to the next: ROM to firmware (SBI/UEFI), firmware to bootloader, bootloader to OS. Every handoff has a contract: where the next stage lives, what registers/tables it expects, and what memory is already set up.
Core principle: Each stage owns a contract with the next. Most boot failures are a broken contract at exactly one handoff, so isolate which handoff fails before theorizing about the stage itself.
Write down the relay before debugging:
ROM -> firmware (SBI/UEFI) -> bootloader -> OS kernel
provides: SBI calls, loads: expects: a0=hartid,
memory map, ACPI/DTB kernel+initrd a1=DTB/ACPI ptr, MMU off
For each arrow, name: the entry address, the register/pointer contract, and the memory/translation state. The failing arrow is your bug location.
These bite when chaining a general loader (for example Limine) into an OS:
bare-metal-bringup).If the chain is measured:
EFI_TCG2_PROTOCOL) and emit a TCG2 event log so the measurements are verifiable later.| Smell | Do instead |
|---|---|
| Hardcoded peripheral addresses | Probe from DTB/ACPI |
| RAM base as a constant | Build-time parameter per board |
| "It doesn't boot" with no stage isolated | Identify the failing handoff first |
| TPM probe with no presence gate | Gate on the platform description |
| Extending a PCR after the jump | Measure-then-transfer |
| A rebuild that has no effect | Confirm the flashed slot is the one the ROM jumps to |
| Silent boot from a quad-read flash | Fall back to standard 0x03 to isolate flash config |
| Writing optional CSRs unconditionally | Probe each under a temp trap handler, skip absent ones |
boot-handoff-traps.md in this directory: the first-stage failures that boot silent or run a stale image (reset-into-flash XIP needs a BRAM maskrom, a stale image at the real boot slot, a quad/QE flash mismatch, FSBL scratch colliding with the copy destination, a device-tree cell-size parser mismatch, and probing optional CSRs).bare-metal-bringup for the early-output and translation rungs.What SKILL.md sets; muted values are Claude Code's defaults
Three short reads, in order
firmware-boot, boot-chain, handoff-debugging, uefi, risc-v, measured-boot
npx claudepluginhub lilithsemi/claude-for-hardware --plugin claude-for-hardware14 skills in this plugin
/bare-metal-bringupUse when bringing up bare-metal or kernel code on a new architecture, SoC, or board (RISC-V, ARM, x86, ESP32) and it won't boot, hangs after boot, or faults early; covers trap vectors, MMU/PMP, syscall ABI, and boot ordering/codegen-validationUse when building or debugging a compiler backend, codegen, or assembler and you need to prove the generated machine code is correct by executing it on a real CPU or a fast emulator, not just inspecting the output/differential-verificationUse when verifying a hardware DUT (a CPU core, FPGA, or netlist) against a golden reference model, building coverage-guided fuzzing, or detecting where silicon diverges from a simulator like Spike, an emulator, or SPICEOther plugins' skills for the same job