Add target inventory executable for SDK images
This commit is contained in:
+20
@@ -0,0 +1,20 @@
|
||||
use alkane_os::target_matrix;
|
||||
|
||||
fn main() {
|
||||
match std::env::args().nth(1).as_deref() {
|
||||
Some("--list-targets") => {
|
||||
println!("control_board,hash_chip,algorithm");
|
||||
for target in target_matrix() {
|
||||
println!(
|
||||
"{},{},{:?}",
|
||||
target.control.id, target.chip.id, target.chip.algorithm
|
||||
);
|
||||
}
|
||||
}
|
||||
Some("--version") => println!("alkane-os {}", env!("CARGO_PKG_VERSION")),
|
||||
_ => {
|
||||
eprintln!("usage: alkane-os --list-targets | --version");
|
||||
std::process::exit(2);
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user