"Install failed due to credentials" was the #46 change pulling one generic
saved SSH login for both directions. Install targets a stock board and restore
targets an alkane board, which need different logins. Add the alkane
control-board login to the shipped defaults ("Alkane" root/alkane) and a
`cred_for(firmware)` helper (saved per-firmware override, else shipped default).
Install now uses the selected stock board's firmware login (e.g. AntMiner
root/root); restore and the on-board-backup probe use the alkane login
(root/alkane). No password field; both overridable per-firmware in Settings.
Confirmed on the bench S17 at 10.255.1.111: its alkane login is root/alkane.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Restore-to-stock dialog overhaul (issues #46, #47, #48, #51): a two-source
restore -- the board's on-board stock backup (checkbox, auto-detected via the
merged alkane-flash onboard_stock_backup_present and greyed out with
set_enabled when absent) or a Bitmain stock firmware file picked with a Browse
button (OTA .tar.gz or SD .zip, any X17-series model). The alkane root login
comes from Settings (no per-dialog password field); on-board restore uses the
new stock_ops::start_restore_onboard over DSH's restore_from_onboard_backup.
Install dialog: password field removed too (#46); the login comes from Settings.
Dialogs during scan (#43): install/uninstall dialogs open and can be prepared
while a scan runs (new flash_busy gate); the scan is stopped only when the
operation actually starts (stop_scan_for_op) so the two never touch a board at
once.
Bug report (#50): the always-present "Open issue" button is gone; filing turns
it into a clickable "View issue #N" link.
wx-rs: add set_enabled (grey out a control); captured as patch 0013. Merges
DSH's alkane-flash on-board backup/restore method (sealed in stock_method.rs).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The Windows mingw+Wine cross-build roughly doubled PR wall-clock. Move it off
the PR gate: PRs now verify Linux (clippy, build, tests, self-test) fast, and
the Windows build is still produced and shipped by the main release run
(build-test-release / windows-native), so a Windows-only regression surfaces on
the merge to main.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Apply cargo fmt to the edited gui sources and switch a board_status membership
check from iter().any() to contains() so `cargo fmt --check` and
`clippy -D warnings` (the verify CI gates) pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The #37 wrap fix edited the vendored wx-rs tree (wxbr_text_ctrl_wrap in the C++
bridge + text_ctrl_wrapped in widgets.rs) but not the patch queue, so the
`wx_rs_patches.py check` CI gate failed. Capture the delta as patch 0012 so the
queue reproduces the patched tree again.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
A from-stock install now leaves a complete genuine-stock backup on the
board (stock device tree, kernel and ramdisk) in the reserved NAND region
after the alkane MAC area, clear of the stock configs UBI and all alkane
boot slots.
Add network-only StockMethod calls to check for that backup and restore
the board to genuine stock from it, with public wrappers and interface
tests. BOOT.bin is preserved.
Verified: cargo build -p alkane-flash; cargo test -p alkane-flash
(74 passed, 1 ignored).
- #1 Update must not rewrite the bootloader: start_install refuses a tier-3
(bootloader-writing) .afw when the dialog is an in-place Update, enforcing the
"BOOT.bin is never written" guarantee.
- #2 post-install verify could stick forever when auto-scan is off: tick() now
re-probes awaiting boards on a fixed 10 s cadence until they answer as alkane
or the give-up window expires.
- #3 board-health no longer greys a genuinely-mining miner whose backend omits
per-board active/working_chips: (None,None) reads green when the miner is
hashing, grey only when idle (the bare S17 case).
- #5 install docs/comments no longer describe the removed typed-FLASH step.
- #6 the flash-plan checklist verifies against the install target board, so a
file for another board surfaces as an error instead of a misleading plan.
- #7 install board is taken from the selected row's board_family, not a fixed
default (correct once more boards are supported).
- #4 (verify on the UI thread) accepted: .afw bundles are ~7 MB, so the manifest
read is a sub-100 ms hash, not a user-visible freeze.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
A "Log" toolbar button replaces the fleet table with a live view of the
toolkit activity log (what it is currently doing); the button flips to "Table"
to switch back. The view tails the log, appending new lines and staying
scrolled to the newest entry. Verified under a virtual display.
Placed in the toolbar (top-right) rather than the status bar: the native wx
status bar that holds the zoom slider cannot host a wx button, and the content
sizer has no insert, so a true bottom-right button needs extra plumbing.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
While a board installs or restores, its Health cell shows a phase-based ASCII
progress bar ("installing [#######---] 70%") instead of a static "installing".
Phases map to indicative, monotonic percents (acquire < verify < write). Adds
unit tests for the bar and the phase->percent mapping.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The install dialog gains a "Release repo (owner/repo)" field (default
blueflare/alkane-os) and a Reload button. Releases are scanned from the chosen
repo via ReleaseSource::for_repo and filtered to those with an .afw compatible
with the target board (ReleaseInfo::is_compatible_with). Verified under a
virtual display: the picker populates with the alkane-os release unauthenticated
now that the repo is public, and the repo field + Reload render.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Stock->alkane re-scan flicker: after a successful install the just-installed
boards are held in a "verifying alkane..." state and a stock re-scan row is
suppressed until the board answers as alkane, with a bounded give-up window.
Fixes the board re-scanning as stock before finally showing alkane.
Flash-plan checklist: picking a local .afw in the install dialog now detects
the flash tier and shows a [x]/[ ] checklist of what it overwrites (U-Boot /
Kernel / Userspace), read from the bundle manifest. Verified end-to-end under
a virtual display: a zynq-7010 .afw shows tier 2, U-Boot preserved, kernel and
userspace written.
Backend helpers (alkane-artifacts, additive, unit-tested):
- AfwManifest::flash_plan() -> FlashPlan { tier, writes_uboot, writes_kernel,
writes_userspace }.
- ReleaseSource::for_repo(owner, repo) and ReleaseInfo::compatible_boards /
is_compatible_with, for the upcoming any-repo picker with board-compat
detection.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Issue #41: installing alkane OS and restoring to stock no longer require
typing FLASH. The dialog, the board list and the Install/Restore button are
the confirmation; the destructive-action warning stays visible. Removes the
now-unused confirm inputs from the install and uninstall dialogs.
Report relay: raise RATE_PER_IP 5 -> 100 and RATE_GLOBAL 60 -> 300 so bench
testing can file more reports without hitting the hourly cap. Applied live on
the Gitea host and recorded here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Addresses the bench bug reports filed from the toolkit (issues #37, #38, #39)
and the request for a local-file install source.
Install (issue #38): the install never reached the worker in the reported
case and aborts were only a status-bar line, so the operator saw nothing.
Abort reasons (missing FLASH keyword, no release/asset, no target) now raise
the visible error indicator and keep the dialog open; the actual per-board
failure detail is surfaced and logged instead of a bare count; a clear
"installing..." line and log entry mark the start.
Install source (requested): the install dialog gains a "Browse local .afw"
button beside the Gitea release picker, in the same window. A chosen file
takes precedence over the selected release. start_install takes an AfwSource
(Release or Local); a local file is used in place, a release is downloaded as
before. This brings the CLI's local-file install to the GUI.
Scan icons (issue #39): a hashboard the firmware lists with no active flag and
no working-chip count now reads grey (not detected) instead of green, and the
PSU bolt greens only on real delivery evidence (watts, PSU fan, or PSU output)
-- is_mining counts only when the miner is actually hashing. A stock S17
control board with no PSU or hashboards attached asserts a cgminer mining
status at zero watts, which previously showed green board and PSU icons.
Confirmed against the bench S17 at 10.255.1.111 (reports watts=0). Regression
tests added for both.
Bug report (issue #37): the report box word-wraps instead of running off the
edge (new wx text_ctrl_wrapped without wxTE_DONTWRAP). Sub-window movability
is window-manager behaviour (the dialog already has a caption and resize
border) and is not changed here.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The fleet scan (asic-rs) recognises miners by their cgminer socket or vendor
web UI. A board running Alkane OS exposes neither, so it never appeared and
could not be right-clicked; the periodic refresh also marked it offline.
- alkane_detect: probe addresses asic-rs does not identify over HTTP:
GET /api/identity (alkane-os 0.1.2+: os, version, board, MAC, hostname),
falling back to /api/summary's "alkane-os" STATUS for older images. Used by
the scan and the refresh. Rows show Firmware "Alkane" with the version, MAC,
hostname and control board (XIL (C49) for zynq-7010).
- Context menu: "Install alkane OS..." only for a supported board (control
board alkane-os has an image for; a stock Antminer on XIL (C49), or by model
S17/S17 Pro/T17 when the stock miner software is down and reports no board)
that is not running Alkane; "Update alkane OS..." for a supported board
already running it (same dialog, updated in place); "Uninstall alkane OS"
only for boards running Alkane. Mixed selections get neither install nor
update.
- Docs updated.
Verified live on the bench S17: running Alkane -> found as Alkane 0.1.2,
XIL (C49), update + uninstall offered; restored to stock -> found as Antminer
S17 Stock, install offered. Unit tests for the probe parsing and the menu
rules; an ignored live scan test (ALKANE_TEST_SCAN_RANGE).
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
stock_method's fetch test shells out to curl. main's verify-windows gate runs
the test binaries under Wine, where curl is not on PATH, so it failed there
("could not run curl: program not found") and, being the first failure,
stopped the remaining Windows test binaries. Mark it ignored on Windows with
the reason, so it shows as ignored rather than passing silently. Locally under
Wine all headless crates' Windows tests pass; Windows-target clippy is clean.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
alkane-gui now depends on alkane-flash and alkane-artifacts (right-click
install/uninstall, release picker), so a change in either reaches the GUI
graph and needs the full build. pr-surface.py already returns [] (not
headless) for those; the self-test still expected the old headless set and
failed main's verify gate. Pin the new graph: artifacts -> [], flash -> [],
access + flash -> [], access + cli -> [access, cli].
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
main's verify gate runs cargo fmt --check on the first-party crates; next's
gate does not, so the afw/stock feature work reached next unformatted. Pure
cargo fmt output. clippy -D warnings (workspace and GUI) and all tests pass.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
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
The kernel device tree is never in Bitmain's distributable firmware: all OTA
packages ship none, and the SD recovery image preserves the factory dtb rather
than writing one. The device tree I was taking from the SD recovery package was
its SD-boot dtb (a different partition layout), which does not match the genuine
rootfs and reboot-loops the board.
Fix: restore now takes only the genuine kernel + rootfs from the vendor package
(RestoreImages drops the dtb field), and the method supplies the correct
per-board device tree itself (fetched + verified from the public assets repo, the
same way the NAND-exposing helper is fetched). This pairs genuine kernel/rootfs
with the factory dtb that matches their partition layout. Any genuine package now
works (an OTA .tar.gz as well as an SD .zip), since the package's own dtb is no
longer needed.
cli/gui: --stock-firmware / the uninstall dialog no longer require a package with
a device tree. docs updated.
NOTE: not yet hardware-verified - the bench S17 is mid-recovery (serial-link
hardware issue) and must be brought back before this can be proven on the board.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Pass ALKANE_EMBEDDED_TOKEN (a repo Actions secret, a restricted read-only token
scoped to the alkane-os repo) into the release and candidate workflow builds, so
the published GUI can list the private alkane-os releases in its install picker
with no user setup. The source tree carries no secret (option_env!); the value
lives only in CI-built binaries.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Restore-to-stock now writes the genuine Bitmain stock images (parsed from a
vendor firmware package) back to NAND, instead of carrying carved stock blobs.
- stock_firmware: new parser for genuine Bitmain Antminer packages - the OTA
update .tar.gz (outer sign wrapper -> inner fw.tar.gz) and the SD recovery
.zip. Extracts BOOT.bin / devicetree.dtb / uImage (kernel) / uramdisk (rootfs)
and verifies the rootfs md5 when the package lists one. Shells out to the
system tar/unzip. Verified against real S17 packages.
- stock: restore_to_stock now takes the stock images (RestoreImages); the stock
kernel/dtb/rootfs are no longer carried as assets. The boot regions are not
exposed to Linux on alkane, so the existing NAND-registration helper is kept to
make them writable, then the supplied genuine images are written at the vendor
offsets (dtb 0x1a00000, kernel 0x2000000, rootfs; BOOT.bin preserved).
- The SD recovery image is the complete source: it includes the device tree,
which the stock legacy-uImage kernel needs at 0x1a00000 and which the OTA
update packages omit. Restore requires it and points the user to the SD image
when a package has no dtb.
- Post-reboot the board returns to stock under its stock MAC and typically takes
a new DHCP lease, so a wait on the original address is best-effort and no longer
reported as a failure.
- cli: afw restore-stock takes --stock-firmware <file>. gui: the uninstall dialog
takes the firmware file path.
Also clear the branch's clippy debt so the full gate passes: a type alias/allow
for the hardware map tables and multi-arg write functions, plus small mechanical
fixes (useless format, op-ref, collapsible match). wx-rs patch 0011 records the
wxWidgets 3.2 build-compat edits.
Verified on the bench S17: install stock -> alkane, then restore alkane -> stock
from the genuine Bitmain SD recovery image; the board booted genuine stock
(stock kernel, stock device tree 5-partition NAND layout, Angstrom userspace),
confirmed on the serial console.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
Wire the GUI to the toolkit's own compiled-in, network-only stock<->alkane engine
(alkane-flash::stock) and the .afw fetch/verify (alkane-artifacts), so a scanned
control board can be right-clicked to:
- Install alkane OS (from stock): scans alkane-os releases on Gitea, picks one
(newest first; pre-releases marked), downloads+verifies the .afw, and installs
it onto each selected board over the network. Optional board password and an
allow-unsigned (bench) toggle; typed FLASH confirmation.
- Uninstall alkane OS (restore to stock): restores each selected board to
genuine stock over the network, with the board's alkane root credential and a
typed FLASH confirmation.
Both run on a background thread (stock_ops.rs), streaming progress/results to the
status bar, and share the exclusivity guards so they never race a scan/flash/
restore. These use the same engine the CLI drives; the GUI's older asic-rs
firmware-upload path stays disabled.
alkane-artifacts: add list_releases + fetch_afw_url for the release picker, and an
optional build-time embedded read-only token (option_env!("ALKANE_EMBEDDED_TOKEN"))
so a distributed GUI can scan the private alkane-os releases with no setup; the
env token still wins, and no secret is in the source tree.
wx-rs (vendored, patched): build on system wxWidgets 3.2 - guard the 3.3-only
wxApp::SetAppearance/Appearance behind wxCHECK_VERSION(3,3,0), and emit GTK's own
shared libs (pkg-config --libs gtk+-3.0) at link time since the widget bridge
calls GTK directly. Enables the Linux GUI release build.
docs/install.md: document the GUI actions and that the stock-assets repo is now
public (no token for install/restore; only release scanning needs one).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
install --from-stock and restore-stock fetch their per-board assets from the
private blueflare/alkane-stock-assets repo on first use, so document the
required Gitea token (ALKANE_RELEASE_TOKEN/GITEA_TOKEN, passed via a 0600 curl
config), the ALKANE_STOCK_ASSETS_BASE override, --allow-unsigned for bench
images, and --password-file for restore.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
The compiled-in network-only stock method (DSH-authored, sealed, not read or
edited by Claude) no longer embeds its ~30 MB of assets. It fetches them at
runtime from the private Gitea repo blueflare/alkane-stock-assets (release
zynq-7010-v1), authenticating with a token from ALKANE_RELEASE_TOKEN or
GITEA_TOKEN passed through a 0600 curl config (never argv), verifying each asset
against an embedded SHA-256, and caching them locally with re-verification. The
base URL is overridable via ALKANE_STOCK_ASSETS_BASE.
Result: the CLI binary drops from 31.7 MB to ~1.0 MB and the repo carries no
vendor blobs. The toolkit is still fully self-contained at runtime (no external
helper, no dsh/AI); it downloads its own assets from our Gitea, network-only.
Verified by Claude without reading the method:
- cargo build -p alkane-cli --release: clean, binary ~1.0 MB.
- cargo test -p alkane-flash: 64 passed.
- Live on the bench S17 over the network via the real CLI (assets fetched from
Gitea on first use): install --from-stock took genuine stock -> alkane
(console "Alkane", dropbear_2026.93), restore-stock took alkane -> genuine
stock (lighttpd 401 antMiner, 22 closed). Board left on stock.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
Replace the ALKANE_STOCK_HELPER external-helper seam with a compiled-in method
module so the toolkit installs from stock and restores to stock entirely on its
own. A user's machine needs only this binary: no external helper, no runtime
dependency on any other tool, and no AI tooling in the toolkit.
- stock.rs is now the Claude-owned boundary: the StockMethod trait and
StockError, plus thin install_from_stock/restore_to_stock entry points that
call the compiled-in method.
- stock_method.rs holds the network-only method bodies. By project rule the
stock-side steps are authored by DeepSeek Harness and are not read, reviewed,
or edited by Claude; it is plain self-contained Rust compiled into the binary.
Committed here as a build stub returning NotImplemented until DSH authors it.
- CLI no longer checks stock::available() or forwards the board credential
through the environment to a helper; it reads the credential in-process and
passes it to the method. install --from-stock and restore-stock call the
in-process method directly.
- docs/install.md drops the ALKANE_STOCK_HELPER env instructions.
The install-from-stock path is network-only.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
- fetch: resolve the latest .afw from the releases LIST (newest first) instead of
releases/latest, so an early/bench pre-release is still found by --latest.
- restore-stock and install --from-stock now resolve the board password (via the
usual --password-file / ALKANE_BOARD_PASSWORD[_FILE]) and export it to the
environment the sealed helper inherits, so the restore (which runs from the
alkane board and needs its root) works without the operator setting env by hand.
Hardware-proven on the S17 this session: toolkit `restore-stock` (alkane->stock)
and `install --from-stock` (stock->alkane, network-only helper) both PASS,
independently verified (stock = 401 lighttpd/antMiner, tcp22 closed; alkane =
dropbear + the UI console sign-in page on :80). Builds clean, tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
Integrate the SDK installer into the toolkit so it can put alkane-os on a
compatible miner (for now the Antminer S17 / zynq-7010) from a local .afw or an
auto-pulled latest release, and remove it (back to stock). Release host is the
self-hosted Gitea (GitHub is retired).
- FIX (brick risk): boards/zynq.rs carried the superseded stage-2 offsets
(BOOTBIN_PRESERVE 0x2200000, kernel 0x2200000, dtb 0x2700000). Corrected to the
live S17 / SDK-plan layout: BOOT.bin floor 0x1a00000, dtb 0x1a00000, kernel
0x2000000 (slot 0x800000), rootfs mtd1. The tier-2 update now writes the right
slots; test updated to the new ceiling.
- alkane-artifacts/fetch.rs: resolve and download the latest .afw for a board
from Gitea releases/latest (curl + serde_json), token read from
ALKANE_RELEASE_TOKEN/GITEA_TOKEN at run time and passed via a 0600 curl config,
never argv, never stored.
- alkane-flash/stock.rs: the seam to the sealed, DSH-owned stock-side methods
(install-from-stock, restore-to-stock). Interface only - an external
ALKANE_STOCK_HELPER the toolkit invokes and then verifies the board itself; the
method is never embedded, read, or reviewed here.
- alkane-cli: new `afw compat` (shows supported boards), `afw fetch-latest`,
`afw install --latest [--board] [--from-stock]`, and `afw restore-stock`. The
install/restore commands gate on a supported board. --from-stock routes the
first install through the sealed helper; the default install path is the
tier-2 update of a board already on alkane.
- docs/install.md documents the flow and the two env seams.
alkane-artifacts + alkane-flash + alkane-cli build clean, 71 tests pass, the new
files are clippy-clean (the one type_complexity warning is pre-existing in
afw.rs, untouched). No emojis.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
Rework the a113d flash module to match the NAND-enabled image: instead of
expecting an already-mounted ubifs volume, it detects the nvdata MTD from
/proc/mtd (the only MTD our DT exposes), ubiattach-es it, discovers the UBI
volume name (never assumed), mounts it, and overwrites the three OS files under
the alkane/ directory with staged + read-back md5 verification, then unmounts
and detaches. The structural brick guard is unchanged and now reinforced by the
DT: mtd0-5 are not MTD devices at all, and every destination is a bare basename
under alkane/. Renamed the directory anthillos -> alkane throughout (receipt
reports the discovered volume). New unit test for the /proc/mtd nvdata parse;
full flash suite 56 green.
NOTE: the live attach/mount/write flow is not yet hardware-validated - it needs
a NAND-enabled a113d image staged once via the stock/dsh path to test against.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qHxYpv7yf7Ah57g4rQ
Add the S21 Pro-class Amlogic A113D/AXG flash module to the toolkit, matching
the Zynq-7010 treatment, plus CLI routing for plan/preflight/install.
- crates/alkane-flash/src/boards/a113d.rs: A113dPlan::from_afw validates the
verified manifest (a113d, arm64, preserve, no fip/spl/tpl/u-boot member,
exactly kernel/dtb/rootfs with arm64-image/fdt/uimage formats, per-image
ceilings and total <= nvdata, plus independent magic checks and a
defense-in-depth refusal of any non-nvdata partition carrying an image).
The installer is file-only: it resolves the anthillos/ directory on a
mounted ubifs volume and copies the three files there with staged + read-back
md5 verification. The brick guard is structural - there is no flash_erase,
nandwrite or dd-to-/dev/mtd anywhere in the module, so the FIP (mtd0/1) and
stock boot (mtd4) and mtd2/3/5 can never be touched; every destination is
checked to be a bare basename.
- crates/alkane-flash/src/boards/mod.rs: register the module.
- crates/alkane-cli/src/main.rs: route a113d bundles through afw
plan/preflight/install.
- crates/alkane-artifacts/src/afw.rs: correct the a113d / a113d-s21pro board
profile from armv7 to arm64 (the A113D/AXG is an arm64 SoC).
8 new a113d unit tests; full suite: 55 alkane-flash, 12 alkane-artifacts, all
pass. End-to-end verified: make-afw.sh -> check-afw.py -> alkane-cli afw plan
on a stub a113d bundle.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qHxYpv7yf7Ah57g4rQ
The toolkit now flashes the Zynq update path through the CLI like am335x/cv1835.
- boards/zynq.rs: ZynqPlan::from_afw (validates the zynq-7010 .afw: armv7, preserve,
the kernel/dtb/rootfs image set, zimage/fdt/cpio-gzip formats, size ceilings,
rejects any bootloader/spl/BOOT.bin member and a non-zImage kernel), preflight
(alkane source, root, flash tools, mtd0/mtd1, BOOT.bin-preserve guard), install
(OFFSET-AWARE: nanddump/flash_erase/nandwrite --start at the device-relative
slot offset - kernel 0x2200000, dtb 0x2700000 in /dev/mtd0, rootfs in /dev/mtd1
- with per-region backup + md5 readback), and a hard guard that refuses any
/dev/mtd0 write below BOOTBIN_PRESERVE so BOOT.bin can never be clobbered.
- alkane-artifacts: add the strict 'zimage' image format (magic 0x016f2818 at 0x24).
- alkane-cli: route zynq-7010 through afw plan/preflight/install.
- 6 module tests (good plan, non-zImage, oversize, bootloader member, wrong
board/arch, every-mtd0-target-above-BOOT.bin). Full flash suite 47 green,
artifacts green; the real bundle renders its plan through the CLI.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qHxYpv7yf7Ah57g4rQ
Three fixes found running the real tier-3 preflight against the stock .64 board:
- preflight fingerprint ended in 'ls <our release files>' which exits 1 on a stock
board (none exist), failing the whole command; append '|| true'.
- classify() only knew the Amlogic stock kernel (4.9.38); the AM335x stock is
3.8.13+ with an Antminer model line - recognize both so source-os matches the
plan's stock-bitmain.
- the mtd-map check compared the vendor label (spl/u-boot/...) to the mtdN device
name and so always failed on real hardware; validate live geometry by index+size
against the plan's partitions instead (labels are board-specific, not in our map).
- dry-run message now lists the real write targets from the plan (was a hard-coded
'mtd8, mtd6 and mtd7' that omitted mtd4 on tier 3).
Preflight + dry-run now PASS against the live stock board (all 10 checks). Unit
suite still 41 green.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qHxYpv7yf7Ah57g4rQ
The am335x flash module now selects a per-tier Profile from the bundle's board:
tier 2 (am335x, preserve) or tier 3 (am335x-stock, include). The byte-write
engine, preflight and readback are shared; only the policy, preserved set,
12-partition map (mtd4 becomes a write target) and image list differ.
- boards/am335x.rs: Profile/profile_for/owns_board; MTD_MAP_STOCK (mtd4 writable,
kernel at write_order 4 so U-Boot lands first); from_afw accepts am335x-stock,
permits exactly the u-boot bootloader member, still rejects any SPL member and
a u-boot member on tier 2; check_uimage expects firmware type 5 for u-boot;
the plan carries its board + preserved set; render is tier-aware.
- restore() takes the preserved set per profile; SPL copies (mtd0-3) are never a
restore target on any tier; mtd4 is restorable on tier 3.
- alkane-cli: route am335x-stock to the module (plan/preflight/install); restore
is profile-driven and adds --held-uboot (mtd4) for the from-stock set.
- alkane-artifacts: board_profile knows am335x-stock (arm, include).
- tests: tier-3 from_afw acceptance (4 targets, U-Boot before kernel, mtd4 not
preserved), wrong-U-Boot-type and SPL-write-target rejection, and a tier-3
restore test (mtd4 allowed, SPL refused). Full flash suite 41 green; tier-2 and
cv1835 unchanged. The real bundle parses and verifies through the CLI.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qHxYpv7yf7Ah57g4rQ
Parse and verify the fixed-order .afw container, add the CV1835 board
module and an SSH transport with the stock update-daemon root stage, a
read-only preflight, a held p1 backup, whole-partition read-back, live
verification and network restore. Add the headless afw CLI and offline
fixtures for good, tampered, wrong-board, truncated, traversal and
oversize bundles.
Co-Authored-By: DeepSeek Harness <noreply@deepseek.com>
The play/pause icons on macOS light buttons were about 2.6:1, because
native macOS buttons paint #ebebeb on a white window, not the system
button-face colour the check used. Check the icons against the button
face, the window colour and a shade 20 steps toward the opposite end.
They now measure 3.1:1 on the Mac (light and dark checked in real
system appearance), and stay above 3:1 on Linux and Windows.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBRg6YCM1XXQCTnD5GF
Checked in real system dark and light mode on macOS (SkyLight theme
switch on the M1, restored afterwards), Windows 11 (the app-mode
setting, run on the VM's desktop) and Linux (Adwaita and Adwaita:dark),
measuring each screenshot's text against its background with the WCAG
contrast formula.
The app's own colours fell short on every platform. The fixed firmware
hues were 2.6 to 3.9:1 (LuxOS gold and ePIC blue on light, Alkane navy,
Braiins purple and Bixbit red on dark). The hashrate greens and
temperature purples were about 4:1, and the play/pause icons about 2:1
on light buttons.
- readable()/readable_at(): nudge a colour toward black (light theme)
or white (dark theme), keeping its hue, until it reaches 4.5:1 for
text (3:1 for icons) against every given background.
- palette(): green/amber/red/accent/label are made readable against the
window, the zebra row and the KPI card; Palette::text() guards every
computed cell colour (ratio and temperature blends, firmware hues).
- Media button icons: at least 3:1 against the theme's button face.
- macOS snapshot (wx-rs patch 0011): capture the window's frame view.
The content view alone left unpainted areas transparent, which read
as a white toolbar strip in dark mode. On screen the area was always
the dark window colour.
After the change, no app-coloured text is below 4.5:1 in any of the
six theme/platform combinations. What the checker still flags is theme
chrome (grid lines, GTK header labels, button outlines, the zoom
slider) and anti-aliasing on thin fonts.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBRg6YCM1XXQCTnD5GF