a113d: runtime UBI self-update flow + scrub anthillos->alkane

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
This commit is contained in:
2026-11-06 23:02:55 -06:00
co-authored by Claude Opus 4.8
parent c79ee1315d
commit 462ced01a6
2 changed files with 200 additions and 159 deletions
+2 -2
View File
@@ -574,10 +574,10 @@ fn run_install(args: &[String]) -> Result<(), Box<dyn std::error::Error>> {
print!("{}", report.render());
println!("DRY RUN: no file was written into the nvdata UBI.");
let targets = plan.targets.iter().map(|t| t.image_name.as_str()).collect::<Vec<_>>().join(", ");
println!("Re-run with --confirm FLASH to stage {targets} into anthillos/ (FIP + mtd0-5 preserved).");
println!("Re-run with --confirm FLASH to write {targets} into the alkane/ dir on nvdata (FIP + mtd0-5 are not MTD devices).");
}
A113dOutcome::Installed(receipt) => {
println!("wrote OS files into {}", receipt.anthillos);
println!("wrote OS files into the alkane/ dir on nvdata volume {}", receipt.volume);
for backup in &receipt.backups {
match (&backup.path, &backup.md5) {
(Some(path), Some(md5)) => println!(