diff --git a/configs/ds414_defconfig b/configs/ds414_defconfig index eb3fe759e88d07f1f0fe93a7d7e94ff1ee471b8a..842b4c82ac0cd2e4c6bdacc54a96acdd200d8ffc 100644 --- a/configs/ds414_defconfig +++ b/configs/ds414_defconfig @@ -32,6 +32,7 @@ CONFIG_CMD_FAT=y CONFIG_CMD_JFFS2=y CONFIG_CMD_UBI=y CONFIG_ISO_PARTITION=y +CONFIG_NET_RANDOM_ETHADDR=y CONFIG_SPL_OF_TRANSLATE=y # CONFIG_MMC is not set CONFIG_SPI_FLASH=y diff --git a/configs/odroid_defconfig b/configs/odroid_defconfig index 30889c0109ec6b09546bf34e8d198049a097c823..6ed55da9ea4815c4ec3f7f15fb430f947e1510b2 100644 --- a/configs/odroid_defconfig +++ b/configs/odroid_defconfig @@ -62,4 +62,5 @@ CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_THOR=y CONFIG_USB_HOST_ETHER=y CONFIG_USB_ETHER_SMSC95XX=y +CONFIG_LIB_HW_RAND=y CONFIG_ERRNO_STR=y diff --git a/configs/trats2_defconfig b/configs/trats2_defconfig index e28cad597f91f93d2d60de75cf1d81865f9aa9c0..97248d52be44cf4ed09294213e2787436faed3d9 100644 --- a/configs/trats2_defconfig +++ b/configs/trats2_defconfig @@ -54,3 +54,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_THOR=y +CONFIG_LIB_HW_RAND=y diff --git a/configs/trats_defconfig b/configs/trats_defconfig index 6ae39c18737100720a685ae6d56b17e0cb1888f2..4c492211e68f276917904a6089cc4cb762c390f8 100644 --- a/configs/trats_defconfig +++ b/configs/trats_defconfig @@ -53,3 +53,4 @@ CONFIG_USB_GADGET_PRODUCT_NUM=0x6601 CONFIG_USB_GADGET_DWC2_OTG=y CONFIG_USB_GADGET_DOWNLOAD=y CONFIG_USB_FUNCTION_THOR=y +CONFIG_LIB_HW_RAND=y diff --git a/include/config_fallbacks.h b/include/config_fallbacks.h index 9695ee7ffb69b9a64af279a11aaf400a8f5420b6..c11abe67e5945cbcf5a2e83d529a87add9cf1ee4 100644 --- a/include/config_fallbacks.h +++ b/include/config_fallbacks.h @@ -54,13 +54,6 @@ #define CONFIG_LIB_UUID #endif -#if (defined(CONFIG_RANDOM_UUID) || \ - defined(CONFIG_CMD_UUID)) && \ - (!defined(CONFIG_LIB_RAND) && \ - !defined(CONFIG_LIB_HW_RAND)) -#define CONFIG_LIB_RAND -#endif - /* Console I/O Buffer Size */ #ifndef CONFIG_SYS_CBSIZE #if defined(CONFIG_CMD_KGDB) diff --git a/include/configs/ds414.h b/include/configs/ds414.h index c840c935b255a53b32ba4e6cffe7467f98a617e5..9bd0be1d2239f47821b8440fd50367093cb5ca02 100644 --- a/include/configs/ds414.h +++ b/include/configs/ds414.h @@ -112,10 +112,6 @@ /* DS414 bus width is 32bits */ #define CONFIG_DDR_32BIT -/* Use random ethernet address if not configured */ -#define CONFIG_LIB_RAND -#define CONFIG_NET_RANDOM_ETHADDR - /* Default Environment */ #define CONFIG_BOOTCOMMAND "sf read ${loadaddr} 0xd0000 0x700000; bootm" #define CONFIG_LOADADDR 0x80000 diff --git a/include/configs/odroid.h b/include/configs/odroid.h index 60ed0139595ba968b32be7995903671b08e69dcd..697e79898f694267c7041ad4fef377db69864522 100644 --- a/include/configs/odroid.h +++ b/include/configs/odroid.h @@ -177,7 +177,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -#define CONFIG_LIB_HW_RAND /* USB */ #define CONFIG_USB_EHCI_EXYNOS diff --git a/include/configs/thunderx_88xx.h b/include/configs/thunderx_88xx.h index 34940efb412c73aea09207dfbb9a3d7d7686fc99..1f0b9d4f65936a06f625bc61fc60babf85f2e72d 100644 --- a/include/configs/thunderx_88xx.h +++ b/include/configs/thunderx_88xx.h @@ -77,7 +77,6 @@ #define CONFIG_CMDLINE_EDITING 1 #define CONFIG_SYS_MAXARGS 64 /* max command args */ #define CONFIG_NO_RELOCATION 1 -#define CONFIG_LIB_RAND #define PLL_REF_CLK 50000000 /* 50 MHz */ #define NS_PER_REF_CLK_TICK (1000000000/PLL_REF_CLK) diff --git a/include/configs/trats.h b/include/configs/trats.h index b97efc21cda13d5e56451e4a891f54a7f3c280a1..465eed0a5ce7919b34701eb033f2a5b194676a82 100644 --- a/include/configs/trats.h +++ b/include/configs/trats.h @@ -171,7 +171,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -#define CONFIG_LIB_HW_RAND /* Common misc for Samsung */ #define CONFIG_MISC_COMMON diff --git a/include/configs/trats2.h b/include/configs/trats2.h index 871accf791b25a031b9d0e6d125d7eb1cf8980be..b9bf918fb0b29c02e4971d0b4bc30bb8efccd44e 100644 --- a/include/configs/trats2.h +++ b/include/configs/trats2.h @@ -153,7 +153,6 @@ /* Security subsystem - enable hw_rand() */ #define CONFIG_EXYNOS_ACE_SHA -#define CONFIG_LIB_HW_RAND /* Common misc for Samsung */ #define CONFIG_MISC_COMMON diff --git a/lib/Kconfig b/lib/Kconfig index 710deb7a630306dbb088517117e4e09beb86de85..87db2e396eee374900c268ef61bf06014db63b22 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -65,10 +65,22 @@ config REGEX regex support to some commands, for example "env grep" and "setexpr". -config LIB_RAND - bool "Pseudo-random library support " +choice + prompt "Pseudo-random library support type" + depends on NET_RANDOM_ETHADDR || RANDOM_UUID || CMD_UUID + default LIB_RAND help - This library provides pseudo-random number generator functions. + Select the library to provide pseudo-random number generator + functions. LIB_HW_RAND supports certain hardware engines that + provide this functionality. If in doubt, select LIB_RAND. + +config LIB_RAND + bool "Pseudo-random library support" + +config LIB_HW_RAND + bool "HW Engine for random libray support" + +endchoice config SPL_TINY_MEMSET bool "Use a very small memset() in SPL" diff --git a/net/Kconfig b/net/Kconfig index 414c5497c7584ea78dfd4696c4c6b42c3640292b..4e2bf38ad5a369c207447dd16dc0d1ca36c2426a 100644 --- a/net/Kconfig +++ b/net/Kconfig @@ -9,7 +9,6 @@ if NET config NET_RANDOM_ETHADDR bool "Random ethaddr if unset" - select LIB_RAND help Selecting this will allow the Ethernet interface to function even when the ethaddr variable for that interface is unset. diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt index 3617afb241c3995477915db23c607dca949da0a1..1be3f234326e7a053f6152fea54b5a86ee554f28 100644 --- a/scripts/config_whitelist.txt +++ b/scripts/config_whitelist.txt @@ -1217,7 +1217,6 @@ CONFIG_LEGACY_BOOTCMD_ENV CONFIG_LG4573 CONFIG_LG4573_BUS CONFIG_LG4573_CS -CONFIG_LIB_HW_RAND CONFIG_LIB_UUID CONFIG_LINUX CONFIG_LINUX_RESET_VEC