Skip to content

Commit 8479106

Browse files
degjorvanordicjm
authored andcommitted
nrf_security: update entropy config to enable ENTROPY_GENERATOR
Update kconfig to set ENTROPY_GENERATOR directly when psa_rng is set. nrf_security bypasses part of the zephyr build system by setting CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG directly. This causes the upstream entropy tests to fail because no entropy driver is set automatically on 54l/71 devices. Normally this is not a problem as PSA_WANT_GENERATE_RANDOM is set specifically in ncs projects. Signed-off-by: Dag Erik Gjørvad <[email protected]>
1 parent 472e47e commit 8479106

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

subsys/nrf_security/Kconfig

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,9 @@ config NRF_SECURITY
3535
depends on SOC_FAMILY_NORDIC_NRF
3636
default y if BUILD_WITH_TFM
3737
# entropy is provided by PSA and NRF_SECURITY on NRF54LX and NRF71X
38-
default y if DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED && SOC_SERIES_NRF54LX && !IS_BOOTLOADER_IMG && GEN_ISR_TABLES
39-
default y if DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED && SOC_SERIES_NRF71X && !IS_BOOTLOADER_IMG && GEN_ISR_TABLES
38+
default y if DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED && (SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X) && !IS_BOOTLOADER_IMG && GEN_ISR_TABLES
39+
# When PSA RNG is present on nRF54Lx/nRF71x, ensure entropy drivers are enabled
40+
select ENTROPY_GENERATOR if DT_HAS_ZEPHYR_PSA_CRYPTO_RNG_ENABLED && (SOC_SERIES_NRF54LX || SOC_SERIES_NRF71X) && !IS_BOOTLOADER_IMG && GEN_ISR_TABLES
4041
select DISABLE_MBEDTLS_BUILTIN if MBEDTLS
4142
# NCS does not use TF-M's BL2 bootloader, but uses it's own fork
4243
# of MCUBoot instead (CONFIG_BOOTLOADER_MCUBOOT).

0 commit comments

Comments
 (0)