From f8346b5ba3bf12d22e78e92af2e9b9b408c3f72e Mon Sep 17 00:00:00 2001 From: Spandan Das Date: Thu, 13 Mar 2025 23:12:04 +0000 Subject: 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 --- filesystem/android_device.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'filesystem/android_device.go') 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") -- cgit v1.2.3-59-g8ed1b