Skip to content

Commit d9d3804

Browse files
nordicjmjfischer-no
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 be3e7c6)
1 parent 5bdac09 commit d9d3804

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
@@ -26,21 +26,20 @@ assert_exists(FIAT_DIR)
2626
# Path to mbed-tls' asn1 parser library.
2727
set(MBEDTLS_ASN1_DIR "${MCUBOOT_DIR}/ext/mbedtls-asn1")
2828
assert_exists(MBEDTLS_ASN1_DIR)
29-
set(NRF_DIR "${MCUBOOT_DIR}/ext/nrf")
29+
set(MCUBOOT_NRF_EXT_DIR "${MCUBOOT_DIR}/ext/nrf")
3030

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

4645
zephyr_library_include_directories(
@@ -162,8 +161,8 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
162161
${TINYCRYPT_DIR}/source/utils.c
163162
)
164163
elseif(CONFIG_BOOT_USE_NRF_CC310_BL)
165-
zephyr_library_sources(${NRF_DIR}/cc310_glue.c)
166-
zephyr_library_include_directories(${NRF_DIR})
164+
zephyr_library_sources(${MCUBOOT_NRF_EXT_DIR}/cc310_glue.c)
165+
zephyr_library_include_directories(${MCUBOOT_NRF_EXT_DIR})
167166
zephyr_link_libraries(nrfxlib_crypto)
168167
elseif(CONFIG_BOOT_USE_NRF_EXTERNAL_CRYPTO)
169168
zephyr_include_directories(${BL_CRYPTO_DIR}/../include)

0 commit comments

Comments
 (0)