feat(native): seed global Wi-Fi preset list on every flash + template
Picks up Codex's media-layout.sh helpers (write_global_wifi_creds,
merge_wifi_creds, summarize_wifi_creds_file) and finishes the wiring
in ac-os so every flashed USB and every template OTA image ships with
the lab/home network presets ready out of the box.
Changes:
1. ac-os flash_usb()
- Always writes the global preset list to a fresh wifi_creds.json
- If the existing USB still has a saved wifi_creds.json from a
previous flash, merge_wifi_creds folds the user's saved networks
on TOP of the presets so personal entries are never clobbered
- Result: a re-flash never wipes saved networks, but a virgin USB
gets the presets immediately
- Logs the final wifi cred count via summarize_wifi_creds_file
2. ac-os generate_template_image()
- Writes the global preset list into the staging tree before
ac_media_create_efi_disk_image runs, so OTA download images land
on a freshly-flashed USB with presets already in /mnt/wifi_creds.json
- The downstream image creator already picks up stage_root/wifi_creds.json
3. flash-helper-runner.sh
- sfdisk now uses --no-reread (Codex), avoids EBUSY when /dev/sda
is mid-flash and the kernel is still reading the partition table
The preset list lives in media-layout.sh:
aesthetic.computer / aesthetic.computer
ATT2AWTpcr / t84q%7%g2h8u
GettyLink / (open)
Tondo_Guest / California
These are the same SSIDs notepat.mjs auto-tries via AC_SSID, so the
JS-side fallback logic is already in place — this commit makes the
script side match the JS side so the preset is on disk for first boot.
bash -n syntax-checked: ac-os, media-layout.sh, flash-helper-runner.sh.