From 4be98e4dc9a85c0aec9be26964fc283db7e68b70 Mon Sep 17 00:00:00 2001 From: Andrey Borisovich Date: Tue, 2 Aug 2022 08:15:28 +0200 Subject: [PATCH] scripts: xtensa-build-zephyr.py removed calls over symlink xtensa-build-zephyr.py had been using some execute_command calls when building rimage and using rimage keys over symlink from modules/audio/sof. Changed it so that calls are executed now over normal sof directory and symlink is not needed for script execution. Signed-off-by: Andrey Borisovich --- scripts/xtensa-build-zephyr.py | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 43e94de3b..bc9432e78 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -21,7 +21,7 @@ from anytree import AnyNode, RenderTree # Constant value resolves SOF_TOP directory as: "this script directory/.." SOF_TOP = pathlib.Path(__file__).parents[1].resolve() west_top = pathlib.Path(SOF_TOP, "..").resolve() -default_rimage_key = pathlib.Path("modules", "audio", "sof", "keys", "otc_private_key.pem") +default_rimage_key = pathlib.Path(SOF_TOP, "keys", "otc_private_key.pem") sof_version = None @@ -66,7 +66,7 @@ platform_list = [ "IPC4_RIMAGE_DESC": "tgl-cavs.toml", "XTENSA_CORE": "cavs2x_LX6HiFi3_2017_8", "XTENSA_TOOLS_VERSION": f"RG-2017.8{xtensa_tools_version_postfix}", - "RIMAGE_KEY": pathlib.Path("modules", "audio", "sof", "keys", "otc_private_key_3k.pem") + "RIMAGE_KEY": pathlib.Path(SOF_TOP, "keys", "otc_private_key_3k.pem") }, { "name": "tgl-h", @@ -75,7 +75,7 @@ platform_list = [ "IPC4_RIMAGE_DESC": "tgl-h-cavs.toml", "XTENSA_CORE": "cavs2x_LX6HiFi3_2017_8", "XTENSA_TOOLS_VERSION": f"RG-2017.8{xtensa_tools_version_postfix}", - "RIMAGE_KEY": pathlib.Path("modules", "audio", "sof", "keys", "otc_private_key_3k.pem") + "RIMAGE_KEY": pathlib.Path(SOF_TOP, "keys", "otc_private_key_3k.pem") }, # NXP platforms { @@ -499,8 +499,7 @@ def build_platforms(): execute_command([str(smex_executable), "-l", str(fw_ldc_file), str(input_elf_file)]) # CMake - configure rimage module rimage_dir_name="build-rimage" - sof_mirror_dir = pathlib.Path("modules", "audio", "sof") - rimage_source_dir = pathlib.Path(sof_mirror_dir, "rimage") + rimage_source_dir = pathlib.Path(SOF_TOP, "rimage") execute_command(["cmake", "-B", rimage_dir_name, "-S", str(rimage_source_dir)], cwd=west_top) # CMake build rimage module @@ -508,7 +507,7 @@ def build_platforms(): cwd=west_top) # Sign firmware rimage_executable = shutil.which("rimage", path=pathlib.Path(west_top, rimage_dir_name)) - rimage_config = pathlib.Path(sof_mirror_dir, "rimage", "config") + rimage_config = pathlib.Path(SOF_TOP, "rimage", "config") sign_cmd = ["west"] sign_cmd += ["-v"] * args.verbose sign_cmd += ["sign", "--build-dir", platform_build_dir_name, "--tool", "rimage"]