summaryrefslogtreecommitdiff
path: root/filesystem
diff options
context:
space:
mode:
authoralk3pInjection <webmaster@raspii.tech>2023-04-20 00:08:54 +0800
committeralk3pInjection <webmaster@raspii.tech>2023-04-20 00:08:54 +0800
commit923de58d67f7706e390551aa39c3c200100508b3 (patch)
treee7624ee1c43130597c12251dc0e93798bb853af8 /filesystem
parent3ba16183209cb452f73eb482cb04c1e7403c8586 (diff)
parent4993a08b8d37d5075ea0101a09ed9bbde4687ab9 (diff)
Merge tag 'LA.QSSI.13.0.r1-09800-qssi.0' into tachibanatachibana
"LA.QSSI.13.0.r1-09800-qssi.0" Change-Id: If5115134fea6c667ca1b5c8f50861ef9e3398842
Diffstat (limited to 'filesystem')
-rw-r--r--filesystem/filesystem.go12
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)
}