summaryrefslogtreecommitdiff
path: root/filesystem/android_device.go
diff options
context:
space:
mode:
author Spandan Das <spandandas@google.com> 2025-03-17 20:14:00 +0000
committer Spandan Das <spandandas@google.com> 2025-03-17 20:14:00 +0000
commit227c949bde18d5b1e7b5859ae507b4264f9612f6 (patch)
treec018255fcc8831846d11c016b50db1b8c588353c /filesystem/android_device.go
parent5fe9b839b0b67218bcdfdbeec06b6813f040939e (diff)
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
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r--filesystem/android_device.go7
1 files changed, 5 insertions, 2 deletions
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