[PATCH 1/1] lib: Kconfig dependencies for seudo-random library

drivers/rng/sandbox_rng.c requires rand() to be defined but configuration option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not exist.
test/lib/test_aes.c requires rand() to be defined.
Fix the selection criteria for choice "Pseudo-random library support type".
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- drivers/rng/Kconfig | 1 - lib/Kconfig | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rng/Kconfig b/drivers/rng/Kconfig index 35a3bd192a..893b89d49b 100644 --- a/drivers/rng/Kconfig +++ b/drivers/rng/Kconfig @@ -9,7 +9,6 @@ config DM_RNG config RNG_SANDBOX bool "Sandbox random number generator" depends on SANDBOX && DM_RNG - select CONFIG_LIB_RAND help Enable random number generator for sandbox. This is an emulation of a rng device. diff --git a/lib/Kconfig b/lib/Kconfig index d040a87d26..ab6aff710d 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -150,7 +150,8 @@ config REGEX
choice prompt "Pseudo-random library support type" - depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID + depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID || \ + RNG_SANDBOX || UT_LIB && AES default LIB_RAND help Select the library to provide pseudo-random number generator -- 2.24.1

drivers/rng/sandbox_rng.c requires rand() to be defined but configuration option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not exist.
test/lib/test_aes.c requires rand() to be defined.
Fix the selection criteria for choice "Pseudo-random library support type".
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de --- v2: fix typo in title --- drivers/rng/Kconfig | 1 - lib/Kconfig | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/rng/Kconfig b/drivers/rng/Kconfig index 35a3bd192a..893b89d49b 100644 --- a/drivers/rng/Kconfig +++ b/drivers/rng/Kconfig @@ -9,7 +9,6 @@ config DM_RNG config RNG_SANDBOX bool "Sandbox random number generator" depends on SANDBOX && DM_RNG - select CONFIG_LIB_RAND help Enable random number generator for sandbox. This is an emulation of a rng device. diff --git a/lib/Kconfig b/lib/Kconfig index d040a87d26..ab6aff710d 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -150,7 +150,8 @@ config REGEX
choice prompt "Pseudo-random library support type" - depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID + depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID || \ + RNG_SANDBOX || UT_LIB && AES default LIB_RAND help Select the library to provide pseudo-random number generator -- 2.24.1

On Sun, Jan 19, 2020 at 07:28:12PM +0100, Heinrich Schuchardt wrote:
drivers/rng/sandbox_rng.c requires rand() to be defined but configuration option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not exist.
test/lib/test_aes.c requires rand() to be defined.
Fix the selection criteria for choice "Pseudo-random library support type".
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
Applied to u-boot/master, thanks!

On Sun, 19 Jan 2020 at 11:28, Heinrich Schuchardt xypron.glpk@gmx.de wrote:
drivers/rng/sandbox_rng.c requires rand() to be defined but configuration option CONFIG_CONFIG_LIB_RAND selected in drivers/rng/Kconfig does not exist.
test/lib/test_aes.c requires rand() to be defined.
Fix the selection criteria for choice "Pseudo-random library support type".
Signed-off-by: Heinrich Schuchardt xypron.glpk@gmx.de
drivers/rng/Kconfig | 1 - lib/Kconfig | 3 ++- 2 files changed, 2 insertions(+), 2 deletions(-)
Reviewed-by: Simon Glass sjg@chromium.org
participants (3)
-
Heinrich Schuchardt
-
Simon Glass
-
Tom Rini