Specify additional generated partitions for android_device module
Defines vendor_boot, init_boot and recovery partition module name
properties in android_device.
Also, specifies the above properties and boot_partition_name properties
in filesystem_creator when generating android_device module.
Dependency is now added via `AddFarVariationDependencies`, given that
boot images are `MultilibFirst`.
This change also improves the comments of the properties of
android_device module type.
Test: build auto generated android_device module
Change-Id: I5426e28aa355efeda5cb5f140dd82db7ed06b84c
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index a2840b5..0160159 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -211,6 +211,18 @@
if android.InList("userdata", f.properties.Generated_partition_types) {
partitionProps.Userdata_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "userdata"))
}
+ if android.InList("recovery", f.properties.Generated_partition_types) {
+ partitionProps.Recovery_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "recovery"))
+ }
+ if f.properties.Boot_image != "" {
+ partitionProps.Boot_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "boot"))
+ }
+ if f.properties.Vendor_boot_image != "" {
+ partitionProps.Vendor_boot_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "vendor_boot"))
+ }
+ if f.properties.Init_boot_image != "" {
+ partitionProps.Init_boot_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "init_boot"))
+ }
partitionProps.Vbmeta_partitions = vbmetaPartitions
ctx.CreateModule(filesystem.AndroidDeviceFactory, baseProps, partitionProps)