From f4ce87d8a277a47af03bb8b4a2dc21fa4f98f861 Mon Sep 17 00:00:00 2001 From: Marc Herbert Date: Wed, 4 Oct 2023 16:42:11 -0700 Subject: [PATCH] cmake: add new ${RIMAGE_TOP} constant In preparation for changing it, see https://github.com/thesofproject/sof/issues/8178 No functional change yet. Signed-off-by: Marc Herbert --- CMakeLists.txt | 6 ++++-- src/arch/xtensa/CMakeLists.txt | 6 +++--- src/ipc/ipc4/CMakeLists.txt | 2 +- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 9d951e86a2de..c7b0ddd8ddd2 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -43,6 +43,8 @@ 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") + # check git hooks include(scripts/cmake/git-hooks.cmake) @@ -159,8 +161,8 @@ install( ${PROJECT_SOURCE_DIR}/src/include/ipc ${PROJECT_SOURCE_DIR}/src/include/kernel ${PROJECT_SOURCE_DIR}/src/include/user - ${PROJECT_SOURCE_DIR}/rimage/src/include/sof/kernel - ${PROJECT_SOURCE_DIR}/rimage/src/include/sof/user + ${RIMAGE_TOP}/src/include/sof/kernel + ${RIMAGE_TOP}/src/include/sof/user DESTINATION include/sof PATTERN "*.h" ) diff --git a/src/arch/xtensa/CMakeLists.txt b/src/arch/xtensa/CMakeLists.txt index 474be5988727..ba045fe6ccb1 100644 --- a/src/arch/xtensa/CMakeLists.txt +++ b/src/arch/xtensa/CMakeLists.txt @@ -330,7 +330,7 @@ add_custom_target( ExternalProject_Add(rimage_ep DEPENDS check_version_h - SOURCE_DIR "${PROJECT_SOURCE_DIR}/rimage" + SOURCE_DIR "${RIMAGE_TOP}" PREFIX "${PROJECT_BINARY_DIR}/rimage_ep" BINARY_DIR "${PROJECT_BINARY_DIR}/rimage_ep/build" EXCLUDE_FROM_ALL TRUE @@ -386,7 +386,7 @@ if(MEU_PATH OR DEFINED MEU_NO_SIGN) # Don't sign with rimage run_rimage COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage -o sof-${fw_name}.ri - -c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml" + -c "${RIMAGE_TOP}/config/${fw_name}.toml" -s ${MEU_OFFSET} -k ${RIMAGE_PRIVATE_KEY} -i ${RIMAGE_IMR_TYPE} @@ -427,7 +427,7 @@ else() # sign with rimage run_rimage COMMAND ${PROJECT_BINARY_DIR}/rimage_ep/build/rimage -o sof-${fw_name}.ri - -c "${PROJECT_SOURCE_DIR}/rimage/config/${fw_name}.toml" + -c "${RIMAGE_TOP}/config/${fw_name}.toml" -k ${RIMAGE_PRIVATE_KEY} -i ${RIMAGE_IMR_TYPE} -f ${SOF_MAJOR}.${SOF_MINOR}.${SOF_MICRO} diff --git a/src/ipc/ipc4/CMakeLists.txt b/src/ipc/ipc4/CMakeLists.txt index 7f9d75f654be..2e162e702672 100644 --- a/src/ipc/ipc4/CMakeLists.txt +++ b/src/ipc/ipc4/CMakeLists.txt @@ -9,4 +9,4 @@ add_local_sources(sof ams_helpers.c ) -target_include_directories(sof_options INTERFACE ${PROJECT_SOURCE_DIR}/rimage/src/include) +target_include_directories(sof_options INTERFACE ${RIMAGE_TOP}/src/include)