summaryrefslogtreecommitdiff
path: root/filesystem/filesystem.go
diff options
context:
space:
mode:
author Cole Faust <colefaust@google.com> 2024-12-03 13:12:08 -0800
committer Cole Faust <colefaust@google.com> 2024-12-03 13:22:57 -0800
commit3e73097269424658308cc717b2f0b7172197b42c (patch)
treec25b892ac83edf54a61499932dce6741224b5562 /filesystem/filesystem.go
parent44c5548d05722cd1733796c3db7215968bd183a3 (diff)
Add erofs compressor information to soong-generated partitions
Also change set a default compressor in the filesystem module type to match make. Bug: 381120092 Test: m out/soong/.intermediates/build/soong/fsgen/aosp_cf_x86_64_phone_generated_system_image/android_common/prop, diff with make Change-Id: Ic2b57f8f5e566d43a4aa52dd37574325d6d63c78
Diffstat (limited to 'filesystem/filesystem.go')
-rw-r--r--filesystem/filesystem.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go
index b5f7e486d..fbc808936 100644
--- a/filesystem/filesystem.go
+++ b/filesystem/filesystem.go
@@ -677,11 +677,10 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (android.Path, and
switch fst {
case erofsType:
// Add erofs properties
- if compressor := f.properties.Erofs.Compressor; compressor != nil {
- addStr("erofs_default_compressor", proptools.String(compressor))
- }
- if compressHints := f.properties.Erofs.Compress_hints; compressHints != nil {
- addPath("erofs_default_compress_hints", android.PathForModuleSrc(ctx, *compressHints))
+ addStr("erofs_default_compressor", proptools.StringDefault(f.properties.Erofs.Compressor, "lz4hc,9"))
+ if f.properties.Erofs.Compress_hints != nil {
+ src := android.PathForModuleSrc(ctx, *f.properties.Erofs.Compress_hints)
+ addPath("erofs_default_compress_hints", src)
}
if proptools.BoolDefault(f.properties.Erofs.Sparse, true) {
// https://source.corp.google.com/h/googleplex-android/platform/build/+/88b1c67239ca545b11580237242774b411f2fed9:core/Makefile;l=2292;bpv=1;bpt=0;drc=ea8f34bc1d6e63656b4ec32f2391e9d54b3ebb6b