Commit 25a71f3
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 <[email protected]>1 parent b4556ea commit 25a71f3
1 file changed
+8
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
522 | 522 | | |
523 | 523 | | |
524 | 524 | | |
| 525 | + | |
| 526 | + | |
| 527 | + | |
| 528 | + | |
| 529 | + | |
| 530 | + | |
| 531 | + | |
525 | 532 | | |
526 | 533 | | |
527 | 534 | | |
| |||
530 | 537 | | |
531 | 538 | | |
532 | 539 | | |
533 | | - | |
| 540 | + | |
534 | 541 | | |
535 | 542 | | |
536 | 543 | | |
537 | 544 | | |
538 | | - | |
539 | 545 | | |
540 | 546 | | |
541 | 547 | | |
| |||
0 commit comments