diff options
author | Alex Shumsky <alexthreed@gmail.com> | 2024-10-16 13:02:03 +0300 |
---|---|---|
committer | Kever Yang <kever.yang@rock-chips.com> | 2024-10-26 10:46:47 +0800 |
commit | ed4ae7386257aa66455e330234e513d098a36f84 (patch) | |
tree | dcc34d79442f1cae9dc06db0f1e472224c172bc6 /common | |
parent | 352cec9a056b7fcf490d5ad93e2cf81dd8f2b9c9 (diff) | |
download | u-boot-ed4ae7386257aa66455e330234e513d098a36f84.tar.gz |
rockchip: board: Increase rng-seed size to make it sufficient for modern Linux
Increase rng-seed size to make Linux happy and initialize rng pool instantly.
Linux 5.19+ requires 32 bytes of entropy to initialize random pool, but u-boot
currently provides only 8 bytes.
Linux 5.18 and probably some versions before it used to require 64 bytes.
Bump min value to 64 bytes to be on a safe side.
Boot with 8 byte rng-seed (Linux 6.11):
# dmesg | grep crng
[ 12.089286] random: crng init done
Boot with 32 byte rng-seed (Linux 6.11):
# dmesg | grep crng
[ 0.000000] random: crng init done
Linux source references:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.19#n551
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/char/random.c?h=v5.18#n236
Signed-off-by: Alex Shumsky <alexthreed@gmail.com>
Fixes: d2048bafae40 ("rockchip: board: Add board_rng_seed() for all Rockchip devices")
Reviewed-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Marek Vasut <marex@denx.de>
Reviewed-by: Quentin Schulz <quentin.schulz@cherry.de>
Reviewed-by: Kever Yang <kever.yang@rock-chips.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/Kconfig | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/common/Kconfig b/common/Kconfig index 90cee19d413..14a6c44c804 100644 --- a/common/Kconfig +++ b/common/Kconfig @@ -928,6 +928,9 @@ config BOARD_RNG_SEED new seed for use on subsequent boots, and whether or not the kernel should account any entropy from the given seed. + Default seed size (64 bytes) can be overridden by a decimal + environment variable rng_seed_size. + endmenu menu "Update support" |