Add *_dlkm properties to android.ModuleBase
To aid mk->bp migration of (system|vendor|odm)_dlkm.img files,
https://r.android.com/3331335 introduced properties to prebuilt_etc to
allow installation of soong etc modules in these partitions. The dlkm.img
files package .ko files and build.prop files. The current plan is to use
`prebuilt_kernel_modules` soong module type to package the .ko files and
create additional modules.* metadata files.
To aid this migration, this CL moves the _dlkm_specific properties to
android.ModuleBase and updates `modulePartition` to return the
corresponding dlkm partition.
Bug: 377562851
Test: m nothing --no-skip-soong-tests
Test: m installclean && m fs_config_files_system_dlkm
verified that $PRODUCT_OUT/system_dlkm/etc/fs_config_files exists
Change-Id: Ia398a85a9a2b81532871a5ab88454317039f44b9
diff --git a/etc/prebuilt_etc.go b/etc/prebuilt_etc.go
index 938f3bd..6bb7ee3 100644
--- a/etc/prebuilt_etc.go
+++ b/etc/prebuilt_etc.go
@@ -135,15 +135,6 @@
// Install symlinks to the installed file.
Symlinks []string `android:"arch_variant"`
- // Install to partition system_dlkm when set to true.
- System_dlkm_specific *bool `android:"arch_variant"`
-
- // Install to partition vendor_dlkm when set to true.
- Vendor_dlkm_specific *bool `android:"arch_variant"`
-
- // Install to partition odm_dlkm when set to true.
- Odm_dlkm_specific *bool `android:"arch_variant"`
-
// Install to partition oem when set to true.
Oem_specific *bool `android:"arch_variant"`
}
@@ -384,13 +375,7 @@
}
baseInstallDirPath := android.PathForModuleInstall(ctx, p.installBaseDir(ctx), p.SubDir())
// TODO(b/377304441)
- if android.Bool(p.properties.System_dlkm_specific) {
- baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().SystemDlkmPath(), p.installBaseDir(ctx), p.SubDir())
- } else if android.Bool(p.properties.Vendor_dlkm_specific) {
- baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().VendorDlkmPath(), p.installBaseDir(ctx), p.SubDir())
- } else if android.Bool(p.properties.Odm_dlkm_specific) {
- baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().OdmDlkmPath(), p.installBaseDir(ctx), p.SubDir())
- } else if android.Bool(p.properties.Oem_specific) {
+ if android.Bool(p.properties.Oem_specific) {
baseInstallDirPath = android.PathForModuleInPartitionInstall(ctx, ctx.DeviceConfig().OemPath(), p.installBaseDir(ctx), p.SubDir())
}