diff --git a/scripts/xtensa-build-zephyr.py b/scripts/xtensa-build-zephyr.py index 491412017..531cb5865 100755 --- a/scripts/xtensa-build-zephyr.py +++ b/scripts/xtensa-build-zephyr.py @@ -945,7 +945,11 @@ def install_lib(sof_lib_dir, abs_build_dir, platform_wconfig): llext_input = entry_path / (llext_base + '.llext') llext_output = entry_path / (llext_file + '.ri') - sign_cmd = [platform_wconfig.get("rimage.path"), "-o", str(llext_output), + # See why the shlex() parsing step is required at + # https://docs.zephyrproject.org/latest/develop/west/sign.html#rimage + # and in Zephyr commit 030b740bd1ec + rimage_cmd = shlex.split(platform_wconfig.get('rimage.path'))[0] + sign_cmd = [rimage_cmd, "-o", str(llext_output), "-e", "-c", str(rimage_cfg), "-k", str(signing_key), "-l", "-r", str(llext_input)] diff --git a/zephyr/CMakeLists.txt b/zephyr/CMakeLists.txt index c9de5f9b5..ce04fee7a 100644 --- a/zephyr/CMakeLists.txt +++ b/zephyr/CMakeLists.txt @@ -90,7 +90,7 @@ function(sof_llext_build module) get_target_property(proc_out_file ${module} pkg_input) add_llext_command(TARGET ${module} POST_BUILD - COMMAND ${SOF_BASE}scripts/llext_link_helper.py + COMMAND ${PYTHON_EXECUTABLE} ${SOF_BASE}scripts/llext_link_helper.py --text-addr="${SOF_LLEXT_TEXT_ADDR}" -f ${proc_in_file} ${CMAKE_C_COMPILER} -- -o ${proc_out_file} ${EXTRA_LINKER_PARAMS} $