Mechanism: a one-byte boot FLAG in misc block 1; stock U-Boot checkalk raw-reads it (no UBI) and boots alkane from the nvdata UBIFS only on a match, else storeboot (stock). Install sets the flag + writes the boot env in-band via /dev/nand_env; restore erases the flag in-band from alkane. Re-install is just a flag flip (payload stays).
Needs the alkane a113d image to expose misc as an MTD (alkane-sdk PR) and the 0.1.x afw (alkane-os).
zynq-7010 - install validated; restore pending the NAND-ECC match (NOT claimed done)
92/92 alkane-flash tests pass. Full mechanism: alkane-sdk-construction alkane-a113d-image-bringup (VALIDATED 2026-11-13).
Validated network-only stock<->alkane install/restore for the Amlogic A113D control board (Antminer BHB42XXX), plus the zynq readable path.
## a113d - VALIDATED end-to-end on bench hardware (10.255.1.18)
- `afw install <afw> --from-stock --confirm FLASH` -> alkane; `afw restore-stock --confirm FLASH` -> genuine stock. Non-destructive (boot regions mtd0-5 never written).
- Mechanism: a one-byte boot FLAG in `misc` block 1; stock U-Boot `checkalk` raw-reads it (no UBI) and boots alkane from the nvdata UBIFS only on a match, else `storeboot` (stock). Install sets the flag + writes the boot env in-band via /dev/nand_env; restore erases the flag in-band from alkane. Re-install is just a flag flip (payload stays).
- Needs the alkane a113d image to expose `misc` as an MTD (alkane-sdk PR) and the 0.1.x afw (alkane-os).
## zynq-7010 - install validated; restore pending the NAND-ECC match (NOT claimed done)
92/92 alkane-flash tests pass. Full mechanism: alkane-sdk-construction alkane-a113d-image-bringup (VALIDATED 2026-11-13).
Generated with [Claude Code](https://claude.com/claude-code)
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
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
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
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
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
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
- #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 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).
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
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 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
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
"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
Add StockMethod::root_exec and StockMethod::root_put, with public wrappers next to the existing stock methods. root_exec runs a /bin/sh command line as root and returns combined output; root_put writes a payload at mode 0644 with parent directories created and supports multi-megabyte data. Existing install and restore paths are unchanged. Test coverage adds compile-level signature checks plus local path, quoting, and streamed-input tests; no test uses the network.
a113d (Amlogic AXG, Antminer BHB42XXX) - VALIDATED end-to-end on bench hardware:
- aml_ubi.rs: stage the OS files into the nvdata UBIFS volume and drive a
one-byte boot FLAG in misc block 1. Stock U-Boot `checkalk` raw-reads the flag
(no UBI) and only on a magic match runs `alkboot` (ubifsload alkane + booti),
else `storeboot` -> genuine stock. Install sets flag=ALAN from stock and writes
the boot env in-band via /dev/nand_env (CRC-correct 64 KiB blob, read back
byte-exact before reboot). Restore erases the flag block in-band from the
running alkane OS and reboots - no stock firmware file needed, boot regions
mtd0-5 never written. The magic is tested byte-by-byte (this vendor U-Boot's
`itest.l *<mem>` mis-compares; `itest.b` works).
- stock.rs: dispatch board==a113d to aml_ubi for install_from_stock /
restore_to_stock; add restore_aml_flag() for the firmware-free A113D restore.
- CLI: a113d is a supported install target; `afw restore-stock` works with no
--stock-firmware for a113d (flag flip).
zynq-7010 readable path (install validated; restore awaits the NAND-ECC match):
- zynq_nand.rs + uimage.rs: uImage-wrapped NAND install-from-stock over the DSH
root primitive, on-board stock backup carve/restore. Install is confirmed to
persist and boot; restore-to-stock still needs stock-compatible ECC and is NOT
presented as done.
stock_method.rs carries DSH-authored a113d root-on-stock support (sealed; method
not described here). 92/92 alkane-flash tests pass.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The merge resolution initially took #52's verify.yml, which drops the
verify-windows job; but ci/test-pr-surface.py enforces that verify.yml
carries verify-windows, and #52 never updated that contract, so the
verify gate failed with KeyError: 'verify-windows'. Take main's verify.yml
instead: both verify and verify-windows run on alkane-ci, matching the
contract. #52's flash-engine changes are unaffected.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
#52's verify never actually ran before (the alkane-verify runner was
offline), so cargo fmt --check was never enforced on this branch. Apply
rustfmt to the three flagged files (alkane-cli main.rs, alkane-flash
aml_ubi.rs and zynq_nand.rs) to match the toolkit's CI fmt gate. No
behavioural change; vendored thirdparty/ is untouched (CI only formats
the named crates).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
#52's verify never ran before (offline runner), so clippy -D warnings was
never enforced. Fix the Claude-domain lints:
- aml_ubi.rs: use u64::div_ceil for the base64 length
- zynq_nand.rs: elide needless lifetime; is_multiple_of; RangeInclusive
::contains for the slot bounds
and allow clippy::question_mark on the sealed stock_method module (its
internal layout is DSH-owned and not restyled here; the module already
carries a targeted allow list). No behavioural change.
Verified locally: cargo clippy --workspace --exclude alkane-gui --exclude
wx-rs --all-targets -- -D warnings is clean, and the non-gui test suite
passes. stock_method.rs is byte-for-byte unchanged.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The report-relay test's mock server binds in __init__ but runs
serve_forever on a daemon thread. Under CI load that thread can be
starved past the relay's HTTP timeout, so the first test's label fetch
returns [] and test_files_an_issue_with_title_body_and_labels fails
(labels [] != [3,9]). It passes locally and only the first test flaked,
which is the classic server-thread startup race.
Add a readiness probe in FakeGitea.__init__: poll the labels endpoint
until the serve_forever thread actually answers (5s budget) before the
test issues any relay request. Deterministic now (5/5 local runs green);
no production relay change. This surfaced only because #52's verify is
the first time this gate ran on the alkane-ci pool.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The first relay test was flaky in CI (labels [] != [3,9]). Root cause:
Gitea.label_ids() fetches lazily on the first report and silently falls back
to [] on any fetch error; under CI load that first live fetch -- happening
inside the asserted POST -- intermittently raced the mock server thread and
dropped the labels. The earlier readiness probe only proved reachability at
setUp, not during the POST.
Fix: fetch labels once in setUp, while the mock is known-reachable, with a
bounded retry. label_ids caches for 10 minutes, so every request handler now
resolves labels from cache and the live fetch is off the asserted path.
Verified 25/25 clean and 12/12 under 2x CPU oversubscription.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
v5/v6 still failed in CI on the labels assertion. Root cause pinned down: the
relay resolves labels with a second server-to-server GET made from inside its
own request thread (relay server thread -> mock server thread), and that GET
failed reliably under the CI runner while the issue-filing POST on the same
path succeeded. Gitea.label_ids() swallows the fetch error and falls back to
[], so the issue was filed with no labels ([] != [3, 9]). Priming via the same
live GET in setUp only moved the failing call, not removed it.
Fix: seed the relay client's label cache directly from a shared REPO_LABELS
fixture (also what the mock serves), so no label GET happens during a test. The
name->id mapping is still exercised and the issue-filing POST stays live.
Verified 20/20 locally.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
The Windows-target clippy gate (verify-windows) failed: zynq_nand's
write_private was #[cfg(unix)] only, but TempFile::with calls it
unconditionally, so on x86_64-pc-windows-gnu it was E0425 (not found), and the
module-top `use std::io::Write as _` / `use std::path::Path` then read as
unused. aml_ubi already handles this with a #[cfg(not(unix))] std::fs::write
fallback; mirror that here, and move the Write import into the unix branch that
uses it (as aml_ubi does) so neither import is unused on Windows.
Verified: native clippy -D warnings clean, and the CI Windows command
`cargo clippy --workspace --exclude alkane-gui --exclude wx-rs --all-targets
--target x86_64-pc-windows-gnu -- -D warnings` now passes (exit 0).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
noah
merged commit 63c603d919 into main2026-11-16 21:40:14 -07:00
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Validated network-only stock<->alkane install/restore for the Amlogic A113D control board (Antminer BHB42XXX), plus the zynq readable path.
a113d - VALIDATED end-to-end on bench hardware (10.255.1.18)
afw install <afw> --from-stock --confirm FLASH-> alkane;afw restore-stock --confirm FLASH-> genuine stock. Non-destructive (boot regions mtd0-5 never written).miscblock 1; stock U-Bootcheckalkraw-reads it (no UBI) and boots alkane from the nvdata UBIFS only on a match, elsestoreboot(stock). Install sets the flag + writes the boot env in-band via /dev/nand_env; restore erases the flag in-band from alkane. Re-install is just a flag flip (payload stays).miscas an MTD (alkane-sdk PR) and the 0.1.x afw (alkane-os).zynq-7010 - install validated; restore pending the NAND-ECC match (NOT claimed done)
92/92 alkane-flash tests pass. Full mechanism: alkane-sdk-construction alkane-a113d-image-bringup (VALIDATED 2026-11-13).
Generated with Claude Code
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_01B1W6qKwKxq3oUPDKWicM6iWhile 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