From 3ac849eac573d5c37eb6bb0a2324ab6fe0178b0e Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Tue, 9 May 2023 23:36:35 +0000 Subject: [PATCH] xtensa-build-zephyr.py: stop passing `--tool-data rimage/config/` We used to use `-- -c rimage/config/platf.toml` for the IPC4 overlay and the older `--tool-data rimage/config/` for the rest. This was confusing, inconsistent and used to print this warning: ``` WARNING: --tool-data /var/home/mherber2/SOF/sof/rimage/config ignored, overridden by: -- -c ... ``` `--tool-data` was always a bad idea. It looks generic but it's not; it allows changing only a config directory that is always in the same location. Copy what `west sign` does with `--tool-data`, drop it and use `-- -c` always. Signed-off-by: Marc Herbert --- scripts/xtensa-build-zephyr.py | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index d6aaeb324..55cc9971f 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -525,7 +525,6 @@ def rimage_configuration(platform_dict): sign_cmd = [] rimage_executable = shutil.which("rimage", path=RIMAGE_BUILD_DIR) - rimage_config = RIMAGE_SOURCE_DIR / "config" sign_cmd += ["--tool-path", rimage_executable] signing_key = "" @@ -536,7 +535,7 @@ def rimage_configuration(platform_dict): else: signing_key = default_rimage_key - sign_cmd += ["--tool-data", str(rimage_config), "--", "-k", str(signing_key)] + sign_cmd += ["--", "-k", str(signing_key)] sof_fw_vers = get_sof_version() @@ -551,8 +550,11 @@ def rimage_configuration(platform_dict): sign_cmd += ["-b", "1"] if args.ipc == "IPC4": - rimage_desc = pathlib.Path(SOF_TOP, "rimage", "config", platform_dict["IPC4_RIMAGE_DESC"]) - sign_cmd += ["-c", str(rimage_desc)] + rimage_desc = platform_dict["IPC4_RIMAGE_DESC"] + else: + rimage_desc = platform_dict["name"] + ".toml" + + sign_cmd += ["-c", str(RIMAGE_SOURCE_DIR / "config" / rimage_desc)] return sign_cmd