Files
alkane-toolkit/docs/IMPLEMENTATION-PLAN.md
T
Noah 5033c9609d
build-test-release / release (push) Successful in 15m58s
Simplify Toolkit docs and update installer status
2026-10-15 14:36:09 -06:00

8.4 KiB

Toolkit plan

Drafted 2026-09-14. This is an installer design reference. See the README for current delivery status.

Scope

The Toolkit is planned to install stock or Alkane OS from stock, Vnish/AnthillOS, Braiins OS+, LuxOS, ePIC UMC, BixBit, and WardenOS. The SDK owns board data, image packers, and build outputs. The Toolkit owns discovery, access, execution, verification, and the operator UI. An entry in this plan is a target, not a shipping install path.

The source rules are SDK install methods, firmware recipes, and boards/*/board.yml. The bench evidence cited below includes the S17 NAND restore (2026-09-14), WhatsMiner network updates and /data overlay, Amlogic stock capture, and Braiins CV bootloader analysis.

Install pipeline

discover -> classify -> root access -> pack -> backup -> transfer -> write
         -> verify write -> select boot -> reboot -> verify live
         -> verify after at least two unattended power cycles

Each {board, source OS} recipe supplies typed parameters to one engine (ADR 0001). Each stage must be resumable or idempotent and write an audit record. The GUI and CLI use the same engine; board facts come from the SDK. WhatsMiner package builders must match captured vendor output byte for byte when ported from Python.

Safety requirements

  1. Refuse writes to bootloader and secure partitions in the engine.
  2. Verify a positive marker and liveness over an independent channel, then pass at least two unattended power cycles.
  3. Treat a dropped SSH session after root-initiated reboot as possible success; reclassify over the liveness channel.
  4. Bind each image packer to its board and verify boot-switch state.
  5. Require a live serial console before kernel or boot-adjacent writes.
  6. Verify image digest and format before writing, and read back over an independent channel. Protect live earners from broad auth attempts; teardown requires explicit operator authorization in the audit log.

These requirements encode recorded UBI volume-name and installer-exit false positives. The SDK documents the per-board recovery path.

Components

Component Planned responsibility
alkane-core Board, OS, artifact, partition, stage, and safety types
alkane-discovery Vendored asic-rs 0.8.1 scan, CIDR lists, classification, and a planned ARP/ICMP pre-pass for silent boards
alkane-access SSH with legacy algorithms, Bitmain and WhatsMiner port 4028 clients, and serial transport where network receive is broken
alkane-flash SSH stream transfer for minimal BusyBox, MTD/eMMC writes, board packers, readback, U-Boot environment updates, LuxOS installer, and IMAGEWTY tooling
alkane-artifacts SHA-256 manifest and image magic, size, and integrity checks; seed manifest has 14 bench artifacts
alkane-cli Headless bench and scripting commands for the same engine
alkane-gui Rust wxWidgets UI through patched wx-rs (ADR 0002); primary view in UI spec

Access details include the WhatsMiner update_firmware token and AES-ECB/u32-LE chunk framing, old stock SSH algorithms, and serial base64/bzip2 transfer for A113D. Flash recipes must retain the single-block U-Boot environment readback and per-board format checks.

Bench pathways

The matrix records physical install observations. It does not prove that the Toolkit implements them. The recipe schema must represent each row.

Board (SoC) Proven installs Foothold on stock Transfer Hard rules
am335x-bb (S19j Pro) 5/5 network-only (stock, LuxOS, ePIC, Braiins, Vnish -> OurOS), round-tripped miner:miner + update-daemon loopback RCE SSH/SFTP autoboot abort = ESC with 1 s window (catcher first, then power); mtd0-3 never written; bootloader written last; no SD boot proven; NAND is the only net
zynq-7010 (S19) stock->OurOS, Vnish->OurOS network-only miner:miner + loopback RCE SSH/SFTP PS RSA eFuse is per-unit; read 0xF800D010 before planning; FIT unverified branch is the entry; autoboot 0 s (keys must pre-flood); stock console echoes but no getty
zynq-7010 (S17) stock NAND restore verified by CRC through U-Boot (2026-09-14) stock root with EMPTY password; legacy SSH algos (dh-group1-sha1, ssh-rsa, aes128-cbc) ymodem over serial for NAND writes; SSH for userspace board mtd char/block reads return EIO; verify only via U-Boot nand read+crc32; ymodem splits at ≤2047 blocks; reboot -f no-ops from RAM-boot (sysrq b)
a113d (BHB42XXX) 5/5 miner:miner + loopback RCE; amlenv.py edits env in-band over SSH (/dev/nand_env) SSH (net), U-Boot env is the boot switch UBI volume name is order-dependent (nvdada_log/umc_os_rootfs/overlay); detect live, never hardcode; per-OS DHCP lease differs (false DARK trap; a failed self-report downgrades to WARNING, SSH fingerprint decides)
a113d hardened (S21 Pro) stock restore via env swap; two root paths miner:miner; daemon injection char-whitelisted (dead); use eclipse/updatem forged {type:root} package -> sudoers -> root SSH or serial-only (base64/bzip2, ~10 KiB/s, ~11 min install) stock busybox has no wget/nc/tftp/curl/gzip/xz; console arg must be ttyAML0+meson earlycon or the board boots blind and the install looks failed
cv1835 (S19k Pro) 3/3 buildable (LuxOS no asset, ePIC wrong silicon excluded) miner:miner + /nvdata/rroot (non-permanent; p7 reformat destroys it; gate on rroot -c id) or loopback RCE SSH pipe (cat >, busybox has no wget/tftp/nc) Vnish/Braiins are RAM overlays on stock kernel; exit while overlay is live; eMMC boot0 eFuse-hook units cannot SD-recover; golden copy at raw LBA 0x300000 is the only net; serial catch needs 3 ms flood
allwinner H3/H6/H616 (WhatsMiner) rooted /data overlay survives genuine reinstall (proven on H616); genuine network update executed on H3 + H616 admin:admin uid-300 shell; root via /data/rootshell overlay (persists) or rooted SD image 4028 API update_firmware (AES-ECB + md5crypt token, ≤1 MB chunks); IMAGEWTY SD-burn for rooted card package format 0x9A5BA57C forgeable (MD5+CRC only); 8889 binary daemon AES key unknown; not implementable, use 4028; H616 payload key eFuse/OP-TEE-bound; H3 rootfs.fex LUKS (only /data slices editable); random MAC -> DHCP moves

Antminer port 4028 uses {"command":...}; WhatsMiner uses {"cmd":"get_version"}. SSH banner and KEX help classify old stock.

Milestones

Phase Exit condition
M0 Workspace, CI, vendored asic-rs/wxWidgets/wx-rs, and Rust GUI decision recorded
M1 Nine-board bench discovery view, scan ranges, filters, columns, and silent-board classification
M2 Artifact registry and image verification, including bulk archives and per-model corpus
M3 Zynq-7010 stock restore, then Alkane OS installation after SDK release qualification; readback, boot switch, liveness, and persistence gates
M4 Guided SD recovery builders and verified image burn
M5 WhatsMiner, A113D, CV1835, and AM335x install pathways
M6 Install wizard, progress and cancel, audit log, and platform packaging

The SDK now builds rootfs artifacts for all seven boards. No production image or Toolkit installation pathway is qualified. The first install milestone remains blocked by release evidence and installer implementation. Bench validation closes each milestone; do not exercise live earners without explicit authorization.

Open questions

  • Which stock image version is canonical for each board? The bench corpus has an S17 restore image; other stock packages need selection.
  • Which SDK release should the installer pin after board and simulator gates pass?
  • Which of Linux, Windows, and macOS must ship in the first GUI package?

References

  • SDK install rules
  • SDK firmware recipes
  • bench-wiki/boards/ and MEMORY-SNAPSHOT/ in the parent workspace
  • crates/alkane-artifacts/data/manifest-seed.csv
  • scratch/wm-install-build/ package and IMAGEWTY builders in the parent workspace