modules: mbedtls: let CSPRNG_AVAILABLE select ENTROPY_GENERATOR
It might happen that some boards have "zephyr,entropy" node set, but under
the hood the driver is not available (ex: entropy_bt_hci not being
available because CONFIG_BT_HOST is not enabled in the build).
This commit changes the behavior so that:
1. if "zephyr,entropy" is set in the DT then CONFIG_CSPRNG_AVAILABLE get
enabled;
2. CONFIG_CSPRNG_AVAILABLE selects CONFIG_ENTROPY_GENERATOR
3. if there really is a driver available then CONFIG_ENTROPY_HAS_DRIVER
will be enabled by that driver;
4. CONFIG_ENTROPY_HAS_DRIVER selects CONFIG_CSPRNG_ENABLED;
4. Mbed TLS can consume the CONFIG_CSPRNG_ENABLED information to
decide whethere to enable CONFIG_MBEDTLS_PSA_CRYPTO_EXTERNAL_RNG or
the legacy CONFIG_MBEDTLS_PSA_CRYPTO_LEGACY_RNG.
Signed-off-by: Valerio Setti <vsetti@baylibre.com>
1 file changed