am dc618332
: Merge "Add bootsigner path as an option"
* commit 'dc618332644cb01bfa1354f0299fc9dadc1cb592': Add bootsigner path as an option
This commit is contained in:
commit
84d3af3eaa
1 changed files with 8 additions and 2 deletions
|
@ -49,6 +49,8 @@ class Options(object):
|
||||||
self.java_args = "-Xmx2048m" # JVM Args
|
self.java_args = "-Xmx2048m" # JVM Args
|
||||||
self.public_key_suffix = ".x509.pem"
|
self.public_key_suffix = ".x509.pem"
|
||||||
self.private_key_suffix = ".pk8"
|
self.private_key_suffix = ".pk8"
|
||||||
|
# use otatools built boot_signer by default
|
||||||
|
self.boot_signer_path = "boot_signer"
|
||||||
self.verbose = False
|
self.verbose = False
|
||||||
self.tempfiles = []
|
self.tempfiles = []
|
||||||
self.device_specific = None
|
self.device_specific = None
|
||||||
|
@ -359,7 +361,8 @@ def BuildBootableImage(sourcedir, fs_config_file, info_dict=None):
|
||||||
|
|
||||||
if info_dict.get("verity_key", None):
|
if info_dict.get("verity_key", None):
|
||||||
path = "/" + os.path.basename(sourcedir).lower()
|
path = "/" + os.path.basename(sourcedir).lower()
|
||||||
cmd = ["boot_signer", path, img.name, info_dict["verity_key"] + ".pk8",
|
cmd = [OPTIONS.boot_signer_path, path, img.name,
|
||||||
|
info_dict["verity_key"] + ".pk8",
|
||||||
info_dict["verity_key"] + ".x509.pem", img.name]
|
info_dict["verity_key"] + ".x509.pem", img.name]
|
||||||
p = Run(cmd, stdout=subprocess.PIPE)
|
p = Run(cmd, stdout=subprocess.PIPE)
|
||||||
p.communicate()
|
p.communicate()
|
||||||
|
@ -653,7 +656,8 @@ def ParseOptions(argv,
|
||||||
argv, "hvp:s:x:" + extra_opts,
|
argv, "hvp:s:x:" + extra_opts,
|
||||||
["help", "verbose", "path=", "signapk_path=", "extra_signapk_args=",
|
["help", "verbose", "path=", "signapk_path=", "extra_signapk_args=",
|
||||||
"java_path=", "java_args=", "public_key_suffix=",
|
"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))
|
list(extra_long_opts))
|
||||||
except getopt.GetoptError as err:
|
except getopt.GetoptError as err:
|
||||||
Usage(docstring)
|
Usage(docstring)
|
||||||
|
@ -680,6 +684,8 @@ def ParseOptions(argv,
|
||||||
OPTIONS.public_key_suffix = a
|
OPTIONS.public_key_suffix = a
|
||||||
elif o in ("--private_key_suffix",):
|
elif o in ("--private_key_suffix",):
|
||||||
OPTIONS.private_key_suffix = a
|
OPTIONS.private_key_suffix = a
|
||||||
|
elif o in ("--boot_signer_path",):
|
||||||
|
OPTIONS.boot_signer_path = a
|
||||||
elif o in ("-s", "--device_specific"):
|
elif o in ("-s", "--device_specific"):
|
||||||
OPTIONS.device_specific = a
|
OPTIONS.device_specific = a
|
||||||
elif o in ("-x", "--extra"):
|
elif o in ("-x", "--extra"):
|
||||||
|
|
Loading…
Reference in a new issue