Autogenerate a vendor/ partition
If BUILDING_VENDOR_IMAGE is true
Bug: 374371755
Test: verified that vendor module is not created for aosp_x86_64
Test: verified that vendor module is created for aosp_cf_x86_64_phone
Change-Id: Idb9c017b933be966e3aa4f863d15e837346a1f82
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index 6ff9645..8fcaa20 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -101,6 +101,9 @@
if ctx.DeviceConfig().SystemExtPath() == "system_ext" {
generatedPartitions = append(generatedPartitions, "system_ext")
}
+ if ctx.DeviceConfig().BuildingVendorImage() && ctx.DeviceConfig().VendorPath() == "vendor" {
+ generatedPartitions = append(generatedPartitions, "vendor")
+ }
return &FsGenState{
depCandidates: candidates,
@@ -340,6 +343,9 @@
if android.InList("system_ext", f.properties.Generated_partition_types) {
partitionProps.System_ext_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system_ext"))
}
+ if android.InList("vendor", f.properties.Generated_partition_types) {
+ partitionProps.Vendor_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "vendor"))
+ }
ctx.CreateModule(filesystem.AndroidDeviceFactory, baseProps, partitionProps)
}