From 1a478e5b01ab2efa05754c932e11d5f2a352f93d Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Thu, 19 Dec 2024 01:15:33 +0000 Subject: 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 --- fsgen/filesystem_creator.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'fsgen/filesystem_creator.go') 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")} + } } } -- cgit v1.2.3-59-g8ed1b