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
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go
index 59470d3..faf3ee2 100644
--- a/fsgen/filesystem_creator.go
+++ b/fsgen/filesystem_creator.go
@@ -78,7 +78,7 @@
 	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 @@
 		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")}
+		}
 	}
 }