1/*
2
3 WARNING/NOTE: whenever you want to add an option here you need to
4 either
5
6 * mark it as an optional one with `?` suffix,
7 * or make sure it works for all the versions in nixpkgs,
8 * or check for which kernel versions it will work (using kernel
9 changelog, google or whatever) and mark it with `versionOlder` or
10 `versionAtLeast`.
11
12 Then do test your change by building all the kernels (or at least
13 their configs) in Nixpkgs or else you will guarantee lots and lots
14 of pain to users trying to switch to an older kernel because of some
15 hardware problems with a new one.
16
17*/
18
19{ stdenv, version, extraConfig, features }:
20
21with stdenv.lib;
22
23''
24 # Compress kernel modules for a sizable disk space savings.
25 ${optionalString (versionAtLeast version "3.18") ''
26 MODULE_COMPRESS y
27 MODULE_COMPRESS_XZ y
28 ''}
29
30 KERNEL_XZ y
31
32 # Debugging.
33 DEBUG_KERNEL y
34 DYNAMIC_DEBUG y
35 BACKTRACE_SELF_TEST n
36 DEBUG_DEVRES n
37 DEBUG_STACK_USAGE n
38 DEBUG_STACKOVERFLOW n
39 SCHEDSTATS n
40 DETECT_HUNG_TASK y
41 DEBUG_INFO n # Not until we implement a separate debug output
42
43 ${optionalString (versionOlder version "4.4") ''
44 CPU_NOTIFIER_ERROR_INJECT? n
45 ''}
46
47 ${optionalString (versionOlder version "4.11") ''
48 TIMER_STATS y
49 DEBUG_NX_TEST n
50 ''}
51
52 # Bump the maximum number of CPUs to support systems like EC2 x1.*
53 # instances and Xeon Phi.
54 ${optionalString (stdenv.hostPlatform.system == "x86_64-linux" || stdenv.hostPlatform.system == "aarch64-linux") ''
55 NR_CPUS 384
56 ''}
57
58 # Unix domain sockets.
59 UNIX y
60
61 # Power management.
62 ${optionalString (versionOlder version "3.19") ''
63 PM_RUNTIME y
64 ''}
65 PM_ADVANCED_DEBUG y
66 ${optionalString (versionAtLeast version "3.11") ''
67 X86_INTEL_LPSS y
68 ''}
69 ${optionalString (versionAtLeast version "3.10") ''
70 X86_INTEL_PSTATE y
71 ''}
72 INTEL_IDLE y
73 CPU_FREQ_DEFAULT_GOV_PERFORMANCE y
74 ${optionalString (versionOlder version "3.10") ''
75 USB_SUSPEND y
76 ''}
77 PM_WAKELOCKS y
78
79 # Support drivers that need external firmware.
80 STANDALONE n
81
82 # Make /proc/config.gz available.
83 IKCONFIG y
84 IKCONFIG_PROC y
85
86 # Optimize with -O2, not -Os.
87 CC_OPTIMIZE_FOR_SIZE n
88
89 # Enable the kernel's built-in memory tester.
90 MEMTEST y
91
92 # Include the CFQ I/O scheduler in the kernel, rather than as a
93 # module, so that the initrd gets a good I/O scheduler.
94 IOSCHED_CFQ y
95 BLK_CGROUP y # required by CFQ
96 IOSCHED_DEADLINE y
97 ${optionalString (versionAtLeast version "4.11") ''
98 MQ_IOSCHED_DEADLINE y
99 ''}
100 ${optionalString (versionAtLeast version "4.12") ''
101 BFQ_GROUP_IOSCHED y
102 MQ_IOSCHED_KYBER y
103 IOSCHED_BFQ m
104 ''}
105
106 # Enable NUMA.
107 NUMA? y
108
109 # Disable some expensive (?) features.
110 PM_TRACE_RTC n
111
112 # Enable initrd support.
113 BLK_DEV_RAM y
114 BLK_DEV_INITRD y
115
116 # Enable various subsystems.
117 ACCESSIBILITY y # Accessibility support
118 AUXDISPLAY y # Auxiliary Display support
119 DONGLE y # Serial dongle support
120 HIPPI y
121 MTD_COMPLEX_MAPPINGS y # needed for many devices
122 SCSI_LOWLEVEL y # enable lots of SCSI devices
123 SCSI_LOWLEVEL_PCMCIA y
124 SCSI_SAS_ATA y # added to enable detection of hard drive
125 SPI y # needed for many devices
126 SPI_MASTER y
127 WAN y
128
129 # Networking options.
130 NET y
131 IP_PNP n
132 ${optionalString (versionOlder version "3.13") ''
133 IPV6_PRIVACY y
134 ''}
135 NETFILTER y
136 NETFILTER_ADVANCED y
137 CGROUP_BPF? y # Required by systemd per-cgroup firewalling
138 IP_ROUTE_VERBOSE y
139 IP_MROUTE_MULTIPLE_TABLES y
140 IP_VS_PROTO_TCP y
141 IP_VS_PROTO_UDP y
142 IP_VS_PROTO_ESP y
143 IP_VS_PROTO_AH y
144 IP_DCCP_CCID3 n # experimental
145 IP_MULTICAST y
146 IPV6_ROUTER_PREF y
147 IPV6_ROUTE_INFO y
148 IPV6_OPTIMISTIC_DAD y
149 IPV6_MULTIPLE_TABLES y
150 IPV6_SUBTREES y
151 IPV6_MROUTE y
152 IPV6_MROUTE_MULTIPLE_TABLES y
153 IPV6_PIMSM_V2 y
154 ${optionalString (versionAtLeast version "4.7") ''
155 IPV6_FOU_TUNNEL m
156 ''}
157 CLS_U32_PERF y
158 CLS_U32_MARK y
159 ${optionalString (stdenv.system == "x86_64-linux") ''
160 BPF_JIT y
161 ''}
162 ${optionalString (versionAtLeast version "4.4") ''
163 NET_CLS_BPF m
164 NET_ACT_BPF m
165 ''}
166 L2TP_V3 y
167 L2TP_IP m
168 L2TP_ETH m
169 BRIDGE_VLAN_FILTERING y
170 BONDING m
171 NET_L3_MASTER_DEV? y
172 NET_FOU_IP_TUNNELS? y
173 IP_NF_TARGET_REDIRECT m
174
175 # Wireless networking.
176 CFG80211_WEXT? y # Without it, ipw2200 drivers don't build
177 IPW2100_MONITOR? y # support promiscuous mode
178 IPW2200_MONITOR? y # support promiscuous mode
179 HOSTAP_FIRMWARE? y # Support downloading firmware images with Host AP driver
180 HOSTAP_FIRMWARE_NVRAM? y
181 ATH9K_PCI? y # Detect Atheros AR9xxx cards on PCI(e) bus
182 ATH9K_AHB? y # Ditto, AHB bus
183 B43_PHY_HT? y
184 BCMA_HOST_PCI? y
185
186 # Enable various FB devices.
187 FB y
188 FB_EFI y
189 FB_NVIDIA_I2C y # Enable DDC Support
190 FB_RIVA_I2C y
191 FB_ATY_CT y # Mach64 CT/VT/GT/LT (incl. 3D RAGE) support
192 FB_ATY_GX y # Mach64 GX support
193 FB_SAVAGE_I2C y
194 FB_SAVAGE_ACCEL y
195 FB_SIS_300 y
196 FB_SIS_315 y
197 FB_3DFX_ACCEL y
198 FB_VESA y
199 FRAMEBUFFER_CONSOLE y
200 FRAMEBUFFER_CONSOLE_ROTATION y
201 ${optionalString (stdenv.system == "i686-linux") ''
202 FB_GEODE y
203 ''}
204
205 # Video configuration.
206 # Enable KMS for devices whose X.org driver supports it.
207 ${optionalString (versionOlder version "4.3") ''
208 DRM_I915_KMS y
209 ''}
210 # Allow specifying custom EDID on the kernel command line
211 DRM_LOAD_EDID_FIRMWARE y
212 VGA_SWITCHEROO y # Hybrid graphics support
213 DRM_GMA600 y
214 DRM_GMA3600 y
215 ${optionalString (versionAtLeast version "4.5" && (versionOlder version "4.9")) ''
216 DRM_AMD_POWERPLAY y # necessary for amdgpu polaris support
217 ''}
218 ${optionalString (versionAtLeast version "4.9") ''
219 DRM_AMDGPU_SI y # (experimental) amdgpu support for verde and newer chipsets
220 DRM_AMDGPU_CIK y # (stable) amdgpu support for bonaire and newer chipsets
221 ''}
222
223 # Sound.
224 SND_DYNAMIC_MINORS y
225 SND_AC97_POWER_SAVE y # AC97 Power-Saving Mode
226 SND_HDA_INPUT_BEEP y # Support digital beep via input layer
227 SND_HDA_RECONFIG y # Support reconfiguration of jack functions
228 SND_HDA_PATCH_LOADER y # Support configuring jack functions via fw mechanism at boot
229 SND_USB_CAIAQ_INPUT y
230 ${optionalString (versionOlder version "4.12") ''
231 PSS_MIXER y # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
232 ''}
233
234 # USB serial devices.
235 USB_SERIAL_GENERIC y # USB Generic Serial Driver
236
237 # Include firmware for various USB serial devices.
238 # Only applicable for kernels below 4.16, after that no firmware is shipped in the kernel tree.
239 ${optionalString (versionOlder version "4.16") ''
240 USB_SERIAL_KEYSPAN_MPR y
241 USB_SERIAL_KEYSPAN_USA28 y
242 USB_SERIAL_KEYSPAN_USA28X y
243 USB_SERIAL_KEYSPAN_USA28XA y
244 USB_SERIAL_KEYSPAN_USA28XB y
245 USB_SERIAL_KEYSPAN_USA19 y
246 USB_SERIAL_KEYSPAN_USA18X y
247 USB_SERIAL_KEYSPAN_USA19W y
248 USB_SERIAL_KEYSPAN_USA19QW y
249 USB_SERIAL_KEYSPAN_USA19QI y
250 USB_SERIAL_KEYSPAN_USA49W y
251 USB_SERIAL_KEYSPAN_USA49WLC y
252 ''}
253
254 # Device mapper (RAID, LVM, etc.)
255 MD y
256
257 # Filesystem options - in particular, enable extended attributes and
258 # ACLs for all filesystems that support them.
259 FANOTIFY y
260 TMPFS y
261 TMPFS_POSIX_ACL y
262 ${optionalString (versionAtLeast version "4.9") ''
263 FS_ENCRYPTION? m
264 ''}
265 EXT2_FS_XATTR y
266 EXT2_FS_POSIX_ACL y
267 EXT2_FS_SECURITY y
268 ${optionalString (versionOlder version "4.0") ''
269 EXT2_FS_XIP y # Ext2 execute in place support
270 ''}
271 EXT3_FS_POSIX_ACL y
272 EXT3_FS_SECURITY y
273 EXT4_FS_POSIX_ACL y
274 EXT4_ENCRYPTION? ${if versionOlder version "4.8" then "m" else "y"}
275 EXT4_FS_SECURITY y
276 REISERFS_FS_XATTR? y
277 REISERFS_FS_POSIX_ACL? y
278 REISERFS_FS_SECURITY? y
279 JFS_POSIX_ACL? y
280 JFS_SECURITY? y
281 XFS_QUOTA? y
282 XFS_POSIX_ACL? y
283 XFS_RT? y # XFS Realtime subvolume support
284 OCFS2_DEBUG_MASKLOG? n
285 BTRFS_FS_POSIX_ACL y
286 UBIFS_FS_ADVANCED_COMPR? y
287 F2FS_FS m
288 F2FS_FS_SECURITY? y
289 F2FS_FS_ENCRYPTION? y
290 UDF_FS m
291 ${optionalString (versionAtLeast version "4.0" && versionOlder version "4.6") ''
292 NFSD_PNFS y
293 ''}
294 NFSD_V2_ACL y
295 NFSD_V3 y
296 NFSD_V3_ACL y
297 NFSD_V4 y
298 ${optionalString (versionAtLeast version "3.11") ''
299 NFSD_V4_SECURITY_LABEL y
300 ''}
301 NFS_FSCACHE y
302 NFS_SWAP y
303 NFS_V3_ACL y
304 ${optionalString (versionAtLeast version "3.11") ''
305 NFS_V4_1 y # NFSv4.1 client support
306 NFS_V4_2 y
307 NFS_V4_SECURITY_LABEL y
308 ''}
309 CIFS_XATTR y
310 CIFS_POSIX y
311 CIFS_FSCACHE y
312 CIFS_STATS y
313 CIFS_WEAK_PW_HASH y
314 CIFS_UPCALL y
315 CIFS_ACL y
316 CIFS_DFS_UPCALL y
317 ${optionalString (versionOlder version "4.13") ''
318 CIFS_SMB2 y
319 ''}
320 ${optionalString (versionAtLeast version "3.12") ''
321 CEPH_FSCACHE y
322 ''}
323 ${optionalString (versionAtLeast version "3.14") ''
324 CEPH_FS_POSIX_ACL y
325 ''}
326 ${optionalString (versionAtLeast version "3.13") ''
327 SQUASHFS_FILE_DIRECT y
328 SQUASHFS_DECOMP_MULTI_PERCPU y
329 ''}
330 SQUASHFS_XATTR y
331 SQUASHFS_ZLIB y
332 SQUASHFS_LZO y
333 SQUASHFS_XZ y
334 ${optionalString (versionAtLeast version "3.19") ''
335 SQUASHFS_LZ4 y
336 ''}
337
338 # Native Language Support modules, needed by some filesystems
339 NLS y
340 NLS_DEFAULT utf8
341 NLS_UTF8 m
342 NLS_CODEPAGE_437 m # VFAT default for the codepage= mount option
343 NLS_ISO8859_1 m # VFAT default for the iocharset= mount option
344
345 # Runtime security tests
346 ${optionalString (versionOlder version "4.11") ''
347 DEBUG_SET_MODULE_RONX? y # Detect writes to read-only module pages
348 ''}
349
350 # Security related features.
351 RANDOMIZE_BASE? y
352 STRICT_DEVMEM? y # Filter access to /dev/mem
353 SECURITY_SELINUX_BOOTPARAM_VALUE 0 # Disable SELinux by default
354 SECURITY_YAMA? y # Prevent processes from ptracing non-children processes
355 DEVKMEM n # Disable /dev/kmem
356 ${optionalString (! stdenv.hostPlatform.isArm)
357 (if versionOlder version "3.14" then ''
358 CC_STACKPROTECTOR? y # Detect buffer overflows on the stack
359 '' else ''
360 CC_STACKPROTECTOR_REGULAR? y
361 '')}
362 ${optionalString (versionAtLeast version "3.12") ''
363 USER_NS y # Support for user namespaces
364 ''}
365
366 # AppArmor support
367 SECURITY_APPARMOR y
368 DEFAULT_SECURITY_APPARMOR y
369
370 # Microcode loading support
371 MICROCODE y
372 MICROCODE_INTEL y
373 MICROCODE_AMD y
374 ${optionalString (versionAtLeast version "3.11" && versionOlder version "4.4") ''
375 MICROCODE_EARLY y
376 MICROCODE_INTEL_EARLY y
377 MICROCODE_AMD_EARLY y
378 ''}
379
380 ${optionalString (versionAtLeast version "4.10") ''
381 # Write Back Throttling
382 # https://lwn.net/Articles/682582/
383 # https://bugzilla.kernel.org/show_bug.cgi?id=12309#c655
384 BLK_WBT y
385 BLK_WBT_SQ y
386 BLK_WBT_MQ y
387 ''}
388
389 # Misc. options.
390 8139TOO_8129 y
391 8139TOO_PIO n # PIO is slower
392 AIC79XX_DEBUG_ENABLE n
393 AIC7XXX_DEBUG_ENABLE n
394 AIC94XX_DEBUG n
395 ${optionalString (versionAtLeast version "3.3" && versionOlder version "3.13") ''
396 AUDIT_LOGINUID_IMMUTABLE y
397 ''}
398 ${optionalString (versionOlder version "4.4") ''
399 B43_PCMCIA? y
400 ''}
401 BLK_DEV_INITRD y
402 BLK_DEV_INTEGRITY y
403 BSD_PROCESS_ACCT_V3 y
404 BT_HCIUART_BCSP? y
405 BT_HCIUART_H4? y # UART (H4) protocol support
406 BT_HCIUART_LL? y
407 BT_RFCOMM_TTY? y # RFCOMM TTY support
408 CLEANCACHE? y
409 CRASH_DUMP? n
410 DVB_DYNAMIC_MINORS? y # we use udev
411 EFI_STUB y # EFI bootloader in the bzImage itself
412 CGROUPS y # used by systemd
413 FHANDLE y # used by systemd
414 SECCOMP y # used by systemd >= 231
415 SECCOMP_FILTER y # ditto
416 POSIX_MQUEUE y
417 FRONTSWAP y
418 FUSION y # Fusion MPT device support
419 IDE n # deprecated IDE support
420 ${optionalString (versionAtLeast version "4.3") ''
421 IDLE_PAGE_TRACKING y
422 ''}
423 IRDA_ULTRA y # Ultra (connectionless) protocol
424 JOYSTICK_IFORCE_232? y # I-Force Serial joysticks and wheels
425 JOYSTICK_IFORCE_USB? y # I-Force USB joysticks and wheels
426 JOYSTICK_XPAD_FF? y # X-Box gamepad rumble support
427 JOYSTICK_XPAD_LEDS? y # LED Support for Xbox360 controller 'BigX' LED
428 KEXEC_FILE? y
429 KEXEC_JUMP? y
430 LDM_PARTITION y # Windows Logical Disk Manager (Dynamic Disk) support
431 LOGIRUMBLEPAD2_FF y # Logitech Rumblepad 2 force feedback
432 LOGO n # not needed
433 MEDIA_ATTACH y
434 MEGARAID_NEWGEN y
435 ${optionalString (versionAtLeast version "3.15" && versionOlder version "4.8") ''
436 MLX4_EN_VXLAN y
437 ''}
438 ${optionalString (versionOlder version "4.9") ''
439 MODVERSIONS y
440 ''}
441 MOUSE_PS2_ELANTECH y # Elantech PS/2 protocol extension
442 MTRR_SANITIZER y
443 NET_FC y # Fibre Channel driver support
444 ${optionalString (versionAtLeast version "3.11") ''
445 PINCTRL_BAYTRAIL y # GPIO on Intel Bay Trail, for some Chromebook internal eMMC disks
446 ''}
447 MMC_BLOCK_MINORS 32 # 8 is default. Modern gpt tables on eMMC may go far beyond 8.
448 PPP_MULTILINK y # PPP multilink support
449 PPP_FILTER y
450 REGULATOR y # Voltage and Current Regulator Support
451 RC_DEVICES? y # Enable IR devices
452 RT2800USB_RT55XX y
453 SCHED_AUTOGROUP y
454 CFS_BANDWIDTH y
455 SCSI_LOGGING y # SCSI logging facility
456 SERIAL_8250 y # 8250/16550 and compatible serial support
457 SLIP_COMPRESSED y # CSLIP compressed headers
458 SLIP_SMART y
459 HWMON y
460 THERMAL_HWMON y # Hardware monitoring support
461 ${optionalString (versionAtLeast version "3.15") ''
462 UEVENT_HELPER n
463 ''}
464 ${optionalString (versionOlder version "3.15") ''
465 USB_DEBUG? n
466 ''}
467 USB_EHCI_ROOT_HUB_TT y # Root Hub Transaction Translators
468 USB_EHCI_TT_NEWSCHED y # Improved transaction translator scheduling
469 ${optionalString (versionAtLeast version "4.3") ''
470 USERFAULTFD y
471 ''}
472 X86_CHECK_BIOS_CORRUPTION y
473 X86_MCE y
474
475 ${optionalString (versionAtLeast version "3.12") ''
476 HOTPLUG_PCI_ACPI y # PCI hotplug using ACPI
477 HOTPLUG_PCI_PCIE y # PCI-Expresscard hotplug support
478 ''}
479
480
481 # Linux containers.
482 NAMESPACES? y # Required by 'unshare' used by 'nixos-install'
483 RT_GROUP_SCHED n
484 CGROUP_DEVICE? y
485 MEMCG y
486 MEMCG_SWAP y
487 ${optionalString (versionOlder version "4.7") "DEVPTS_MULTIPLE_INSTANCES y"}
488 BLK_DEV_THROTTLING y
489 CFQ_GROUP_IOSCHED y
490 ${optionalString (versionAtLeast version "4.3") ''
491 CGROUP_PIDS y
492 ''}
493
494 # Enable staging drivers. These are somewhat experimental, but
495 # they generally don't hurt.
496 STAGING y
497
498 # PROC_EVENTS requires that the netlink connector is not built
499 # as a module. This is required by libcgroup's cgrulesengd.
500 CONNECTOR y
501 PROC_EVENTS y
502
503 # Tracing.
504 FTRACE y
505 KPROBES y
506 FUNCTION_TRACER y
507 FTRACE_SYSCALLS y
508 SCHED_TRACER y
509 STACK_TRACER y
510
511 ${if versionOlder version "4.11" then ''
512 UPROBE_EVENT? y
513 '' else ''
514 UPROBE_EVENTS? y
515 ''}
516
517 ${optionalString (versionAtLeast version "4.4") ''
518 BPF_SYSCALL y
519 BPF_EVENTS y
520 ''}
521 FUNCTION_PROFILER y
522 RING_BUFFER_BENCHMARK n
523
524 # Devtmpfs support.
525 DEVTMPFS y
526
527 # Easier debugging of NFS issues.
528 SUNRPC_DEBUG y
529
530 # Virtualisation.
531 PARAVIRT? y
532 HYPERVISOR_GUEST y
533 PARAVIRT_SPINLOCKS? y
534 ${optionalString (versionOlder version "4.8") ''
535 KVM_APIC_ARCHITECTURE y
536 ''}
537 KVM_ASYNC_PF y
538 ${optionalString ((versionAtLeast version "4.0") && (versionOlder version "4.12")) ''
539 KVM_COMPAT? y
540 ''}
541 ${optionalString (versionOlder version "4.12") ''
542 KVM_DEVICE_ASSIGNMENT? y
543 ''}
544 ${optionalString (versionAtLeast version "4.0") ''
545 KVM_GENERIC_DIRTYLOG_READ_PROTECT y
546 ''}
547 KVM_GUEST y
548 KVM_MMIO y
549 ${optionalString (versionAtLeast version "3.13") ''
550 KVM_VFIO y
551 ''}
552 ${optionalString (stdenv.isx86_64 || stdenv.isi686) ''
553 XEN? y
554 XEN_DOM0? y
555 ${optionalString ((versionAtLeast version "3.18") && (features.xen_dom0 or false)) ''
556 PCI_XEN? y
557 HVC_XEN? y
558 HVC_XEN_FRONTEND? y
559 XEN_SYS_HYPERVISOR? y
560 SWIOTLB_XEN? y
561 XEN_BACKEND? y
562 XEN_BALLOON? y
563 XEN_BALLOON_MEMORY_HOTPLUG? y
564 XEN_EFI? y
565 XEN_HAVE_PVMMU? y
566 XEN_MCE_LOG? y
567 XEN_PVH? y
568 XEN_PVHVM? y
569 XEN_SAVE_RESTORE? y
570 XEN_SCRUB_PAGES? y
571 XEN_SELFBALLOONING? y
572 XEN_STUB? y
573 XEN_TMEM? y
574 ''}
575 ''}
576 KSM y
577 ${optionalString (!stdenv.is64bit) ''
578 HIGHMEM64G? y # We need 64 GB (PAE) support for Xen guest support.
579 ''}
580 ${optionalString (stdenv.is64bit) ''
581 VFIO_PCI_VGA y
582 ''}
583 VIRT_DRIVERS y
584
585 # Media support.
586 MEDIA_DIGITAL_TV_SUPPORT y
587 MEDIA_CAMERA_SUPPORT y
588 ${optionalString (versionOlder version "4.14") ''
589 MEDIA_RC_SUPPORT y
590 ''}
591 MEDIA_CONTROLLER y
592 MEDIA_USB_SUPPORT y
593 MEDIA_PCI_SUPPORT y
594 MEDIA_ANALOG_TV_SUPPORT y
595 VIDEO_STK1160_COMMON m
596 ${optionalString (versionOlder version "4.11") ''
597 VIDEO_STK1160_AC97 y
598 ''}
599
600 # Our initrd init uses shebang scripts, so can't be modular.
601 BINFMT_SCRIPT y
602
603 # For systemd-binfmt
604 BINFMT_MISC? y
605
606 # Enable the 9P cache to speed up NixOS VM tests.
607 9P_FSCACHE? y
608 9P_FS_POSIX_ACL? y
609
610 # Enable transparent support for huge pages.
611 TRANSPARENT_HUGEPAGE? y
612 TRANSPARENT_HUGEPAGE_ALWAYS? n
613 TRANSPARENT_HUGEPAGE_MADVISE? y
614
615 # zram support (e.g for in-memory compressed swap).
616 ZRAM m
617 ZSWAP? y
618 ZBUD? y
619 ${optionalString (versionOlder version "3.18") ''
620 ZSMALLOC y
621 ''}
622 ${optionalString (versionAtLeast version "3.18") ''
623 ZSMALLOC m
624 ''}
625
626 # Enable PCIe and USB for the brcmfmac driver
627 BRCMFMAC_USB? y
628 BRCMFMAC_PCIE? y
629
630 # Support x2APIC (which requires IRQ remapping).
631 ${optionalString (stdenv.system == "x86_64-linux") ''
632 X86_X2APIC y
633 IRQ_REMAP y
634 ''}
635
636 # Disable the firmware helper fallback, udev doesn't implement it any more
637 FW_LOADER_USER_HELPER_FALLBACK? n
638
639 # Disable various self-test modules that have no use in a production system
640 # This menu disables all/most of them on >= 4.16
641 RUNTIME_TESTING_MENU? n
642 # For older kernels, painstakingly disable each symbol.
643 ARM_KPROBES_TEST? n
644 ASYNC_RAID6_TEST? n
645 ATOMIC64_SELFTEST? n
646 BACKTRACE_SELF_TEST? n
647 CRC32_SELFTEST? n
648 CRYPTO_TEST? n
649 DRM_DEBUG_MM_SELFTEST? n
650 EFI_TEST? n
651 GLOB_SELFTEST? n
652 INTERVAL_TREE_TEST? n
653 LNET_SELFTEST? n
654 LOCK_TORTURE_TEST? n
655 MTD_TESTS? n
656 NOTIFIER_ERROR_INJECTION? n
657 PERCPU_TEST? n
658 RBTREE_TEST? n
659 RCU_PERF_TEST? n
660 RCU_TORTURE_TEST? n
661 TEST_ASYNC_DRIVER_PROBE? n
662 TEST_BITMAP? n
663 TEST_BPF? n
664 TEST_FIRMWARE? n
665 TEST_HASH? n
666 TEST_HEXDUMP? n
667 TEST_KMOD? n
668 TEST_KSTRTOX? n
669 TEST_LIST_SORT? n
670 TEST_LKM? n
671 TEST_PARMAN? n
672 TEST_PRINTF? n
673 TEST_RHASHTABLE? n
674 TEST_SORT? n
675 TEST_STATIC_KEYS? n
676 TEST_STRING_HELPERS? n
677 TEST_UDELAY? n
678 TEST_USER_COPY? n
679 TEST_UUID? n
680 WW_MUTEX_SELFTEST? n
681 XZ_DEC_TEST? n
682
683 ${optionalString (features.criu or false) ''
684 EXPERT y
685 CHECKPOINT_RESTORE y
686 ''}
687
688 ${optionalString ((features.criu or false) && (features.criu_revert_expert or true))
689 # Revert some changes, introduced by EXPERT, when necessary for criu
690 ''
691 RFKILL_INPUT? y
692 HID_PICOLCD_FB? y
693 HID_PICOLCD_BACKLIGHT? y
694 HID_PICOLCD_LCD? y
695 HID_PICOLCD_LEDS? y
696 HID_PICOLCD_CIR? y
697 DEBUG_MEMORY_INIT? y
698 ''}
699
700 ${optionalString (features.debug or false) ''
701 DEBUG_INFO y
702 ''}
703
704 ${extraConfig}
705''