vm tool: rename --gki arg to more generic --os one
This makes it easier to run different variants of microdroid VM both for
testing and debugging.
Additionally remove the flag guarding around --gki argument since the
corresponding flag has been released.
Bug: 333730505
Bug: 317201718
Bug: 365767108
Test: atest MicrodroidHostTestCases
Test: vm run-microdroid --os microdroid
Test: vm run-microdroid --os microdroid_16k (with local patches)
Change-Id: I38d0e24d30b7893fbecfa2eb866cd6ebc82886d9
diff --git a/android/vm/src/run.rs b/android/vm/src/run.rs
index 0e1f4cc..b07a472 100644
--- a/android/vm/src/run.rs
+++ b/android/vm/src/run.rs
@@ -140,11 +140,7 @@
bail!("Either --config-path or --payload-binary-name must be defined")
};
- let os_name = if let Some(ver) = config.microdroid.gki() {
- format!("microdroid_gki-{ver}")
- } else {
- "microdroid".to_owned()
- };
+ let os_name = if let Some(ref os) = config.microdroid.os { os } else { "microdroid" };
let payload_config_str = format!("{:?}!{:?}", config.apk, payload);
@@ -192,7 +188,7 @@
memoryMib: config.common.mem.unwrap_or(0) as i32, // 0 means use the VM default
cpuTopology: config.common.cpu_topology,
customConfig: Some(custom_config),
- osName: os_name,
+ osName: os_name.to_string(),
hugePages: config.common.hugepages,
boostUclamp: config.common.boost_uclamp,
});