From 6dd13b600c77a151affe3daba262ef1ab745cc66 Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Tue, 22 Oct 2024 23:21:02 +0000 Subject: Generate product partition filesystem module in filesystem_creator Bug: 374388294 Test: CI Change-Id: I02786d0e9bf1a43a3527b647d5379d35e489076c --- fsgen/filesystem_creator.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'fsgen/filesystem_creator.go') diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go index ab89114e8..fde344b5b 100644 --- a/fsgen/filesystem_creator.go +++ b/fsgen/filesystem_creator.go @@ -104,6 +104,9 @@ func createFsGenState(ctx android.LoadHookContext) *FsGenState { if ctx.DeviceConfig().BuildingVendorImage() && ctx.DeviceConfig().VendorPath() == "vendor" { generatedPartitions = append(generatedPartitions, "vendor") } + if ctx.DeviceConfig().BuildingProductImage() && ctx.DeviceConfig().ProductPath() == "product" { + generatedPartitions = append(generatedPartitions, "product") + } return &FsGenState{ depCandidates: candidates, @@ -346,6 +349,9 @@ func (f *filesystemCreator) createDeviceModule(ctx android.LoadHookContext) { if android.InList("vendor", f.properties.Generated_partition_types) { partitionProps.Vendor_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "vendor")) } + if android.InList("product", f.properties.Generated_partition_types) { + partitionProps.Product_partition_name = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "product")) + } ctx.CreateModule(filesystem.AndroidDeviceFactory, baseProps, partitionProps) } -- cgit v1.2.3-59-g8ed1b