From 6d08d925785a657af3d24f45fbc24ddfe0ec847f Mon Sep 17 00:00:00 2001 From: Jihoon Kang Date: Tue, 14 Jan 2025 18:31:57 +0000 Subject: Specify additional props for userdata image Implementation details: - Introduce support_casefolding, support_project_quota and enable_compression properties in filesystem modules. - Specify the userdata partition-specific props in filesystem_creator. Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_userdata_image/android_common/userdata.img Bug: 388920173 Change-Id: Id37c677e9bf28c1a338459e28ac6b05e5f58b407 --- fsgen/filesystem_creator.go | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) (limited to 'fsgen/filesystem_creator.go') diff --git a/fsgen/filesystem_creator.go b/fsgen/filesystem_creator.go index 8dfbd6499..a4c008dc2 100644 --- a/fsgen/filesystem_creator.go +++ b/fsgen/filesystem_creator.go @@ -382,6 +382,23 @@ func partitionSpecificFsProps(ctx android.EarlyModuleContext, fsProps *filesyste } fsProps.Partition_size = &parsed } + // https://cs.android.com/android/platform/superproject/main/+/main:build/make/core/Makefile;l=2265;drc=7f50a123045520f2c5e18e9eb4e83f92244a1459 + if s, err := strconv.ParseBool(partitionVars.ProductFsCasefold); err == nil { + fsProps.Support_casefolding = proptools.BoolPtr(s) + } else if len(partitionVars.ProductFsCasefold) > 0 { + ctx.ModuleErrorf("Unrecognized PRODUCT_FS_CASEFOLD value %s", partitionVars.ProductFsCasefold) + } + if s, err := strconv.ParseBool(partitionVars.ProductQuotaProjid); err == nil { + fsProps.Support_project_quota = proptools.BoolPtr(s) + } else if len(partitionVars.ProductQuotaProjid) > 0 { + ctx.ModuleErrorf("Unrecognized PRODUCT_QUOTA_PROJID value %s", partitionVars.ProductQuotaProjid) + } + if s, err := strconv.ParseBool(partitionVars.ProductFsCompression); err == nil { + fsProps.Enable_compression = proptools.BoolPtr(s) + } else if len(partitionVars.ProductFsCompression) > 0 { + ctx.ModuleErrorf("Unrecognized PRODUCT_FS_COMPRESSION value %s", partitionVars.ProductFsCompression) + } + 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{ -- cgit v1.2.3-59-g8ed1b