Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmake: add new ${RIMAGE_TOP} variable #8287

Merged
merged 2 commits into from
Oct 5, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)

Expand Down Expand Up @@ -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"
)
Expand Down
6 changes: 3 additions & 3 deletions src/arch/xtensa/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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}
Expand Down Expand Up @@ -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}
Expand Down
2 changes: 1 addition & 1 deletion src/ipc/ipc4/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -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)
6 changes: 3 additions & 3 deletions zephyr/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -58,11 +58,11 @@ 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)

# Save path to rimage configuration files in cmake cache for later use by
# rimage during the "west sign" stage
get_filename_component(RIMAGE_CONFIG "../rimage/config" ABSOLUTE)
set(RIMAGE_CONFIG_PATH ${RIMAGE_CONFIG} CACHE PATH
set(RIMAGE_CONFIG_PATH ${RIMAGE_TOP}/config} CACHE PATH
" Path to rimage board configuration files")

include(ExternalProject)
Expand All @@ -87,7 +87,7 @@ ExternalProject_Add(sof_logger_ep
)

# default SOF includes
target_include_directories(SOF INTERFACE ${sof_top_dir}/rimage/src/include)
target_include_directories(SOF INTERFACE ${RIMAGE_TOP}/src/include)
target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/include)
target_include_directories(SOF INTERFACE ${SOF_SRC_PATH}/arch/${ARCH}/include)
target_include_directories(SOF INTERFACE ${sof_top_dir}/third_party/include)
Expand Down
Loading