diff options
author | Baligh Uddin <baligh@google.com> | 2015-03-26 23:03:13 +0000 |
---|---|---|
committer | Android (Google) Code Review <android-gerrit@google.com> | 2015-03-26 23:03:13 +0000 |
commit | 6c0618976c53d61fadf7d0b01eedb81f26206a69 (patch) | |
tree | 90b68f1055e880c380e4d279b85f46ca4b3acc24 | |
parent | 59fb4fb6d62c1a0d5b2f40cc89f08e9d917efa23 (diff) | |
parent | e204868f1f2bf2c6a85cf09edb52c06d593584c0 (diff) | |
download | build-6c0618976c53d61fadf7d0b01eedb81f26206a69.zip build-6c0618976c53d61fadf7d0b01eedb81f26206a69.tar.gz build-6c0618976c53d61fadf7d0b01eedb81f26206a69.tar.bz2 |
Merge "Add bootsigner path as an option"
-rw-r--r-- | tools/releasetools/common.py | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/tools/releasetools/common.py b/tools/releasetools/common.py index 6903dc6..0c0da77 100644 --- a/tools/releasetools/common.py +++ b/tools/releasetools/common.py @@ -56,6 +56,7 @@ OPTIONS.java_path = "java" # Use the one on the path by default. OPTIONS.java_args = "-Xmx2048m" # JVM Args OPTIONS.public_key_suffix = ".x509.pem" OPTIONS.private_key_suffix = ".pk8" +OPTIONS.boot_signer_path = "boot_signer" # use otatools built boot_signer by default OPTIONS.verbose = False OPTIONS.tempfiles = [] OPTIONS.device_specific = None @@ -347,7 +348,7 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None): if info_dict.get("verity_key", None): path = "/" + os.path.basename(sourcedir).lower() - cmd = ["boot_signer", path, img.name, info_dict["verity_key"] + ".pk8", info_dict["verity_key"] + ".x509.pem", img.name] + cmd = [OPTIONS.boot_signer_path, path, img.name, info_dict["verity_key"] + ".pk8", info_dict["verity_key"] + ".x509.pem", img.name] p = Run(cmd, stdout=subprocess.PIPE) p.communicate() assert p.returncode == 0, "boot_signer of %s image failed" % path @@ -620,7 +621,8 @@ def ParseOptions(argv, argv, "hvp:s:x:" + extra_opts, ["help", "verbose", "path=", "signapk_path=", "extra_signapk_args=", "java_path=", "java_args=", "public_key_suffix=", - "private_key_suffix=", "device_specific=", "extra="] + + "private_key_suffix=", "boot_signer_path=", "device_specific=", + "extra="] + list(extra_long_opts)) except getopt.GetoptError, err: Usage(docstring) @@ -649,6 +651,8 @@ def ParseOptions(argv, OPTIONS.public_key_suffix = a elif o in ("--private_key_suffix",): OPTIONS.private_key_suffix = a + elif o in ("--boot_signer_path",): + OPTIONS.boot_signer_path = a elif o in ("-s", "--device_specific"): OPTIONS.device_specific = a elif o in ("-x", "--extra"): |