Skip to content

Commit a1a093a

Browse files
nordicjmnvlsianpu
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 d978f7b) (cherry picked from commit 4943e2f)
1 parent 72a8bdc commit a1a093a

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
@@ -29,21 +29,20 @@ if(NOT CONFIG_MBEDTLS_BUILTIN AND NOT CONFIG_BOOT_KEY_IMPORT_BYPASS_ASN)
2929
set(MBEDTLS_ASN1_DIR "${MCUBOOT_DIR}/ext/mbedtls-asn1")
3030
assert_exists(MBEDTLS_ASN1_DIR)
3131
endif()
32-
set(NRF_DIR "${MCUBOOT_DIR}/ext/nrf")
32+
set(MCUBOOT_NRF_EXT_DIR "${MCUBOOT_DIR}/ext/nrf")
3333

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

4948
zephyr_library_include_directories(
@@ -191,8 +190,8 @@ if(CONFIG_BOOT_SIGNATURE_TYPE_ECDSA_P256 OR CONFIG_BOOT_ENCRYPT_EC256)
191190
${TINYCRYPT_DIR}/source/utils.c
192191
)
193192
elseif(CONFIG_BOOT_USE_NRF_CC310_BL)
194-
zephyr_library_sources(${NRF_DIR}/cc310_glue.c)
195-
zephyr_library_include_directories(${NRF_DIR})
193+
zephyr_library_sources(${MCUBOOT_NRF_EXT_DIR}/cc310_glue.c)
194+
zephyr_library_include_directories(${MCUBOOT_NRF_EXT_DIR})
196195
zephyr_link_libraries(nrfxlib_crypto)
197196
elseif(CONFIG_BOOT_USE_NRF_EXTERNAL_CRYPTO)
198197
zephyr_include_directories(${BL_CRYPTO_DIR}/../include)

0 commit comments

Comments
 (0)