diff options
author | Tao Bao <tbao@google.com> | 2019-05-07 03:10:35 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2019-05-07 03:10:35 +0000 |
commit | 32d69c6b7403144754a9e2404bbd1505f3f7ff6a (patch) | |
tree | 33c256569d61d707dd7372f45022dde5f796d9e9 | |
parent | 38809bdf9906c0cd1314bf96c1b0ed1d0d1586ce (diff) | |
parent | d6085d683489d17b5e67a9f3f9953fbf329bf3c0 (diff) | |
download | build-32d69c6b7403144754a9e2404bbd1505f3f7ff6a.tar.gz |
Merge "releasetools: Support replacing the signing keys for chained vbmeta."
-rwxr-xr-x | tools/releasetools/sign_target_files_apks.py | 29 |
1 files changed, 26 insertions, 3 deletions
diff --git a/tools/releasetools/sign_target_files_apks.py b/tools/releasetools/sign_target_files_apks.py index d25ae0c009..24ee91b3bd 100755 --- a/tools/releasetools/sign_target_files_apks.py +++ b/tools/releasetools/sign_target_files_apks.py @@ -91,12 +91,15 @@ Usage: sign_target_files_apks [flags] input_target_files output_target_files Replace the veritykeyid in BOOT/cmdline of input_target_file_zip with keyid of the cert pointed by <path_to_X509_PEM_cert_file>. - --avb_{boot,system,system_other,vendor,dtbo,vbmeta}_algorithm <algorithm> - --avb_{boot,system,system_other,vendor,dtbo,vbmeta}_key <key> + --avb_{boot,system,system_other,vendor,dtbo,vbmeta,vbmeta_system, + vbmeta_vendor}_algorithm <algorithm> + --avb_{boot,system,system_other,vendor,dtbo,vbmeta,vbmeta_system, + vbmeta_vendor}_key <key> Use the specified algorithm (e.g. SHA256_RSA4096) and the key to AVB-sign the specified image. Otherwise it uses the existing values in info dict. - --avb_{apex,boot,system,system_other,vendor,dtbo,vbmeta}_extra_args <args> + --avb_{apex,boot,system,system_other,vendor,dtbo,vbmeta,vbmeta_system, + vbmeta_vendor}_extra_args <args> Specify any additional args that are needed to AVB-sign the image (e.g. "--signing_helper /path/to/helper"). The args will be appended to the existing ones in info dict. @@ -966,6 +969,8 @@ def ReplaceAvbSigningKeys(misc_info): 'system_other' : 'avb_system_other_add_hashtree_footer_args', 'vendor' : 'avb_vendor_add_hashtree_footer_args', 'vbmeta' : 'avb_vbmeta_args', + 'vbmeta_system' : 'avb_vbmeta_system_args', + 'vbmeta_vendor' : 'avb_vbmeta_vendor_args', } def ReplaceAvbPartitionSigningKey(partition): @@ -1193,6 +1198,18 @@ def main(argv): OPTIONS.avb_algorithms['vendor'] = a elif o == "--avb_vendor_extra_args": OPTIONS.avb_extra_args['vendor'] = a + elif o == "--avb_vbmeta_system_key": + OPTIONS.avb_keys['vbmeta_system'] = a + elif o == "--avb_vbmeta_system_algorithm": + OPTIONS.avb_algorithms['vbmeta_system'] = a + elif o == "--avb_vbmeta_system_extra_args": + OPTIONS.avb_extra_args['vbmeta_system'] = a + elif o == "--avb_vbmeta_vendor_key": + OPTIONS.avb_keys['vbmeta_vendor'] = a + elif o == "--avb_vbmeta_vendor_algorithm": + OPTIONS.avb_algorithms['vbmeta_vendor'] = a + elif o == "--avb_vbmeta_vendor_extra_args": + OPTIONS.avb_extra_args['vbmeta_vendor'] = a elif o == "--avb_apex_extra_args": OPTIONS.avb_extra_args['apex'] = a else: @@ -1232,6 +1249,12 @@ def main(argv): "avb_vendor_algorithm=", "avb_vendor_key=", "avb_vendor_extra_args=", + "avb_vbmeta_system_algorithm=", + "avb_vbmeta_system_key=", + "avb_vbmeta_system_extra_args=", + "avb_vbmeta_vendor_algorithm=", + "avb_vbmeta_vendor_key=", + "avb_vbmeta_vendor_extra_args=", ], extra_option_handler=option_handler) |