diff options
author | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-14 18:20:53 +0000 |
---|---|---|
committer | Android Build Coastguard Worker <android-build-coastguard-worker@google.com> | 2023-02-14 18:20:53 +0000 |
commit | cb3243f07ff880cb1e16e0c41e40cebadccd8af0 (patch) | |
tree | 238c70509eae1a52beca6df0b701869b1367c88b | |
parent | 16a9b3d38116cf10c0fd700547fb8b6a270f5465 (diff) | |
parent | 48d9ec056458a4bff78a9c572bc9c185dc037ccc (diff) | |
download | soong-android13-qpr2-s7-release.tar.gz |
Merge cherrypicks of ['googleplex-android-review.googlesource.com/21142901'] into tm-qpr2-release.android-13.0.0_r45android-13.0.0_r44android-13.0.0_r43android-13.0.0_r42android-13.0.0_r41android-13.0.0_r40android-13.0.0_r39android-13.0.0_r38android13-qpr2-s9-releaseandroid13-qpr2-s8-releaseandroid13-qpr2-s7-releaseandroid13-qpr2-s12-releaseandroid13-qpr2-s11-releaseandroid13-qpr2-s10-releaseandroid13-qpr2-release
Change-Id: I3466438190b453cf368c7f2869fdd8e39b085d3c
-rw-r--r-- | filesystem/filesystem.go | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/filesystem/filesystem.go b/filesystem/filesystem.go index ccf9e9d3b..665faaaed 100644 --- a/filesystem/filesystem.go +++ b/filesystem/filesystem.go @@ -66,9 +66,13 @@ type filesystemProperties struct { // TODO(jiyong): allow apex_key to be specified here Avb_private_key *string `android:"path"` - // Hash and signing algorithm for avbtool. Default is SHA256_RSA4096. + // Signing algorithm for avbtool. Default is SHA256_RSA4096. Avb_algorithm *string + // Hash algorithm used for avbtool (for descriptors). This is passed as hash_algorithm to + // avbtool. Default used by avbtool is sha1. + Avb_hash_algorithm *string + // Name of the partition stored in vbmeta desc. Defaults to the name of this module. Partition_name *string @@ -318,7 +322,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) } |