gui: right-click install/uninstall of alkane-os via the self-contained engine
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
This commit is contained in:
+46
-11
@@ -1,7 +1,13 @@
|
||||
# Installing and removing alkane-os
|
||||
|
||||
The CLI (`alkane-cli afw ...`) is the supported flashing path. In-app (GUI)
|
||||
flashing is disabled while that path is reworked; it will call the same engine.
|
||||
Two front-ends drive the same self-contained engine:
|
||||
|
||||
- The CLI (`alkane-cli afw ...`), documented below, is the scriptable path.
|
||||
- The GUI (`alkane-toolkit`) can scan the fleet, then right-click a board to
|
||||
install alkane-os onto it from stock or restore it to stock. See
|
||||
"GUI (right-click install / uninstall)" at the end. (The GUI's older asic-rs
|
||||
firmware-upload path stays disabled; these two actions use the compiled-in
|
||||
network-only engine, the same one the CLI uses.)
|
||||
|
||||
## Compatible miners
|
||||
|
||||
@@ -41,13 +47,12 @@ stock gates and getting root) is done by the toolkit itself, over the network.
|
||||
The method is part of this binary; nothing else needs to be installed on your
|
||||
machine. On first use it fetches a small set of per-board assets from our Gitea
|
||||
(repo `blueflare/alkane-stock-assets`, release `zynq-7010-v1`) and caches them
|
||||
locally, verifying each against a known SHA-256. That repo is private, so set a
|
||||
Gitea token in the environment first (`ALKANE_RELEASE_TOKEN`, else
|
||||
`GITEA_TOKEN`); it is passed to curl through a private 0600 config, never on the
|
||||
command line. The asset base URL can be overridden with
|
||||
locally, verifying each against a known SHA-256. That repo is public, so no token
|
||||
is needed for the stock assets. The asset base URL can be overridden with
|
||||
`ALKANE_STOCK_ASSETS_BASE`.
|
||||
|
||||
Add `--from-stock`:
|
||||
Add `--from-stock` (the token below is only to resolve `--latest` from the
|
||||
private alkane-os release repo; a local `.afw` needs no token):
|
||||
|
||||
```
|
||||
export ALKANE_RELEASE_TOKEN=<your-gitea-token>
|
||||
@@ -81,7 +86,37 @@ alkane-cli afw restore-stock --host <miner-ip> \
|
||||
|
||||
Returning an aftermarket board to genuine stock is also done by the toolkit
|
||||
itself, over the network. It uses the same per-board assets (fetched/cached as
|
||||
above, so the Gitea token is needed) and the board's alkane root credential
|
||||
(`--password-file`, or `ALKANE_BOARD_PASSWORD`/`ALKANE_BOARD_PASSWORD_FILE`). You
|
||||
then verify independently that the board no longer answers as alkane and
|
||||
presents its stock OS.
|
||||
above from the now-public assets repo, so no token is needed) and the board's
|
||||
alkane root credential (`--password-file`, or
|
||||
`ALKANE_BOARD_PASSWORD`/`ALKANE_BOARD_PASSWORD_FILE`). You then verify
|
||||
independently that the board no longer answers as alkane and presents its stock
|
||||
OS.
|
||||
|
||||
## GUI (right-click install / uninstall)
|
||||
|
||||
The GUI binary is `alkane-toolkit`. Launch it, let the scan list the fleet, then
|
||||
right-click one or more boards and choose:
|
||||
|
||||
- "Install alkane OS (from stock)..." - scans the alkane-os releases on Gitea,
|
||||
lets you pick one (newest first; pre-releases are marked), optionally takes a
|
||||
board password and an "allow unsigned .afw (bench)" toggle, and - after you
|
||||
type FLASH to confirm - downloads/verifies the `.afw` and installs it onto each
|
||||
selected board over the network, via the same compiled-in from-stock engine the
|
||||
CLI uses.
|
||||
- "Uninstall alkane OS (restore to stock)..." - takes the board's alkane root
|
||||
password and a typed FLASH confirmation, then restores each selected board to
|
||||
genuine stock over the network.
|
||||
|
||||
Progress and per-board results appear on the status bar; verify board state
|
||||
independently afterwards (the GUI does not claim liveness on its own).
|
||||
|
||||
Release scanning reads the private `alkane-os` repo, so it needs a Gitea token.
|
||||
A read-only token can be baked into the GUI at build time
|
||||
(`ALKANE_EMBEDDED_TOKEN=<token>` when building), so the shipped binary scans
|
||||
releases with no setup; otherwise set `ALKANE_RELEASE_TOKEN` (or `GITEA_TOKEN`)
|
||||
in the environment before launching. The stock-asset fetch needs no token (that
|
||||
repo is public), so install-from-stock and restore-to-stock work without one -
|
||||
only the release picker needs it.
|
||||
|
||||
Runtime dependencies (Linux): the GUI links wxWidgets 3.2 (wxGTK) and GTK 3, so
|
||||
the target machine needs `libwxgtk3.2-1` and `libgtk-3-0` installed.
|
||||
|
||||
Reference in New Issue
Block a user