Skip to content

Commit 76d0d9a

Browse files
nordicjmbjarki-andreasen
authored andcommitted
[nrf noup] zephyr: Fix path variables
Fixes path variables to use the proper Zephyr module variables Signed-off-by: Jamie McCrae <[email protected]> Signed-off-by: Dominik Ermel <[email protected]> (cherry picked from commit c28fa1d)
1 parent a3a50e7 commit 76d0d9a

File tree

1 file changed

+7
-8
lines changed

1 file changed

+7
-8
lines changed

boot/zephyr/CMakeLists.txt

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -27,21 +27,20 @@ assert_exists(FIAT_DIR)
2727
# Path to mbed-tls' asn1 parser library.
2828
set(MBEDTLS_ASN1_DIR "${MCUBOOT_DIR}/ext/mbedtls-asn1")
2929
assert_exists(MBEDTLS_ASN1_DIR)
30-
set(NRF_DIR "${MCUBOOT_DIR}/ext/nrf")
30+
set(MCUBOOT_NRF_EXT_DIR "${MCUBOOT_DIR}/ext/nrf")
3131

3232
if(CONFIG_BOOT_USE_NRF_CC310_BL)
33-
set(NRFXLIB_DIR ${ZEPHYR_BASE}/../nrfxlib)
34-
if(NOT EXISTS ${NRFXLIB_DIR})
35-
message(FATAL_ERROR "
33+
if(NOT EXISTS ${ZEPHYR_NRFXLIB_MODULE_DIR})
34+
message(FATAL_ERROR "
3635
------------------------------------------------------------------------
37-
No such file or directory: ${NRFXLIB_DIR}
36+
No such file or directory: ${ZEPHYR_NRFXLIB_MODULE_DIR}
3837
The current configuration enables nRF CC310 crypto accelerator hardware
3938
with the `CONFIG_BOOT_USE_NRF_CC310_BL` option. Please follow
4039
`ext/nrf/README.md` guide to fix your setup or use tinycrypt instead of
4140
the HW accelerator.
4241
To use the tinycrypt set `CONFIG_BOOT_ECDSA_TINYCRYPT` to y.
4342
------------------------------------------------------------------------")
44-
endif()
43+
endif()
4544
endif()
4645

4746
zephyr_library_include_directories(
@@ -169,8 +168,8 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
169168
${TINYCRYPT_DIR}/source/utils.c
170169
)
171170
elseif(CONFIG_BOOT_USE_NRF_CC310_BL)
172-
zephyr_library_sources(${NRF_DIR}/cc310_glue.c)
173-
zephyr_library_include_directories(${NRF_DIR})
171+
zephyr_library_sources(${MCUBOOT_NRF_EXT_DIR}/cc310_glue.c)
172+
zephyr_library_include_directories(${MCUBOOT_NRF_EXT_DIR})
174173
zephyr_link_libraries(nrfxlib_crypto)
175174
endif()
176175

0 commit comments

Comments
 (0)