cmake: switch XTOS build to sof/tools/rimage

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 157457c127
commit 98ee39f44c
2 changed files with 13 additions and 7 deletions

View File

@ -43,7 +43,7 @@ project(SOF C ASM)
set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}") set(SOF_ROOT_SOURCE_DIRECTORY "${PROJECT_SOURCE_DIR}")
set(SOF_ROOT_BINARY_DIRECTORY "${PROJECT_BINARY_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 # check git hooks
include(scripts/cmake/git-hooks.cmake) include(scripts/cmake/git-hooks.cmake)

View File

@ -1,11 +1,17 @@
# SPDX-License-Identifier: BSD-3-Clause # SPDX-License-Identifier: BSD-3-Clause
find_package(Git) set(RIMAGE_SUBMODULE "${SOF_ROOT_SOURCE_DIRECTORY}/rimage")
set(RIMAGE_CMAKE "${SOF_ROOT_SOURCE_DIRECTORY}/rimage/CMakeLists.txt") 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(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 # As incredible as it sounds, some people run neither
# "git status" nor "git diff" every few minutes and not # "git status" nor "git diff" every few minutes and not
@ -36,10 +42,10 @@ if(GIT_FOUND AND EXISTS "${SOF_ROOT_SOURCE_DIRECTORY}/.git")
NOT CONFIG_LIBRARY) NOT CONFIG_LIBRARY)
message(FATAL_ERROR 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: 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/ endif() # .git/