New `sd_media` module: build bootable removable-media card *images* for
boards that boot from a card, root-free up to the final device write.
- `CardImage`: assemble a single-partition (MBR, FAT32 type 0x0c @ LBA 2048)
card image as an ordinary file using sfdisk + mkfs.vfat + mtools
(mcopy/mmd) -- no loopback mount, no root -- so the `.img` is fully
inspectable and unit-testable without hardware. This is the exact card
shape proven on the bench S17 (2026-11-17): stock U-Boot card-detects it
and side-loads the flasher-OS trio with no boot-mode strap and no uEnv.txt.
- `build_stock_recovery_card`: codify the by-hand bench procedure -- replicate
a genuine vendor SD-recovery package's layout (flasher-OS trio at the card
root + `bin/` NAND payload) onto a card image. `locate_vendor_card` finds
the layout inside an unpacked (possibly nested) vendor package.
- `write_image_to_device`: guarded, separate dd of a finished image to a block
device (the only part that touches real hardware; caller confirms target).
Tests build a card from a synthetic vendor package and read it back with
mdir/mtype (skip cleanly if the host lacks the image toolchain).
First slice of the SD Installation-Media feature; alkane simple-boot and
installer card builders, the GUI window, and CLI parity follow.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i