xtensa-build-zephyr.py: extract new function rimage_options()

Unlike rimage_configuration(), rimage_options() will be kept free of
side-effect.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-05-10 00:08:18 +00:00 committed by Kai Vehmanen
parent 3ac849eac5
commit fdc05c718f
1 changed files with 11 additions and 2 deletions

View File

@ -526,7 +526,16 @@ def rimage_configuration(platform_dict):
rimage_executable = shutil.which("rimage", path=RIMAGE_BUILD_DIR)
sign_cmd += ["--tool-path", rimage_executable]
sign_cmd += ["--tool-path", rimage_executable, "--"]
sign_cmd += rimage_options(platform_dict)
return sign_cmd
def rimage_options(platform_dict):
sign_cmd = []
signing_key = ""
if args.key:
signing_key = args.key
@ -535,7 +544,7 @@ def rimage_configuration(platform_dict):
else:
signing_key = default_rimage_key
sign_cmd += ["--", "-k", str(signing_key)]
sign_cmd += ["-k", str(signing_key)]
sof_fw_vers = get_sof_version()