The 5.15.11 Linux kernel has been marked as stable in Gentoo a few weeks ago and I've wanted to put out a new generic kernel configuration but I kept struggling with a really silly issue adapting it. As with my previous posts this configuration is largely based on the Fedora kernel with some Gentoo-specific tweaks. It supports practically every bit of hardware in existence and enables a lot of bleeding-edge kernel functionality.
The only few notable changes compared to the Fedora kernel are the following:
binfmt_miscmodule is baked in for convenience
The NVMe core modules are baked in so you can boot from an NVMe drive without having to use an initrd
CONFIG_ACPI_EXTLOGoption is enabled. This is useful if you're using rasdaemon to monitor ECC memory
The boot logo is disabled
Kernel debugging is disabled
CONFIG_GENTOO_KERNEL_SELF_PROTECTIONoption is enabled. This implicitly enables an additional set of security features for hardening the kernel
CONFIG_GENTOO_PRINT_FIRMWARE_INFOoption is enabled, it prints out the firmwares that are loaded into various bits of hardware. This is useful if you want to reduce the amount of files installed
Note that the RTC time based on NTP synchronization is enabled (and it's finally become the default in many other Linux distros) so you don't need the hwclock service (but you can use osclock instead if some other service requires the clock facility).
Additionally note that this kernel configuration is for use with OpenRC. If
you're using systemd you'll have to remove the
CONFIG_GENTOO_LINUX_INIT_SCRIPT=y line from the configuration file and add
For maximum compatibility I haven't enabled kernel compression in this
configuration, but I suggest using
CONFIG_MODULE_COMPRESS_ZSTD=y as it
provides significant space savings while having effectively no impact on load
times. Just make sure that the
sys-apps/kmod package has the zstd
USE flag set so that it can handle the compressed modules.
To use this configuration file install the latest stable
sys-kernel/gentoo-sources package (5.15.x), copy the configuration file
/usr/src/linux/ and rename it to
.config then proceed to build
and install the kernel as usual.