Skip to content

Commit

Permalink
soc: xtensa: nxp: invoke west sign only for SOF
Browse files Browse the repository at this point in the history
west sign is used only for Sound Open Firmware (SOF)
sample.
So, add this only if CONFIG_SOF is enabled.
Otherwise, when compiling other samples they're not
building because of the rimage dependency.

Fixes: 5ae7bd8 ("soc: xtensa: nxp: invoke west sign at west build time")

Signed-off-by: Iuliana Prodan <iuliana.prodan@nxp.com>
  • Loading branch information
iuliana-prodan committed Jun 22, 2023
1 parent 80a986f commit 479f9e0
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions soc/xtensa/nxp_adsp/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,19 @@

add_subdirectory(common)

# use rimage only when compiling Sound Open Firmware (SOF)
if(CONFIG_SOF)
# west sign

# See detailed comments in soc/xtensa/intel_adsp/common/CMakeLists.txt
add_custom_target(zephyr.ri ALL
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
)
add_custom_target(zephyr.ri ALL
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
)

add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
COMMENT "west sign --if-tool-available --tool rimage ..."
COMMAND west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR}
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.elf
)
add_custom_command(
OUTPUT ${CMAKE_BINARY_DIR}/zephyr/zephyr.ri
COMMENT "west sign --if-tool-available --tool rimage ..."
COMMAND west sign --if-tool-available --tool rimage --build-dir ${CMAKE_BINARY_DIR}
DEPENDS ${CMAKE_BINARY_DIR}/zephyr/zephyr.elf
)
endif()

0 comments on commit 479f9e0

Please sign in to comment.