Skip to content

Commit 791dd59

Browse files
nordicjmrlubos
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 63224e3)
1 parent f471000 commit 791dd59

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
@@ -35,21 +35,20 @@ if(NOT CONFIG_MBEDTLS_BUILTIN AND NOT CONFIG_BOOT_KEY_IMPORT_BYPASS_ASN)
3535
set(MBEDTLS_ASN1_DIR "${MCUBOOT_DIR}/ext/mbedtls-asn1")
3636
assert_exists(MBEDTLS_ASN1_DIR)
3737
endif()
38-
set(NRF_DIR "${MCUBOOT_DIR}/ext/nrf")
38+
set(MCUBOOT_NRF_EXT_DIR "${MCUBOOT_DIR}/ext/nrf")
3939

4040
if(CONFIG_BOOT_USE_NRF_CC310_BL)
41-
set(NRFXLIB_DIR ${ZEPHYR_BASE}/../nrfxlib)
42-
if(NOT EXISTS ${NRFXLIB_DIR})
43-
message(FATAL_ERROR "
41+
if(NOT EXISTS ${ZEPHYR_NRFXLIB_MODULE_DIR})
42+
message(FATAL_ERROR "
4443
------------------------------------------------------------------------
45-
No such file or directory: ${NRFXLIB_DIR}
44+
No such file or directory: ${ZEPHYR_NRFXLIB_MODULE_DIR}
4645
The current configuration enables nRF CC310 crypto accelerator hardware
4746
with the `CONFIG_BOOT_USE_NRF_CC310_BL` option. Please follow
4847
`ext/nrf/README.md` guide to fix your setup or use tinycrypt instead of
4948
the HW accelerator.
5049
To use the tinycrypt set `CONFIG_BOOT_ECDSA_TINYCRYPT` to y.
5150
------------------------------------------------------------------------")
52-
endif()
51+
endif()
5352
endif()
5453

5554
zephyr_library_include_directories(
@@ -218,8 +217,8 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
218217
${TINYCRYPT_DIR}/source/utils.c
219218
)
220219
elseif(CONFIG_BOOT_USE_NRF_CC310_BL)
221-
zephyr_library_sources(${NRF_DIR}/cc310_glue.c)
222-
zephyr_library_include_directories(${NRF_DIR})
220+
zephyr_library_sources(${MCUBOOT_NRF_EXT_DIR}/cc310_glue.c)
221+
zephyr_library_include_directories(${MCUBOOT_NRF_EXT_DIR})
223222
zephyr_link_libraries(nrfxlib_crypto)
224223
elseif(CONFIG_BOOT_USE_NRF_EXTERNAL_CRYPTO)
225224
zephyr_include_directories(${BL_CRYPTO_DIR}/../include)

0 commit comments

Comments
 (0)