···
# Enable CPU lockup detection
SOFTLOCKUP_DETECTOR = yes;
+
HARDLOCKUP_DETECTOR = lib.mkIf (
+
with stdenv.hostPlatform; isPower || isx86 || lib.versionAtLeast version "6.5"
# Enable streaming logs to a remote device over a network
···
# Collect ECC errors and retire pages that fail too often
+
RAS_CEC = lib.mkIf stdenv.hostPlatform.isx86 yes;
// lib.optionalAttrs (stdenv.hostPlatform.is32bit) {
# Enable access to the full memory range (aka PAE) on 32-bit architectures
···
+
FB_VESA = lib.mkIf stdenv.hostPlatform.isx86 yes;
FRAMEBUFFER_CONSOLE = yes;
FRAMEBUFFER_CONSOLE_DEFERRED_TAKEOVER = yes;
FRAMEBUFFER_CONSOLE_ROTATION = yes;
···
# compile in DRM so simpledrm can load before initrd if necessary
+
AGP = lib.mkIf (with stdenv.hostPlatform; isPower || isx86) yes;
DRM_LEGACY = whenOlder "6.8" no;
···
# Allow specifying custom EDID on the kernel command line
DRM_LOAD_EDID_FIRMWARE = yes;
+
VGA_SWITCHEROO = lib.mkIf stdenv.hostPlatform.isx86 yes; # Hybrid graphics support
+
DRM_GMA500 = lib.mkIf stdenv.hostPlatform.isx86 (whenAtLeast "5.12" module);
+
DRM_GMA600 = lib.mkIf stdenv.hostPlatform.isx86 (whenOlder "5.13" yes);
+
DRM_GMA3600 = lib.mkIf stdenv.hostPlatform.isx86 (whenOlder "5.12" yes);
+
DRM_VMWGFX_FBCON = lib.mkIf stdenv.hostPlatform.isx86 (whenOlder "6.1" yes);
# (experimental) amdgpu support for verde and newer chipsets
# (stable) amdgpu support for bonaire and newer chipsets
···
DRM_AMD_DC_DCN1_0 = whenOlder "5.6" yes;
DRM_AMD_DC_DCN2_0 = whenOlder "5.6" yes;
DRM_AMD_DC_DCN2_1 = whenOlder "5.6" yes;
+
DRM_AMD_DC_DCN3_0 = lib.mkIf (with stdenv.hostPlatform; isx86) (whenBetween "5.9" "5.11" yes);
+
DRM_AMD_DC_DCN = lib.mkIf (with stdenv.hostPlatform; isx86 || isPower64) (
+
whenBetween "5.11" "6.4" yes
DRM_AMD_DC_FP = whenAtLeast "6.4" yes;
DRM_AMD_DC_HDCP = whenBetween "5.5" "6.4" yes;
DRM_AMD_DC_SI = whenAtLeast "5.10" yes;
···
# Enable AMD secure display when available
+
DRM_AMD_SECURE_DISPLAY = lib.mkIf (
+
with stdenv.hostPlatform;
+
(lib.versionAtLeast version "5.13" && (isx86 || isPower64))
+
|| (lib.versionAtLeast version "6.2" && isAarch64 && !stdenv.cc.isClang)
+
|| (lib.versionAtLeast version "6.5" && isLoongarch64 && !stdenv.cc.isClang)
+
|| (lib.versionAtLeast version "6.10" && isRiscV64 && !stdenv.cc.isClang)
# Enable AMD image signal processor
DRM_AMD_ISP = whenAtLeast "6.11" yes;
···
+
MICROCODE = lib.mkIf stdenv.hostPlatform.isx86 yes;
+
MICROCODE_INTEL = lib.mkIf stdenv.hostPlatform.isx86 (whenOlder "6.6" yes);
+
MICROCODE_AMD = lib.mkIf stdenv.hostPlatform.isx86 (whenOlder "6.6" yes);
# https://lwn.net/Articles/682582/
# https://bugzilla.kernel.org/show_bug.cgi?id=12309#c655
···
+
HYPERVISOR_GUEST = lib.mkIf stdenv.hostPlatform.isx86 yes;
PARAVIRT_SPINLOCKS = option yes;
+
KVM_ASYNC_PF = lib.mkIf (with stdenv.hostPlatform; isS390 || isx86) yes;
KVM_GENERIC_DIRTYLOG_READ_PROTECT = yes;
+
KVM_GUEST = lib.mkIf (with stdenv.hostPlatform; isPower || isx86) yes;
···
tristate = lib.mkIf (!stdenv.hostPlatform.is64bit) "y";
+
VFIO_PCI_VGA = lib.mkIf stdenv.hostPlatform.isx86_64 yes;
···
# Allows soft-dirty tracking on pages, used by CRIU.
# See https://docs.kernel.org/admin-guide/mm/soft-dirty.html
+
MEM_SOFT_DIRTY = lib.mkIf (with stdenv.hostPlatform; isS390 || isPower64 || isx86_64) yes;
···
# stdenv.hostPlatform.linux-kernel.target assumes uncompressed on RISC-V.
KERNEL_UNCOMPRESSED = lib.mkIf stdenv.hostPlatform.isRiscV yes;
KERNEL_XZ = lib.mkIf (!stdenv.hostPlatform.isRiscV && !useZstd) yes;
+
KERNEL_ZSTD = lib.mkIf (
+
with stdenv.hostPlatform;
+
(isMips || isS390 || isx86 || (lib.versionAtLeast version "6.1" && isAarch64 || isLoongArch64))
HID_BATTERY_STRENGTH = yes;
# enabled by default in x86_64 but not arm64, so we do that here
···
# Allows debugging systems that get stuck during suspend/resume
+
PM_TRACE_RTC = lib.mkIf stdenv.hostPlatform.isx86 yes;
ACCESSIBILITY = yes; # Accessibility support
AUXDISPLAY = yes; # Auxiliary Display support
···
FRONTSWAP = whenOlder "6.6" yes;
FUSION = yes; # Fusion MPT device support
+
IDE = lib.mkIf (with stdenv.hostPlatform; isAarch32 || isM68k || isMips || isPower || isx86) (
+
); # deprecated IDE support, removed in 5.14
IDLE_PAGE_TRACKING = yes;
JOYSTICK_XPAD_FF = option yes; # X-Box gamepad rumble support
JOYSTICK_XPAD_LEDS = option yes; # LED Support for Xbox360 controller 'BigX' LED
+
KEYBOARD_APPLESPI = lib.mkIf stdenv.hostPlatform.isx86 module;
···
MOUSE_ELAN_I2C_SMBUS = yes;
MOUSE_PS2_ELANTECH = yes; # Elantech PS/2 protocol extension
+
MOUSE_PS2_VMMOUSE = lib.mkIf stdenv.hostPlatform.isx86 yes;
+
MTRR_SANITIZER = lib.mkIf stdenv.hostPlatform.isx86 yes;
NET_FC = yes; # Fibre Channel driver support
# Needed for touchpads to work on some AMD laptops
PINCTRL_AMD = whenAtLeast "5.19" yes;
# GPIO on Intel Bay Trail, for some Chromebook internal eMMC disks
+
PINCTRL_BAYTRAIL = lib.mkIf stdenv.hostPlatform.isx86 yes;
# GPIO for Braswell and Cherryview devices
# Needs to be built-in to for integrated keyboards to function properly
+
PINCTRL_CHERRYVIEW = lib.mkIf stdenv.hostPlatform.isx86 yes;
# 8 is default. Modern gpt tables on eMMC may go far beyond 8.
MMC_BLOCK_MINORS = freeform "32";
···
+
X86_CHECK_BIOS_CORRUPTION = lib.mkIf stdenv.hostPlatform.isx86 yes;
+
X86_MCE = lib.mkIf stdenv.hostPlatform.isx86 yes;
RAS = yes; # Needed for EDAC support
···
+
X86_AMD_PLATFORM_DEVICE = lib.mkIf stdenv.hostPlatform.isx86 yes;
+
X86_PLATFORM_DRIVERS_DELL = lib.mkIf stdenv.hostPlatform.isx86 (whenAtLeast "5.12" yes);
+
X86_PLATFORM_DRIVERS_HP = lib.mkIf stdenv.hostPlatform.isx86 (whenAtLeast "6.1" yes);
···
CROS_KBD_LED_BACKLIGHT = module;
TCG_TIS_SPI_CR50 = whenAtLeast "5.5" yes;
···
CP15_BARRIER_EMULATION = lib.mkIf (stdenv.hostPlatform.system == "aarch64-linux") yes;
// lib.optionalAttrs (stdenv.hostPlatform.system == "x86_64-linux") {
+
CROS_EC_ISHTP = module;
CHROMEOS_LAPTOP = module;
CHROMEOS_PSTORE = module;