Files
pdtv26/box/flash.sh
T
dckc 521998b666
check / check (push) Canceled after 0s
feat(box): the box's NixOS system as a module, and lib.mkBox from a few names
The box within reach of the couch: a Raspberry Pi 3B with the AIY Voice
HAT, from the first household's configuration, made generic.

- box/body: the button service, in Python: press and talk, turns by
  voice, a press interrupts; the look signal
- box/*.js: the ir and look capabilities, behind gates, for the brain;
  the ask client, the box's side of a conversation
- box/module.nix: the services, each confined to the devices and
  addresses it needs; the private network as an option (a tailnet by
  default); the Pico found by its USB IDs, as /dev/pdtv26-ir
- box/voicehat.nix: the Voice HAT's device tree overlay and ALSA setup
- lib.mkBox: a box's whole system from its name, the home server's,
  the Wi-Fi network's, and who looks after it
- checks: box-js, box-py (doctests and pyflakes), and box-system (an
  example box's system evaluates)

Generated-by: Claude Opus 5.5
2026-12-02 16:18:17 -06:00

14 lines
498 B
Bash
Executable File

#!/bin/sh
# Write an image to a card: unmount whatever the desktop mounted, dd, re-read the partitions.
# Run card-check.sh first; this one trusts its arguments.
set -eu
img=${1:?usage: flash.sh IMAGE /dev/sdX}
dev=${2:?usage: flash.sh IMAGE /dev/sdX}
lsblk -lno PATH,MOUNTPOINT "$dev" | awk 'NF == 2 { print $1 }' | while read -r part; do
udisksctl unmount -b "$part"
done
sudo dd if="$img" of="$dev" bs=4M conv=fsync status=progress
sudo partprobe "$dev"
lsblk -o NAME,SIZE,FSTYPE,LABEL "$dev"