Add microdroid_resources directory to ramdisk & system images
This tmpfs will be used to store the dice chain generated by
first_stage_init in for Microdroid VMs with microdroid vendor partition.
Actual binary that generates & stores the dice chain will be implemented
in a follow-up patch.
Bug: 287593065
Test: atest MicrodroidTests
Change-Id: I714b0b749c5cf96110c44ca3dfe7528ca734d619
diff --git a/microdroid/Android.bp b/microdroid/Android.bp
index 999dc52..eebe153 100644
--- a/microdroid/Android.bp
+++ b/microdroid/Android.bp
@@ -49,10 +49,12 @@
module_type: "android_system_image",
config_namespace: "ANDROID",
bool_variables: [
+ "release_avf_enable_dice_changes",
"release_avf_enable_multi_tenant_microdroid_vm",
],
properties: [
"deps",
+ "dirs",
],
}
@@ -154,6 +156,11 @@
// Below are dependencies that are conditionally enabled depending on value of build flags.
soong_config_variables: {
+ release_avf_enable_dice_changes: {
+ dirs: [
+ "microdroid_resources",
+ ],
+ },
release_avf_enable_multi_tenant_microdroid_vm: {
deps: [
"microdroid_etc_passwd",
@@ -295,7 +302,19 @@
},
}
-android_filesystem {
+soong_config_module_type {
+ name: "flag_aware_microdroid_filesystem",
+ module_type: "android_filesystem",
+ config_namespace: "ANDROID",
+ bool_variables: [
+ "release_avf_enable_dice_changes",
+ ],
+ properties: [
+ "dirs",
+ ],
+}
+
+flag_aware_microdroid_filesystem {
name: "microdroid_ramdisk",
deps: [
"init_first_stage.microdroid",
@@ -305,14 +324,23 @@
"proc",
"sys",
- // TODO(jiyong): remove these
"mnt",
"debug_ramdisk",
"second_stage_resources",
],
type: "compressed_cpio",
+
+ // Below are dependencies that are conditionally enabled depending on value of build flags.
+ soong_config_variables: {
+ release_avf_enable_dice_changes: {
+ dirs: [
+ "microdroid_resources",
+ ],
+ },
+ },
}
+// TODO(ioffe): rename to microdroid_first_stage_ramdisk
android_filesystem {
name: "microdroid_fstab_ramdisk",
deps: [