a113d (Amlogic AXG/S21 Pro): UBI-file flash module + CLI routing
Add the S21 Pro-class Amlogic A113D/AXG flash module to the toolkit, matching the Zynq-7010 treatment, plus CLI routing for plan/preflight/install. - crates/alkane-flash/src/boards/a113d.rs: A113dPlan::from_afw validates the verified manifest (a113d, arm64, preserve, no fip/spl/tpl/u-boot member, exactly kernel/dtb/rootfs with arm64-image/fdt/uimage formats, per-image ceilings and total <= nvdata, plus independent magic checks and a defense-in-depth refusal of any non-nvdata partition carrying an image). The installer is file-only: it resolves the anthillos/ directory on a mounted ubifs volume and copies the three files there with staged + read-back md5 verification. The brick guard is structural - there is no flash_erase, nandwrite or dd-to-/dev/mtd anywhere in the module, so the FIP (mtd0/1) and stock boot (mtd4) and mtd2/3/5 can never be touched; every destination is checked to be a bare basename. - crates/alkane-flash/src/boards/mod.rs: register the module. - crates/alkane-cli/src/main.rs: route a113d bundles through afw plan/preflight/install. - crates/alkane-artifacts/src/afw.rs: correct the a113d / a113d-s21pro board profile from armv7 to arm64 (the A113D/AXG is an arm64 SoC). 8 new a113d unit tests; full suite: 55 alkane-flash, 12 alkane-artifacts, all pass. End-to-end verified: make-afw.sh -> check-afw.py -> alkane-cli afw plan on a stub a113d bundle. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01B1W6qHxYpv7yf7Ah57g4rQ
This commit is contained in:
@@ -76,8 +76,10 @@ pub fn board_profile(board: &str) -> Option<BoardProfile> {
|
||||
"am335x-stock" => ("arm", BootloaderPolicy::Include),
|
||||
"cv1835" => ("arm64", BootloaderPolicy::Preserve),
|
||||
"zynq-7010" => ("armv7", BootloaderPolicy::Preserve),
|
||||
"a113d" => ("armv7", BootloaderPolicy::Preserve),
|
||||
"a113d-s21pro" => ("armv7", BootloaderPolicy::Preserve),
|
||||
// Amlogic A113D/AXG (S21 Pro-class) control board is arm64; our OS files
|
||||
// are staged in the nvdata UBI and the signed FIP bootloader is preserved.
|
||||
"a113d" => ("arm64", BootloaderPolicy::Preserve),
|
||||
"a113d-s21pro" => ("arm64", BootloaderPolicy::Preserve),
|
||||
"am335x-bb" => ("armv7", BootloaderPolicy::Preserve),
|
||||
"zynq-s17" => ("armv7", BootloaderPolicy::Include),
|
||||
_ => return None,
|
||||
|
||||
Reference in New Issue
Block a user