summaryrefslogtreecommitdiff
path: root/fsgen/filesystem_creator.go
diff options
context:
space:
mode:
author Jihoon Kang <jihoonkang@google.com> 2024-12-19 01:15:33 +0000
committer Jihoon Kang <jihoonkang@google.com> 2024-12-20 00:11:59 +0000
commit1a478e5b01ab2efa05754c932e11d5f2a352f93d (patch)
tree20163b9db826db6e193a1ecb4e0a2599e356f1db /fsgen/filesystem_creator.go
parentbd7afdc2a15e776e9aff208577ab16fd693499f2 (diff)
Make vendor_ramdisk partition install recovery partition files
Implementation details - Set the rootdir and the root directory hash file in the FilesystemProvider. - Create a text file containing the hash of the root directory. - Introduce include_files_of property in filesystem, which its rootdirs are passed as inputs in mkbootfs invocation for building cpio filesystems. - Set the soong generated recovery partition as the include_files_of property of the soong generated vendor_ramdisk partition. Test: Extract vendor ramdisk partition and inspect Bug: 381104942 Change-Id: I8c00d6258b4e8fe094ee72a479b06ebcf5dffaf3
Diffstat (limited to 'fsgen/filesystem_creator.go')
-rw-r--r--fsgen/filesystem_creator.go6
1 files changed, 5 insertions, 1 deletions
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index 59470d3fc..faf3ee236 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -78,7 +78,7 @@ func filesystemCreatorFactory() android.Module {
return module
}
-func generatedPartitions(ctx android.LoadHookContext) []string {
+func generatedPartitions(ctx android.EarlyModuleContext) []string {
partitionVars := ctx.Config().ProductVariables().PartitionVarsForSoongMigrationOnlyDoNotUse
generatedPartitions := []string{"system"}
if ctx.DeviceConfig().SystemExtPath() == "system_ext" {
@@ -373,6 +373,10 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste
fsProps.Security_patch = proptools.StringPtr(partitionVars.VendorDlkmSecurityPatch)
case "odm_dlkm":
fsProps.Security_patch = proptools.StringPtr(partitionVars.OdmDlkmSecurityPatch)
+ case "vendor_ramdisk":
+ if android.InList("recovery", generatedPartitions(ctx)) {
+ fsProps.Include_files_of = []string{generatedModuleNameForPartition(ctx.Config(), "recovery")}
+ }
}
}