Skip to content

Commit

Permalink
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Switch Zephyr build to new sof/tools/rimage location
Browse files Browse the repository at this point in the history
Switch away from the independent rimage submodule. Long story in
thesofproject#8178 and others.

Signed-off-by: Marc Herbert <marc.herbert@intel.com>
marc-hb committed Oct 5, 2023
1 parent f39ca06 commit c3423f1
Showing 2 changed files with 6 additions and 8 deletions.
12 changes: 5 additions & 7 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
@@ -512,7 +512,7 @@ def clean_staging(platform):
# for now we must stick to `sof/rimage/[tomlc99]` for
# backwards-compatibility with XTOS platforms and git submodules, see more
# 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):
@@ -565,12 +565,10 @@ def build_rimage():

# Detect non-west rimage duplicates, example: git submdule
# SOF_TOP/rimage = sof2/rimage
nested_rimage = pathlib.Path(SOF_TOP, "rimage")
if nested_rimage.is_dir() and not nested_rimage.samefile(RIMAGE_SOURCE_DIR):
raise RuntimeError(
f"""Two rimage source directories found.
Move non-west {nested_rimage} out of west workspace {west_top}.
See output of 'west list'."""
old_rimage_loc = SOF_TOP / "rimage" / "CMakeLists.txt"
if old_rimage_loc.exists():
warnings.warn(f"""{old_rimage_loc} is now ignored,
new location is {RIMAGE_SOURCE_DIR}"""
)
rimage_dir_name = RIMAGE_BUILD_DIR.name
# CMake build rimage module
2 changes: 1 addition & 1 deletion zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
@@ -58,7 +58,7 @@ set(SOF_IPC_PATH "${SOF_SRC_PATH}/ipc")
set(SOF_DEBUG_PATH "${SOF_SRC_PATH}/debug")
set(SOF_MATH_PATH "${SOF_SRC_PATH}/math")
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
# rimage during the "west sign" stage

0 comments on commit c3423f1

Please sign in to comment.