diff options
author | 2025-03-13 23:12:04 +0000 | |
---|---|---|
committer | 2025-03-13 23:32:33 +0000 | |
commit | f8346b5ba3bf12d22e78e92af2e9b9b408c3f72e (patch) | |
tree | cc76860b1f426b287e82be681dff57cbf7ea9ec9 /filesystem/android_device.go | |
parent | e041103ee8be5a960bd795422c9a292c32e28d04 (diff) |
Add avb info of bootimages in misc_info.txt
Make built $ANDROID_PRODUCT_OUT/misc_info.txt contains the avb
information of the installed boot images. This info overlaps with the
contents of the buildPropFile of the `bootImg` modules, but
- Only some of the entries are written to misc_info.txt
- misc_info.txt contains the "partition qualified" key. e.g.
avb_init_boot_algorithm and not avb_algorithm
This CL adds a secondary `propFileForMiscInfo` to the build actions
of bootimg. This file will be propagated to android_device via a
provider and cat'd to the misc_info.txt created by android_device
(There are still a lot of diffs between Make and Soong misc_info.txt)
Bug: 398036609
Test: Built Soong's misc_info.txt
Change-Id: I0c49ebaf7a2bac934dca05bcdab65b8521b891ed
Diffstat (limited to 'filesystem/android_device.go')
-rw-r--r-- | filesystem/android_device.go | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/filesystem/android_device.go b/filesystem/android_device.go index bd887c78f..3f6348dbf 100644 --- a/filesystem/android_device.go +++ b/filesystem/android_device.go @@ -789,6 +789,21 @@ func (a *androidDevice) addMiscInfo(ctx android.ModuleContext) android.Path { ctx.ModuleErrorf("Super partition %s does set SuperImageProvider\n", superPartition.Name()) } } + bootImgNames := []*string{ + a.partitionProps.Boot_partition_name, + a.partitionProps.Init_boot_partition_name, + a.partitionProps.Vendor_boot_partition_name, + } + for _, bootImgName := range bootImgNames { + if bootImgName == nil { + continue + } + + bootImg := ctx.GetDirectDepProxyWithTag(proptools.String(bootImgName), filesystemDepTag) + bootImgInfo, _ := android.OtherModuleProvider(ctx, bootImg, BootimgInfoProvider) + // cat avb_ metadata of the boot images + builder.Command().Text("cat").Input(bootImgInfo.PropFileForMiscInfo).Textf(" >> %s", miscInfo) + } builder.Build("misc_info", "Building misc_info") |