Add prebuilt kernel that supports loading modules
So far this kernel is based on GKI with some configs tweaked. Since it
will be only used for development, a locally built kernel image is
checked in.
The PRODUCT_AVF_KERNEL_MODULES_ENABLED build flag controls whether the
com.android.virt APEX should also include kernel that supports loading
modules.
Bug: 283822676
Bug: 278008256
Test: adb shell /apex/com.android.virt/bin/vm run-microdroid \
--protected \
--kernel=/apex/com.android.virt/etc/fs/microdroid_kernel_with_modules
Change-Id: I366fb54a3ffbb2f4a5025fa1f9d02d405a497e20
diff --git a/apex/Android.bp b/apex/Android.bp
index 1c4d357..2dc90d6 100644
--- a/apex/Android.bp
+++ b/apex/Android.bp
@@ -11,8 +11,14 @@
name: "virt_apex",
module_type: "apex",
config_namespace: "ANDROID",
- bool_variables: ["avf_enabled"],
- properties: ["defaults"],
+ bool_variables: [
+ "avf_enabled",
+ "avf_kernel_modules_enabled",
+ ],
+ properties: [
+ "defaults",
+ "prebuilts",
+ ],
}
virt_apex {
@@ -24,6 +30,9 @@
defaults: ["com.android.virt_avf_disabled"],
},
},
+ avf_kernel_modules_enabled: {
+ prebuilts: ["microdroid_kernel_with_modules"],
+ },
},
}