kernel: enable CONFIG_HW_RANDOM to be built-in

Starting with kernels around 6.18 and 6.19 I noticed,
that /dev/hwrng was no longer present and the TPM 2.0
usually found in modern computers did therefore not automatically
seed the kernel RNG with the hw random subsystem.

Enabling CONFIG_HW_RANDOM to yes fixes this. The subsystem
is rather small and should not increase the default kernel size
too much.

Signed-off-by: Markus Theil <theil.markus@gmail.com>
This commit is contained in:
Markus Theil
2026-04-10 20:15:10 +02:00
parent 23c0b3ecee
commit 24941111e4
@@ -825,6 +825,8 @@ let
whenOlder "6.2" yes
); # allow RDRAND to seed the RNG
RANDOM_TRUST_BOOTLOADER = whenOlder "6.2" yes; # allow the bootloader to seed the RNG
# only when compiled as yes, TPM 2.0 will automatically seed the kernel RNG
HW_RANDOM = yes;
MODULE_SIG = no; # r13y, generates a random key during build and bakes it in
# Depends on MODULE_SIG and only really helps when you sign your modules