flash: Zynq tier-2 update in place through the verified writer; verify-live for Zynq
verify / verify (pull_request) Skipped
source / check (pull_request) Successful in 4m24s
verify / verify (pull_request) Skipped
source / check (pull_request) Successful in 4m24s
The Zynq tier-2 install wrote raw images at device-relative offsets on /dev/mtd0 and /dev/mtd1. On the current alkane image those are stock-cfg and alkane-cfg, not the boot regions, so it would have erased alkane-cfg first, and its raw zImage/cpio are not bootable by the stock U-Boot. Its preflight only checked that mtd0 and mtd1 existed. - Add StockMethod::update_in_place: refuses a board not running alkane, re-registers the boot regions (as restore does), saves every slot locally before any erase, writes rootfs/dtb/kernel as the uImages the stock U-Boot boots via the shared target builder (BOOT.bin guard, md5 readback), reboots and waits for alkane. --dry-run reports the live storage map and the plan. - boards::zynq keeps the manifest gate; the plan is now in absolute NAND slots with ceilings that leave room for the uImage header. The stale writer and preflight are removed. - CLI: Zynq preflight/install use the new path before the generic user transport connects. - verify-live gains a Zynq check (HTTP marker, case-insensitive, plus root SSH reporting alkane and the installed kernel; prints the kernel cmdline). It previously fell through to the CV1835 check. - Tests for the protected alkane map, registered and split boot maps, slot overrun, and the BOOT.bin guard. Verified on an S17 (Zynq-7010): dry run, install from a RAM-booted alkane, NAND boot confirmed on the serial console, verify-live PASS. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
This commit is contained in:
+29
-4
@@ -68,13 +68,38 @@ verify the board came up as alkane:
|
||||
alkane-cli afw verify-live --host <miner-ip> --timeout 300
|
||||
```
|
||||
|
||||
On Zynq (S17/S19 class) pass the `.afw` (or `--board zynq-7010`) and the board's
|
||||
alkane root credential; the check needs the web page to carry the image marker
|
||||
and SSH to report alkane with the installed kernel, and prints the running kernel
|
||||
command line (on a NAND boot it is the board's U-Boot env bootargs):
|
||||
|
||||
```
|
||||
alkane-cli afw verify-live path/to/alkane-os-<ver>-zynq-7010-armv7.afw \
|
||||
--host <miner-ip> --password-file <alkane-root-pw> --timeout 300
|
||||
```
|
||||
|
||||
For a bench image that is not signed, add `--allow-unsigned`.
|
||||
|
||||
Without `--from-stock`, `install` performs a tier-2 update of a board already on
|
||||
alkane: it writes the dtb (`/dev/mtd0 @ 0x1a00000`), the kernel
|
||||
(`/dev/mtd0 @ 0x2000000`) and the rootfs (`/dev/mtd1`), holds a backup of each,
|
||||
reads them back (md5), and never writes `/dev/mtd0` below `0x1a00000`
|
||||
(BOOT.bin/FSBL/FPGA/U-Boot are preserved).
|
||||
alkane, in place, over the network:
|
||||
|
||||
```
|
||||
alkane-cli afw install path/to/alkane-os-<ver>-zynq-7010-armv7.afw \
|
||||
--host <miner-ip> --password-file <alkane-root-pw> --dry-run
|
||||
alkane-cli afw install path/to/alkane-os-<ver>-zynq-7010-armv7.afw \
|
||||
--host <miner-ip> --password-file <alkane-root-pw> --confirm FLASH
|
||||
```
|
||||
|
||||
On Zynq (S17/S19 class) the update refuses a board that is not running alkane.
|
||||
Alkane does not expose the NAND boot regions to Linux (only the small
|
||||
`stock-cfg` and `alkane-cfg` partitions), so the toolkit re-registers them
|
||||
first, the same way a restore does. It saves each boot slot to `--backup-dir`
|
||||
(default: the toolkit's `backups` directory) before any erase, then writes the
|
||||
rootfs (absolute NAND `0x2800000`), dtb (`0x1a00000`) and kernel (`0x2000000`),
|
||||
with the kernel and rootfs wrapped as the legacy uImages the board's stock
|
||||
U-Boot boots, and reads each back (md5) before rebooting. Nothing below
|
||||
`0x1a00000` (BOOT.bin: FSBL, FPGA bitstream, U-Boot) is ever written.
|
||||
`afw preflight` runs the same checks read-only. `--no-reboot` skips the reboot.
|
||||
|
||||
## Remove (back to stock)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user