Skip to content

Commit

Permalink
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>
  • Loading branch information
marc-hb committed Oct 5, 2023
1 parent 9b10d6d commit b8ce417
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 10 deletions.
15 changes: 6 additions & 9 deletions scripts/xtensa-build-zephyr.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down Expand Up @@ -563,14 +563,11 @@ def rimage_west_configuration(platform_dict, dest_dir):

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"
# Don't warn on empty directories
if ( old_rimage_loc / "CMakeLists.txt" ).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
Expand Down
2 changes: 1 addition & 1 deletion zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit b8ce417

Please sign in to comment.