Skip to content

Commit

Permalink
cmake: switch XTOS build to sof/tools/rimage
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 <[email protected]>
  • Loading branch information
marc-hb committed Oct 5, 2023
1 parent 76c1f7e commit a0cf613
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ project(SOF C ASM)
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}")
set(SOF_ROOT_BINARY_DIRECTORY "${PROJECT_BINARY_DIR}")

set(RIMAGE_TOP "${PROJECT_SOURCE_DIR}/rimage")
set(RIMAGE_TOP "${PROJECT_SOURCE_DIR}/tools/rimage")

# check git hooks
include(scripts/cmake/git-hooks.cmake)
Expand Down
18 changes: 12 additions & 6 deletions scripts/cmake/git-submodules.cmake
Original file line number Diff line number Diff line change
@@ -1,11 +1,17 @@
# SPDX-License-Identifier: BSD-3-Clause

find_package(Git)
set(RIMAGE_CMAKE "${SOF_ROOT_SOURCE_DIRECTORY}/rimage/CMakeLists.txt")
set(RIMAGE_SUBMODULE "${SOF_ROOT_SOURCE_DIRECTORY}/rimage")
if(EXISTS "${RIMAGE_SUBMODULE}/CMakeLists.txt")
message(WARNING
"${RIMAGE_SUBMODULE} is deprecated and ignored"
)
endif()

find_package(Git)
set(TOMLC99_MAKE "${SOF_ROOT_SOURCE_DIRECTORY}/tools/rimage/tomlc99/Makefile")
if(GIT_FOUND AND EXISTS "${SOF_ROOT_SOURCE_DIRECTORY}/.git")

if(EXISTS "${RIMAGE_CMAKE}")
if(EXISTS "${TOMLC99_MAKE}")

# As incredible as it sounds, some people run neither
# "git status" nor "git diff" every few minutes and not
Expand Down Expand Up @@ -36,10 +42,10 @@ if(GIT_FOUND AND EXISTS "${SOF_ROOT_SOURCE_DIRECTORY}/.git")
NOT CONFIG_LIBRARY)

message(FATAL_ERROR
"${RIMAGE_CMAKE} not found. You should have used 'git clone --recursive'. \
"${TOMLC99_MAKE} not found. You should have used 'git clone --recursive'. \
To fix this existing git clone run:
git submodule update --init --merge --recursive
git submodule update --init --merge tools/rimage/tomlc99
")
endif() # rimage/CMakeLists.txt
endif() # tomlc99/Makefile

endif() # .git/

0 comments on commit a0cf613

Please sign in to comment.