From claude-for-hardware
Use when building or debugging a firmware and boot chain (RISC-V SBI, UEFI, ACPI, a bootloader handoff like Limine to an OS) or adding measured boot with a TPM, and a stage fails to hand off to the next
How this skill is triggered — by the user, by Claude, or both
Slash command
/claude-for-hardware:firmware-boot-chainThe summary Claude sees in its skill listing — used to decide when to auto-load this skill
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.
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 |
bare-metal-bringup for the early-output and translation rungs.Creates, edits, and optimizes skills for Claude Code, including drafting, evaluating with test prompts, iterating on performance, and improving skill descriptions for better triggering accuracy.
npx claudepluginhub midstall/claude-for-hardware --plugin claude-for-hardware