Merge "Expose avb_hash_algorithm as a property." am: 188dfbb4d6

Original change: https://android-review.googlesource.com/c/platform/build/soong/+/2363701

Change-Id: I269f7a70ce24099c3bfd4565ae6e22ba9140280f
Signed-off-by: Automerger Merge Worker <android-build-automerger-merge-worker@system.gserviceaccount.com>
This commit is contained in:
Treehugger Robot
2022-12-22 06:38:14 +00:00
committed by Automerger Merge Worker

View File

@@ -72,6 +72,9 @@ type filesystemProperties struct {
// Hash and signing algorithm for avbtool. Default is SHA256_RSA4096.
Avb_algorithm *string
// Hash and signing algorithm for avbtool. Default is SHA256_RSA4096.
Avb_hash_algorithm *string
// Name of the partition stored in vbmeta desc. Defaults to the name of this module.
Partition_name *string
@@ -333,7 +336,11 @@ func (f *filesystem) buildPropFile(ctx android.ModuleContext) (propFile android.
addStr("avb_algorithm", algorithm)
key := android.PathForModuleSrc(ctx, proptools.String(f.properties.Avb_private_key))
addPath("avb_key_path", key)
addStr("avb_add_hashtree_footer_args", "--do_not_generate_fec")
avb_add_hashtree_footer_args := "--do_not_generate_fec"
if hashAlgorithm := proptools.String(f.properties.Avb_hash_algorithm); hashAlgorithm != "" {
avb_add_hashtree_footer_args += " --hash_algorithm " + hashAlgorithm
}
addStr("avb_add_hashtree_footer_args", avb_add_hashtree_footer_args)
partitionName := proptools.StringDefault(f.properties.Partition_name, f.Name())
addStr("partition_name", partitionName)
addStr("avb_salt", f.salt())