diff options
author | 2025-01-14 18:31:57 +0000 | |
---|---|---|
committer | 2025-01-14 22:19:57 +0000 | |
commit | 6d08d925785a657af3d24f45fbc24ddfe0ec847f (patch) | |
tree | eccb760b8b88a827453de08041f6e79c8d3a92e9 /filesystem/filesystem.go | |
parent | 5ccdca9babe6139206710a3c0595f35412c92d63 (diff) |
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
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r-- | filesystem/filesystem.go | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index a31516043..38808463e 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -222,6 +222,15 @@ type FilesystemProperties struct { // The size of the partition on the device. It will be a build error if this built partition // image exceeds this size. Partition_size *int64 + + // Whether to format f2fs and ext4 in a way that supports casefolding + Support_casefolding *bool + + // Whether to format f2fs and ext4 in a way that supports project quotas + Support_project_quota *bool + + // Whether to enable per-file compression in f2fs + Enable_compression *bool } type AndroidFilesystemDeps struct { @@ -821,6 +830,18 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (android.Path, and addStr("partition_size", strconv.FormatInt(*f.properties.Partition_size, 10)) } + if proptools.BoolDefault(f.properties.Support_casefolding, false) { + addStr("needs_casefold", "1") + } + + if proptools.BoolDefault(f.properties.Support_project_quota, false) { + addStr("needs_projid", "1") + } + + if proptools.BoolDefault(f.properties.Enable_compression, false) { + addStr("needs_compress", "1") + } + propFilePreProcessing := android.PathForModuleOut(ctx, "prop_pre_processing") android.WriteFileRuleVerbatim(ctx, propFilePreProcessing, propFileString.String()) propFile := android.PathForModuleOut(ctx, "prop") |