diff options
author | 2025-03-21 14:56:47 -0700 | |
---|---|---|
committer | 2025-03-21 14:56:47 -0700 | |
commit | 780dd8642a6f35c5b0b6810713fc874f8c52c827 (patch) | |
tree | 5471141c34f5e3a2abf948a0e492a9fc5e1dd844 /filesystem/bootimg.go | |
parent | 07638f131eafac3cf915cbeb5d1003037347c41d (diff) | |
parent | a9e6b29feef1d0a1ffc56931f2632087677073d9 (diff) |
Merge "Create avb_recovery_add_hash_footer_args entry in misc_info.txt" into main
Diffstat (limited to 'filesystem/bootimg.go')
-rw-r--r-- | filesystem/bootimg.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/filesystem/bootimg.go b/filesystem/bootimg.go index 5ab0c6899..485eae47c 100644 --- a/filesystem/bootimg.go +++ b/filesystem/bootimg.go @@ -539,6 +539,14 @@ func (b *bootimg) buildPropFileForMiscInfo(ctx android.ModuleContext) android.Pa bootImgType := proptools.String(b.properties.Boot_image_type) addStr("avb_"+bootImgType+"_add_hash_footer_args", b.getAvbHashFooterArgs(ctx)) + if ramdisk := proptools.String(b.properties.Ramdisk_module); ramdisk != "" { + ramdiskModule := ctx.GetDirectDepWithTag(ramdisk, bootimgRamdiskDep) + fsInfo, _ := android.OtherModuleProvider(ctx, ramdiskModule, FilesystemProvider) + if fsInfo.HasOrIsRecovery { + // Create a dup entry for recovery + addStr("avb_recovery_add_hash_footer_args", strings.ReplaceAll(b.getAvbHashFooterArgs(ctx), bootImgType, "recovery")) + } + } if b.properties.Avb_private_key != nil { addStr("avb_"+bootImgType+"_algorithm", proptools.StringDefault(b.properties.Avb_algorithm, "SHA256_RSA4096")) addStr("avb_"+bootImgType+"_key_path", android.PathForModuleSrc(ctx, proptools.String(b.properties.Avb_private_key)).String()) |