Add _dlkm properties to `android_device`
android_device will use these props to include the _dlkm files (.ko
kernel files, modules.dep, ...) in target_files.zip
Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_device/android_common/target_files.zip
Bug: 385383524
Change-Id: Id62585f9bf0ea0480ed80898bac84dbd94dc8c8f
diff --git a/filesystem/android_device.go b/filesystem/android_device.go
index 666aa68..0a7b701 100644
--- a/filesystem/android_device.go
+++ b/filesystem/android_device.go
@@ -44,6 +44,12 @@
Vbmeta_partitions []string
// Name of the userdata partition filesystem module
Userdata_partition_name *string
+ // Name of the system_dlkm partition filesystem module
+ System_dlkm_partition_name *string
+ // Name of the vendor_dlkm partition filesystem module
+ Vendor_dlkm_partition_name *string
+ // Name of the odm_dlkm partition filesystem module
+ Odm_dlkm_partition_name *string
}
type androidDevice struct {
@@ -79,6 +85,9 @@
addDependencyIfDefined(a.partitionProps.Vendor_partition_name)
addDependencyIfDefined(a.partitionProps.Odm_partition_name)
addDependencyIfDefined(a.partitionProps.Userdata_partition_name)
+ addDependencyIfDefined(a.partitionProps.System_dlkm_partition_name)
+ addDependencyIfDefined(a.partitionProps.Vendor_dlkm_partition_name)
+ addDependencyIfDefined(a.partitionProps.Odm_dlkm_partition_name)
for _, vbmetaPartition := range a.partitionProps.Vbmeta_partitions {
ctx.AddDependency(ctx.Module(), filesystemDepTag, vbmetaPartition)
}
@@ -96,11 +105,14 @@
builder.Command().Textf("rm -rf %s", targetFilesDir.String())
builder.Command().Textf("mkdir -p %s", targetFilesDir.String())
partitionToSubdir := map[*string]string{
- a.partitionProps.System_partition_name: "SYSTEM",
- a.partitionProps.System_ext_partition_name: "SYSTEM_EXT",
- a.partitionProps.Product_partition_name: "PRODUCT",
- a.partitionProps.Vendor_partition_name: "VENDOR",
- a.partitionProps.Odm_partition_name: "ODM",
+ a.partitionProps.System_partition_name: "SYSTEM",
+ a.partitionProps.System_ext_partition_name: "SYSTEM_EXT",
+ a.partitionProps.Product_partition_name: "PRODUCT",
+ a.partitionProps.Vendor_partition_name: "VENDOR",
+ a.partitionProps.Odm_partition_name: "ODM",
+ a.partitionProps.System_dlkm_partition_name: "SYSTEM_DLKM",
+ a.partitionProps.Vendor_dlkm_partition_name: "VENDOR_DLKM",
+ a.partitionProps.Odm_dlkm_partition_name: "ODM_DLKM",
}
for partition, subdir := range partitionToSubdir {
if partition == nil {