diff options
author | 2025-01-10 00:51:25 +0000 | |
---|---|---|
committer | 2025-01-10 00:57:34 +0000 | |
commit | c49b85e5d8eb338601e1d96a06ba4c39076fdd72 (patch) | |
tree | a6de96232ed7dab6c525efb58ac85fc8917e95a9 /fsgen/filesystem_creator.go | |
parent | 3ec6d067389a74ea01b86e6cc16c8cfb5ba14afc (diff) |
Add a Stem property to filesystem
If set, it will be used as the filename of the final .img artifact
instead of the $module_name +.img. The use case for this is to make the
filenames of the img files consistent in target_files.zip irrespective
of $TARGET_PRODUCT.
Test: built the filesystems locally
Bug: 388635097
Change-Id: I13310d609bb6170b52f92c284b933cee2a646254
Diffstat (limited to 'fsgen/filesystem_creator.go')
-rw-r--r-- | fsgen/filesystem_creator.go | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go index 590d33ae4..a070e014e 100644 --- a/fsgen/filesystem_creator.go +++ b/fsgen/filesystem_creator.go @@ -321,6 +321,7 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste if ctx.DeviceConfig().SystemExtPath() == "system_ext" { fsProps.Import_aconfig_flags_from = []string{generatedModuleNameForPartition(ctx.Config(), "system_ext")} } + fsProps.Stem = proptools.StringPtr("system.img") case "system_ext": if partitionVars.ProductFsverityGenerateMetadata { fsProps.Fsverity.Inputs = []string{ @@ -331,6 +332,7 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste fsProps.Fsverity.Libs = []string{":framework-res{.export-package.apk}"} } fsProps.Security_patch = proptools.StringPtr(ctx.Config().PlatformSecurityPatch()) + fsProps.Stem = proptools.StringPtr("system_ext.img") case "product": fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true) fsProps.Android_filesystem_deps.System = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system")) @@ -338,6 +340,7 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste fsProps.Android_filesystem_deps.System_ext = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system_ext")) } fsProps.Security_patch = proptools.StringPtr(ctx.Config().PlatformSecurityPatch()) + fsProps.Stem = proptools.StringPtr("product.img") case "vendor": fsProps.Gen_aconfig_flags_pb = proptools.BoolPtr(true) fsProps.Symlinks = []filesystem.SymlinkDefinition{ @@ -355,6 +358,7 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste fsProps.Android_filesystem_deps.System_ext = proptools.StringPtr(generatedModuleNameForPartition(ctx.Config(), "system_ext")) } fsProps.Security_patch = proptools.StringPtr(partitionVars.VendorSecurityPatch) + fsProps.Stem = proptools.StringPtr("vendor.img") case "odm": fsProps.Symlinks = []filesystem.SymlinkDefinition{ filesystem.SymlinkDefinition{ @@ -363,8 +367,10 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste }, } fsProps.Security_patch = proptools.StringPtr(partitionVars.OdmSecurityPatch) + fsProps.Stem = proptools.StringPtr("odm.img") case "userdata": fsProps.Base_dir = proptools.StringPtr("data") + fsProps.Stem = proptools.StringPtr("userdata.img") case "ramdisk": // Following the logic in https://cs.android.com/android/platform/superproject/main/+/c3c5063df32748a8806ce5da5dd0db158eab9ad9:build/make/core/Makefile;l=1307 fsProps.Dirs = android.NewSimpleConfigurable([]string{ @@ -387,6 +393,7 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste "first_stage_ramdisk/sys", }) } + fsProps.Stem = proptools.StringPtr("ramdisk.img") case "recovery": dirs := append(commonPartitionDirs, []string{ "sdcard", @@ -402,16 +409,21 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste Target: proptools.StringPtr("prop.default"), Name: proptools.StringPtr("default.prop"), }), "root") + fsProps.Stem = proptools.StringPtr("recovery.img") case "system_dlkm": fsProps.Security_patch = proptools.StringPtr(partitionVars.SystemDlkmSecurityPatch) + fsProps.Stem = proptools.StringPtr("system_dlkm.img") case "vendor_dlkm": fsProps.Security_patch = proptools.StringPtr(partitionVars.VendorDlkmSecurityPatch) + fsProps.Stem = proptools.StringPtr("vendor_dlkm.img") case "odm_dlkm": fsProps.Security_patch = proptools.StringPtr(partitionVars.OdmDlkmSecurityPatch) + fsProps.Stem = proptools.StringPtr("odm_dlkm.img") case "vendor_ramdisk": if android.InList("recovery", generatedPartitions(ctx)) { fsProps.Include_files_of = []string{generatedModuleNameForPartition(ctx.Config(), "recovery")} } + fsProps.Stem = proptools.StringPtr("vendor_ramdisk.img") } } |