fix(gui): bench driver uses the alkane root credential for the restore leg
source / check (pull_request) Skipped
verify / verify (pull_request) Skipped
source / check (pull_request) Skipped
verify / verify (pull_request) Skipped
The flag-restore reaches the running alkane board over SSH as root, which is a different credential from the stock login used for install. Alkane bench images bake root/alkane; pass that (overridable via ALKANE_ROOT_PASSWORD) to the restore, and keep the saved board SSH credential for the install. The previous single-credential handoff sent the stock login to the alkane root restore and hit "Permission denied". Hardware note (2026-11-16): the PHY-fixed afw installs and comes up REACHABLE on alkane (both the image PHY fix and the driver's MAC rediscovery proven); the in-band flag-restore still needs the alkane DTB to expose the `misc` MTD (it currently exposes only nvdata), tracked separately. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B1W6qKwKxq3oUPDKWicM6i
This commit is contained in:
@@ -228,17 +228,22 @@ pub fn run(spec: &str) -> i32 {
|
|||||||
};
|
};
|
||||||
let iterations: u32 = it.next().and_then(|s| s.parse().ok()).unwrap_or(1);
|
let iterations: u32 = it.next().and_then(|s| s.parse().ok()).unwrap_or(1);
|
||||||
let board = "a113d".to_string();
|
let board = "a113d".to_string();
|
||||||
// The A113D flag-restore reaches the running alkane board over SSH as root,
|
// Install reaches STOCK via the compiled-in from-stock method; pass the saved
|
||||||
// so use the saved SSH credential (not the web/API one). Install reaches
|
// board SSH credential through to it.
|
||||||
// stock via the compiled-in method (its own root access); the same password
|
let stock_password = credentials::load_ssh_credentials().map(|(_, p)| p);
|
||||||
// is passed through, matching the GUI's single-credential model.
|
// The flag-restore reaches the running ALKANE board over SSH as `root` - a
|
||||||
let password = credentials::load_ssh_credentials().map(|(_, p)| p);
|
// DIFFERENT credential from the stock login. Alkane bench images bake
|
||||||
|
// root/alkane; allow an override via ALKANE_ROOT_PASSWORD.
|
||||||
|
let alkane_password = std::env::var("ALKANE_ROOT_PASSWORD")
|
||||||
|
.ok()
|
||||||
|
.or_else(|| Some("alkane".to_string()));
|
||||||
|
|
||||||
println!("== A113D headless GUI bench sequence (network-only install <-> flag-restore) ==");
|
println!("== A113D headless GUI bench sequence (network-only install <-> flag-restore) ==");
|
||||||
println!(
|
println!(
|
||||||
"host={host} afw={} board={board} iterations={iterations} credential={}",
|
"host={host} afw={} board={board} iterations={iterations} stock_cred={} alkane_cred={}",
|
||||||
afw.display(),
|
afw.display(),
|
||||||
if password.is_some() { "loaded" } else { "none" }
|
if stock_password.is_some() { "loaded" } else { "none" },
|
||||||
|
if alkane_password.is_some() { "set" } else { "none" }
|
||||||
);
|
);
|
||||||
if !afw.exists() {
|
if !afw.exists() {
|
||||||
eprintln!("afw not found: {}", afw.display());
|
eprintln!("afw not found: {}", afw.display());
|
||||||
@@ -266,7 +271,7 @@ pub fn run(spec: &str) -> i32 {
|
|||||||
board.clone(),
|
board.clone(),
|
||||||
AfwSource::Local(afw.clone()),
|
AfwSource::Local(afw.clone()),
|
||||||
true, // allow unsigned (bench image)
|
true, // allow unsigned (bench image)
|
||||||
password.clone(),
|
stock_password.clone(),
|
||||||
false, // not an in-place update
|
false, // not an in-place update
|
||||||
);
|
);
|
||||||
if !drive("install", h) {
|
if !drive("install", h) {
|
||||||
@@ -286,7 +291,7 @@ pub fn run(spec: &str) -> i32 {
|
|||||||
|
|
||||||
// 3. restore (alkane -> stock) flag-flip at the board's CURRENT address
|
// 3. restore (alkane -> stock) flag-flip at the board's CURRENT address
|
||||||
println!("[3/4] restore: alkane -> stock (flag flip) at {alkane_ip}");
|
println!("[3/4] restore: alkane -> stock (flag flip) at {alkane_ip}");
|
||||||
let h = stock_ops::start_restore_flag(vec![alkane_ip.clone()], password.clone());
|
let h = stock_ops::start_restore_flag(vec![alkane_ip.clone()], alkane_password.clone());
|
||||||
if !drive("restore", h) {
|
if !drive("restore", h) {
|
||||||
all_ok = false;
|
all_ok = false;
|
||||||
println!("[3/4] restore FAILED");
|
println!("[3/4] restore FAILED");
|
||||||
|
|||||||
Reference in New Issue
Block a user