From 227c949bde18d5b1e7b5859ae507b4264f9612f6 Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Mon, 17 Mar 2025 20:14:00 +0000 Subject: Add android_filesystem props to misc_info.txt Similar to https://r.android.com/3543364, this CL introduces a separate "partition qualified" prop file to `android_filesystem`. The contents of the different filesystem's will be coalesced by the top-level android_device's misc_info.txt This implementation introduces duplicates since some properties like `erofs_default_compressor` will be written multiple times to misc_info.txt. To prevent these duplicates, and also to help comparison with Make built misc_info.txt, `sort -u` has been added to misc_info.txt (There are still a lot of diffs between Make and Soong misc_info.txt) Test: Built Soong's misc_info.txt locally Bug: 398036609 Change-Id: If5ffee116d008dda5528bff0354719cec871750a --- filesystem/android_device.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'filesystem/android_device.go') diff --git a/filesystem/android_device.go b/filesystem/android_device.go index 3f6348dbf..9cb90da12 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -766,8 +766,8 @@ func (a *androidDevice) addMiscInfo(ctx android.ModuleContext) android.Path { } fsInfos := a.getFsInfos(ctx) for _, partition := range android.SortedKeys(fsInfos) { - if fsInfos[partition].UseAvb { - builder.Command().Textf("echo 'avb_%s_hashtree_enable=true' >> %s", partition, miscInfo) + if fsInfos[partition].PropFileForMiscInfo != nil { + builder.Command().Text("cat").Input(fsInfos[partition].PropFileForMiscInfo).Textf(" >> %s", miscInfo) } } if len(a.partitionProps.Vbmeta_partitions) > 0 { @@ -805,6 +805,9 @@ func (a *androidDevice) addMiscInfo(ctx android.ModuleContext) android.Path { builder.Command().Text("cat").Input(bootImgInfo.PropFileForMiscInfo).Textf(" >> %s", miscInfo) } + // Sort and dedup + builder.Command().Textf("sort -u %s -o %s", miscInfo, miscInfo) + builder.Build("misc_info", "Building misc_info") return miscInfo -- cgit v1.2.3-59-g8ed1b