README: revise flash plan to eMMC first, USB as recovery

The live environment boots from the USB stick; the eMMC kernel
partition is not load-bearing, so it is the safer first target.
Document backup locations, flash/verify commands, and recovery.
Backup of /dev/mmcblk0p1 taken before any write.
This commit is contained in:
vhaudiquet
2026-08-29 19:58:50 +02:00
parent 2e8ee8fe5a
commit 7654ca72d7
+33 -7
View File
@@ -169,14 +169,40 @@ gcc -O2 -o host_test host_test.c && ./host_test # host parser tests
sh build-payload.sh # -> krane-fb-stub-payload.bin (signed, verifiable)
```
## Flashing (USB only — safety rules honored)
## Flash plan (revised: eMMC first, USB is the recovery path)
Nothing has been written to internal storage. The next step is to write
`krane-fb-stub-payload.bin` to the **USB stick's** kernel partition
(`/dev/sda1`, current pmOS kernel partition on the stick — back that up
first), then boot the ChromeOS dev-mode menu → USB. The on-disk write step
is deliberately left for explicit human confirmation, per the task's
safety rules.
Rationale: the working system on this unit boots from the USB stick
(`/dev/sda1`, pmOS, ChromeOS-kernel GUID `FE3A2A5D-…`), chrooting into the
Ubuntu rootfs on eMMC. The eMMC kernel partition (`/dev/mmcblk0p1`) is
therefore NOT load-bearing for the live environment, while the stick's
kernel partition IS. Flashing the stub to eMMC keeps recovery independent
of the flashed target — the inverse of the original prompt's ordering, so
the original "USB stick first" safety rule is satisfied in spirit by
backing up both kernel partitions first:
Backups taken before any write (verified sha256):
- `/dev/mmcblk0p1` (pmOS kernel on eMMC, 32 MiB) →
`~/mmcblk0p1-pmos-backup.img` (on eMMC) — copy this to the USB stick
too so recovery never depends on eMMC.
- **USB stick `sda1` is NOT touched** — it keeps booting the system.
Flash steps (executed by the operator, not automated here):
```
dd if=krane-fb-stub-payload.bin of=/dev/mmcblk0p1 bs=4M conv=fsync status=none
cmp krane-fb-stub-payload.bin /dev/mmcblk0p1 # verify what landed
```
Then reboot, pick the internal-boot option in the depthcharge dev-mode
menu, and watch for red → yellow → green → blue. Recovery if it fails:
power-cycle, boot USB (unchanged), and
`dd if=mmcblk0p1-pmos-backup.img of=/dev/mmcblk0p1`.
Key-verification parity: the packed payload uses the same devkeys as the
currently-booting p1 kernel (data key sha1 `d6170aa4…` matches) and the
same kernel version 1, so the TPM stored-version check that admits the
existing kernel admits ours equally.
## Known limitations / notes