Hide android14-6.1-pkvm_experimental GKI behind separate product flag
The new PRODUCT_AVF_MICRODROID_GUEST_GKI_VERSION flag is used to define
which GKI image to include into the com.android.virt APEX. This flag
will be used in our internal testing of device assignment feature.
This product flag impacts the GSI image. I think this is fine, since the
device assignment (and hence microdroid vendor modules) features are not
mandated for Android V, so the GSI build won't have the GKI image inside
com.android.virt APEX.
Ideally, we would prefer to move the GKI image for Microdroid guest
outside of the com.android.virt APEX to somewhere on /system_ext,
however such change will be quite involved, as it will require
significant changes to the signing scripts. Until we do such
refactoring, this temporary approach (I think) should suffice.
Bug: 329383978
Test: adb shell /apex/com.android.virt/bin/vm info
Test: AVF presubmit
Change-Id: I1016b90c5d9b17820726304d25f5cfdfb7f3bb25
diff --git a/apex/Android.bp b/apex/Android.bp
index dfb979e..48b7b1f 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -32,6 +32,13 @@
},
}
+soong_config_string_variable {
+ name: "avf_microdroid_guest_gki_version",
+ values: [
+ "android14_61_pkvm_experimental",
+ ],
+}
+
soong_config_module_type {
name: "avf_flag_aware_apex_defaults",
module_type: "apex_defaults",
@@ -44,6 +51,9 @@
"release_avf_enable_virt_cpufreq",
"release_avf_support_custom_vm_with_paravirtualized_devices",
],
+ variables: [
+ "avf_microdroid_guest_gki_version",
+ ],
properties: [
"androidManifest",
"arch",
@@ -154,6 +164,16 @@
"EmptyPayloadApp",
],
soong_config_variables: {
+ avf_microdroid_guest_gki_version: {
+ android14_61_pkvm_experimental: {
+ prebuilts: [
+ "microdroid_gki-android14-6.1-pkvm_experimental_initrd_debuggable",
+ "microdroid_gki-android14-6.1-pkvm_experimental_initrd_normal",
+ "microdroid_gki-android14-6.1-pkvm_experimental_kernel",
+ "microdroid_gki-android14-6.1-pkvm_experimental.json",
+ ],
+ },
+ },
release_avf_enable_device_assignment: {
prebuilts: [
"com.android.virt.vfio_handler.rc",
@@ -170,14 +190,6 @@
release_avf_enable_llpvm_changes: {
androidManifest: "AndroidManifest.xml",
},
- release_avf_enable_vendor_modules: {
- prebuilts: [
- "microdroid_gki-android14-6.1-pkvm_experimental_initrd_debuggable",
- "microdroid_gki-android14-6.1-pkvm_experimental_initrd_normal",
- "microdroid_gki-android14-6.1-pkvm_experimental_kernel",
- "microdroid_gki-android14-6.1-pkvm_experimental.json",
- ],
- },
release_avf_enable_remote_attestation: {
vintf_fragments: [
"virtualizationservice.xml",