Switch Zephyr build to new sof/tools/rimage location

Switch away from the independent rimage submodule. Long story in
https://github.com/thesofproject/sof/issues/8178 and others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
This commit is contained in:
Marc Herbert 2023-10-03 16:38:36 -07:00
parent 9b31875318
commit f55338a985
2 changed files with 7 additions and 10 deletions

View File

@ -512,7 +512,7 @@ RIMAGE_BUILD_DIR = west_top / "build-rimage"
# for now we must stick to `sof/rimage/[tomlc99]` for # for now we must stick to `sof/rimage/[tomlc99]` for
# backwards-compatibility with XTOS platforms and git submodules, see more # backwards-compatibility with XTOS platforms and git submodules, see more
# detailed comments in west.yml # detailed comments in west.yml
RIMAGE_SOURCE_DIR = west_top / "sof" / "rimage" RIMAGE_SOURCE_DIR = west_top / "sof" / "tools" / "rimage"
def rimage_west_configuration(platform_dict, dest_dir): def rimage_west_configuration(platform_dict, dest_dir):
@ -563,14 +563,11 @@ def rimage_west_configuration(platform_dict, dest_dir):
def build_rimage(): def build_rimage():
# Detect non-west rimage duplicates, example: git submdule old_rimage_loc = SOF_TOP / "rimage"
# SOF_TOP/rimage = sof2/rimage # Don't warn on empty directories
nested_rimage = pathlib.Path(SOF_TOP, "rimage") if ( old_rimage_loc / "CMakeLists.txt" ).exists():
if nested_rimage.is_dir() and not nested_rimage.samefile(RIMAGE_SOURCE_DIR): warnings.warn(f"""{old_rimage_loc} is now ignored,
raise RuntimeError( new location is {RIMAGE_SOURCE_DIR}"""
f"""Two rimage source directories found.
Move non-west {nested_rimage} out of west workspace {west_top}.
See output of 'west list'."""
) )
rimage_dir_name = RIMAGE_BUILD_DIR.name rimage_dir_name = RIMAGE_BUILD_DIR.name
# CMake build rimage module # CMake build rimage module

View File

@ -58,7 +58,7 @@ set(SOF_IPC_PATH "${SOF_SRC_PATH}/ipc")
set(SOF_DEBUG_PATH "${SOF_SRC_PATH}/debug") set(SOF_DEBUG_PATH "${SOF_SRC_PATH}/debug")
set(SOF_MATH_PATH "${SOF_SRC_PATH}/math") set(SOF_MATH_PATH "${SOF_SRC_PATH}/math")
set(SOF_TRACE_PATH "${SOF_SRC_PATH}/trace") set(SOF_TRACE_PATH "${SOF_SRC_PATH}/trace")
set(RIMAGE_TOP ${sof_top_dir}/rimage) set(RIMAGE_TOP ${sof_top_dir}/tools/rimage)
# Save path to rimage configuration files in cmake cache for later use by # Save path to rimage configuration files in cmake cache for later use by
# rimage during the "west sign" stage # rimage during the "west sign" stage