From a28b5f26b0f879aeb74072fcaf98022b2f942ace Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Mon, 9 Jan 2023 18:46:07 +0000 Subject: [PATCH] xtensa-build-zephyr.py: add --extra-rimage-args option Temporary solution until the `west sign` situation is finalized upstream, see zephyrproject-rtos/zephyr/pull/52942 and others. Use shlex.split() that supports both some quoting and empty strings nicely. Signed-off-by: Marc Herbert --- scripts/xtensa-build-zephyr.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 1abb64d7d20f..9f8b6d87d494 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -250,6 +250,13 @@ def parse_args(): help="""Use an output subdirectory for each platform. Otherwise, all firmware files are installed in the same staging directory by default.""") + parser.add_argument( + "--extra-rimage-args", + default="", + help="""Temporary solution until the `west sign` situation +is finalized upstream, see zephyrproject-rtos/zephyr/pull/52942 and others.""", + ) + parser.add_argument("--no-interactive", default=False, action="store_true", help="""Run script in non-interactive mode when user input can not be provided. This should be used with programmatic script invocations (eg. Continuous Integration). @@ -648,6 +655,8 @@ def build_platforms(): sign_cmd += ["-b", sof_build_vers] + sign_cmd += shlex.split(args.extra_rimage_args) + if args.ipc == "IPC4": rimage_desc = pathlib.Path(SOF_TOP, "rimage", "config", platform_dict["IPC4_RIMAGE_DESC"]) sign_cmd += ["-c", str(rimage_desc)]