Add soong config variables of paths of *_dlkm partitions and whether they are built for a product.
Update prebuilt_etc to use these variable so fs_config_dirs and fs_config_files could be installed to *_dlkm partitions.
Bug: 377304441
Test: lunch aosp_cf_x86_64_phone-trunk_staging-eng && m, check fs_config_dirs
and fs_config_files exist in etc/ in each partitions
Change-Id: Ic90267f6b3fd60674bb27016cf5f31fc2614e35b
diff --git a/android/config.go b/android/config.go
index 16d77db..275c07f 100644
--- a/android/config.go
+++ b/android/config.go
@@ -1522,6 +1522,13 @@
return "vendor"
}
+func (c *deviceConfig) VendorDlkmPath() string {
+ if c.config.productVariables.VendorDlkmPath != nil {
+ return *c.config.productVariables.VendorDlkmPath
+ }
+ return "vendor_dlkm"
+}
+
func (c *deviceConfig) BuildingVendorImage() bool {
return proptools.Bool(c.config.productVariables.BuildingVendorImage)
}
@@ -1553,6 +1560,13 @@
return proptools.Bool(c.config.productVariables.BuildingOdmImage)
}
+func (c *deviceConfig) OdmDlkmPath() string {
+ if c.config.productVariables.OdmDlkmPath != nil {
+ return *c.config.productVariables.OdmDlkmPath
+ }
+ return "odm_dlkm"
+}
+
func (c *deviceConfig) ProductPath() string {
if c.config.productVariables.ProductPath != nil {
return *c.config.productVariables.ProductPath
@@ -1571,6 +1585,20 @@
return "system_ext"
}
+func (c *deviceConfig) SystemDlkmPath() string {
+ if c.config.productVariables.SystemDlkmPath != nil {
+ return *c.config.productVariables.SystemDlkmPath
+ }
+ return "system_dlkm"
+}
+
+func (c *deviceConfig) OemPath() string {
+ if c.config.productVariables.OemPath != nil {
+ return *c.config.productVariables.OemPath
+ }
+ return "oem"
+}
+
func (c *deviceConfig) BtConfigIncludeDir() string {
return String(c.config.productVariables.BtConfigIncludeDir)
}