2 Commits
Author SHA1 Message Date
noahandClaude Opus 5.5 2d3417b7d3 web: public read-only GET /api/identity for fleet discovery
source-pr / source (pull_request) Successful in 3m26s
alkane-toolkit's fleet scan (asic-rs) recognises miners by their cgminer
socket or vendor web UI; an Alkane board has neither exposed, so it never
appeared and could not be right-clicked to flash. Add an open, read-only
identity endpoint beside /api/summary: os, os_version, board, sdk_revision,
hostname, mac, kernel - nothing a stock miner does not already expose, no
secret. The .afw packager stamps the bundle version into
/etc/alkane-os-version for it. Tests: served without a session; every field
read from the board files; absent files read as null.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
2026-11-12 15:40:02 -06:00
noahandClaude Opus 4.8 18b5fac584 image: build the console into a zynq-7010 .afw + fix serve_only API bind
Produce a flashable zynq-7010 image carrying the current console, and make the
image serve it on boot.

- image/make-zynq-afw.sh: cross-compiles alkane-os for armv7 (static musl,
  matching the SDK rootfs; the ARM cross-gcc is the linker since the host cc
  cannot link ARM objects), drops the binary and the image overlay into the SDK's
  zynq rootfs, repacks the ramdisk under fakeroot (device nodes + root ownership
  preserved), and packages zImage + dtb + rootfs into a .afw via ci/make-afw.sh.
- image/overlay/etc/init.d/S60alkane-web: starts `alkane-os --serve` after the
  network, so the booted image serves the console (login + read-only API) on :80.
  The SDK init owns board-detect/network/ssh and leaves the console to this.
- main.rs: fix serve_only to default the cgminer API to loopback (127.0.0.1:4028)
  instead of 0.0.0.0, which bind_local (loopback-only) rejected - so plain
  `--serve` now starts instead of failing to bind.

Verified: the build produces dist/alkane-os-0.1.0-zynq-7010-armv7.afw (check-afw
OK: kernel 4.3MB, dtb 11KB, rootfs 3.26MB), the rootfs carries the new binary +
the web-init overlay, and the static armv7 binary runs under qemu-arm and serves
the console end to end (login page renders, admin/admin -> 303 session,
/api/hardware open). dist/ is gitignored, so the artifact is not committed.
clippy -D warnings clean, no emojis.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01BdKQBPjAXpCwmigUov5eQk
2026-11-10 21:26:53 -06:00