···11+args @ { stdenv, fetchurl, extraConfig ? ""
22+, perl, mktemp, module_init_tools
33+, ... }:
44+55+let
66+ configWithPlatform = kernelPlatform :
77+ ''
88+ # Power management and debugging for powertop.
99+ DEBUG_KERNEL y
1010+ PM_ADVANCED_DEBUG y
1111+ PM_RUNTIME y
1212+ TIMER_STATS y
1313+ USB_SUSPEND y
1414+ BACKTRACE_SELF_TEST n
1515+ CPU_NOTIFIER_ERROR_INJECT? n
1616+ DEBUG_DEVRES n
1717+ DEBUG_NX_TEST n
1818+ DEBUG_STACK_USAGE n
1919+ DEBUG_STACKOVERFLOW n
2020+ RCU_TORTURE_TEST n
2121+ SCHEDSTATS n
2222+2323+ # Support drivers that need external firmware.
2424+ STANDALONE n
2525+2626+ # Make /proc/config.gz available.
2727+ IKCONFIG_PROC y
2828+2929+ # Optimize with -O2, not -Os.
3030+ CC_OPTIMIZE_FOR_SIZE n
3131+3232+ # Enable the kernel's built-in memory tester.
3333+ MEMTEST y
3434+3535+ # Include the CFQ I/O scheduler in the kernel, rather than as a
3636+ # module, so that the initrd gets a good I/O scheduler.
3737+ IOSCHED_CFQ y
3838+ BLK_CGROUP y # required by CFQ
3939+4040+ # Enable NUMA.
4141+ NUMA? y
4242+4343+ # Disable some expensive (?) features.
4444+ FTRACE n
4545+ KPROBES n
4646+ PM_TRACE_RTC n
4747+4848+ # Enable various subsystems.
4949+ ACCESSIBILITY y # Accessibility support
5050+ AUXDISPLAY y # Auxiliary Display support
5151+ DONGLE y # Serial dongle support
5252+ HIPPI? y
5353+ MTD_COMPLEX_MAPPINGS y # needed for many devices
5454+ SCSI_LOWLEVEL y # enable lots of SCSI devices
5555+ SCSI_LOWLEVEL_PCMCIA y
5656+ SPI y # needed for many devices
5757+ SPI_MASTER y
5858+ WAN y
5959+6060+ # Networking options.
6161+ IP_PNP n
6262+ IPV6_PRIVACY y
6363+ NETFILTER_ADVANCED y
6464+ IP_VS_PROTO_TCP y
6565+ IP_VS_PROTO_UDP y
6666+ IP_VS_PROTO_ESP y
6767+ IP_VS_PROTO_AH y
6868+ IP_DCCP_CCID3 n # experimental
6969+ CLS_U32_PERF y
7070+ CLS_U32_MARK y
7171+7272+ # Wireless networking.
7373+ IPW2100_MONITOR y # support promiscuous mode
7474+ IPW2200_MONITOR? y # support promiscuous mode
7575+ HOSTAP_FIRMWARE y # Support downloading firmware images with Host AP driver
7676+ HOSTAP_FIRMWARE_NVRAM y
7777+ ATH9K_PCI y # Detect Atheros AR9xxx cards on PCI(e) bus
7878+ ATH9K_AHB y # Ditto, AHB bus
7979+ B43_PHY_HT y
8080+ BCMA_HOST_PCI y
8181+8282+ # Some settings to make sure that fbcondecor works - in particular,
8383+ # disable tileblitting and the drivers that need it.
8484+8585+ # Enable various FB devices.
8686+ FB y
8787+ FB_EFI y
8888+ FB_NVIDIA_I2C y # Enable DDC Support
8989+ FB_RIVA_I2C y
9090+ FB_ATY_CT y # Mach64 CT/VT/GT/LT (incl. 3D RAGE) support
9191+ FB_ATY_GX y # Mach64 GX support
9292+ FB_SAVAGE_I2C y
9393+ FB_SAVAGE_ACCEL y
9494+ FB_SIS_300 y
9595+ FB_SIS_315 y
9696+ FB_3DFX_ACCEL y
9797+ FB_GEODE y
9898+9999+ # Video configuration
100100+ # Enable KMS for devices whose X.org driver supports it.
101101+ DRM_I915_KMS y
102102+ DRM_RADEON_KMS y
103103+ # Hybrid graphics support
104104+ VGA_SWITCHEROO y
105105+106106+ # Sound.
107107+ SND_AC97_POWER_SAVE y # AC97 Power-Saving Mode
108108+ SND_HDA_INPUT_BEEP y # Support digital beep via input layer
109109+ SND_USB_CAIAQ_INPUT y
110110+ PSS_MIXER y # Enable PSS mixer (Beethoven ADSP-16 and other compatible)
111111+112112+ # USB serial devices.
113113+ USB_SERIAL_GENERIC y # USB Generic Serial Driver
114114+ USB_SERIAL_KEYSPAN_MPR y # include firmware for various USB serial devices
115115+ USB_SERIAL_KEYSPAN_USA28 y
116116+ USB_SERIAL_KEYSPAN_USA28X y
117117+ USB_SERIAL_KEYSPAN_USA28XA y
118118+ USB_SERIAL_KEYSPAN_USA28XB y
119119+ USB_SERIAL_KEYSPAN_USA19 y
120120+ USB_SERIAL_KEYSPAN_USA18X y
121121+ USB_SERIAL_KEYSPAN_USA19W y
122122+ USB_SERIAL_KEYSPAN_USA19QW y
123123+ USB_SERIAL_KEYSPAN_USA19QI y
124124+ USB_SERIAL_KEYSPAN_USA49W y
125125+ USB_SERIAL_KEYSPAN_USA49WLC y
126126+127127+ # Filesystem options - in particular, enable extended attributes and
128128+ # ACLs for all filesystems that support them.
129129+ EXT2_FS_XATTR y # Ext2 extended attributes
130130+ EXT2_FS_POSIX_ACL y # Ext2 POSIX Access Control Lists
131131+ EXT2_FS_SECURITY y # Ext2 Security Labels
132132+ EXT2_FS_XIP y # Ext2 execute in place support
133133+ EXT4_FS_POSIX_ACL y
134134+ EXT4_FS_SECURITY y
135135+ REISERFS_FS_XATTR y
136136+ REISERFS_FS_POSIX_ACL y
137137+ REISERFS_FS_SECURITY y
138138+ JFS_POSIX_ACL y
139139+ JFS_SECURITY y
140140+ XFS_QUOTA y
141141+ XFS_POSIX_ACL y
142142+ XFS_RT y # XFS Realtime subvolume support
143143+ OCFS2_DEBUG_MASKLOG n
144144+ BTRFS_FS_POSIX_ACL y
145145+ UBIFS_FS_XATTR? y
146146+ UBIFS_FS_ADVANCED_COMPR y
147147+ NFSD_V2_ACL y
148148+ NFSD_V3 y
149149+ NFSD_V3_ACL y
150150+ NFSD_V4 y
151151+ CIFS_XATTR y
152152+ CIFS_POSIX y
153153+154154+ # Security related features.
155155+ STRICT_DEVMEM y # Filter access to /dev/mem
156156+ SECURITY_SELINUX_BOOTPARAM_VALUE 0 # disable SELinux by default
157157+158158+ # Misc. options.
159159+ 8139TOO_8129 y
160160+ 8139TOO_PIO n # PIO is slower
161161+ AIC79XX_DEBUG_ENABLE n
162162+ AIC7XXX_DEBUG_ENABLE n
163163+ AIC94XX_DEBUG n
164164+ B43_PCMCIA y
165165+ BLK_DEV_CMD640_ENHANCED y # CMD640 enhanced support
166166+ BLK_DEV_IDEACPI y # IDE ACPI support
167167+ BLK_DEV_INTEGRITY y
168168+ BSD_PROCESS_ACCT_V3 y
169169+ BT_HCIUART_BCSP y
170170+ BT_HCIUART_H4 y # UART (H4) protocol support
171171+ BT_HCIUART_LL y
172172+ BT_RFCOMM m
173173+ BT_RFCOMM_TTY y # RFCOMM TTY support
174174+ CRASH_DUMP n
175175+ DMAR? n # experimental
176176+ DVB_DYNAMIC_MINORS? y # we use udev
177177+ EFI_STUB y # EFI bootloader in the bzImage itself
178178+ FUSION y # Fusion MPT device support
179179+ IDE_GD_ATAPI y # ATAPI floppy support
180180+ IRDA_ULTRA y # Ultra (connectionless) protocol
181181+ JOYSTICK_IFORCE_232 y # I-Force Serial joysticks and wheels
182182+ JOYSTICK_IFORCE_USB y # I-Force USB joysticks and wheels
183183+ JOYSTICK_XPAD_FF y # X-Box gamepad rumble support
184184+ JOYSTICK_XPAD_LEDS y # LED Support for Xbox360 controller 'BigX' LED
185185+ LDM_PARTITION y # Windows Logical Disk Manager (Dynamic Disk) support
186186+ LEDS_TRIGGER_IDE_DISK y # LED IDE Disk Trigger
187187+ LOGIRUMBLEPAD2_FF y # Logitech Rumblepad 2 force feedback
188188+ LOGO n # not needed
189189+ MEDIA_ATTACH? y
190190+ MEGARAID_NEWGEN y
191191+ MICROCODE_AMD y
192192+ MODVERSIONS y
193193+ MOUSE_PS2_ELANTECH y # Elantech PS/2 protocol extension
194194+ MTRR_SANITIZER y
195195+ NET_FC y # Fibre Channel driver support
196196+ PPP_MULTILINK y # PPP multilink support
197197+ REGULATOR y # Voltage and Current Regulator Support
198198+ SCSI_LOGGING y # SCSI logging facility
199199+ SERIAL_8250 y # 8250/16550 and compatible serial support
200200+ SLIP_COMPRESSED y # CSLIP compressed headers
201201+ SLIP_SMART y
202202+ THERMAL_HWMON y # Hardware monitoring support
203203+ USB_DEBUG n
204204+ USB_EHCI_ROOT_HUB_TT y # Root Hub Transaction Translators
205205+ USB_EHCI_TT_NEWSCHED y # Improved transaction translator scheduling
206206+ X86_CHECK_BIOS_CORRUPTION y
207207+ X86_MCE y
208208+ XEN_DOM0 y
209209+210210+ # Linux Containers
211211+ RT_GROUP_SCHED? y
212212+ CGROUP_DEVICE? y
213213+ CGROUP_MEM_RES_CTLR? y
214214+ CGROUP_MEM_RES_CTLR_SWAP? y
215215+ DEVPTS_MULTIPLE_INSTANCES? y
216216+217217+ # Enable staging drivers. These are somewhat experimental, but
218218+ # they generally don't hurt.
219219+ STAGING y
220220+221221+ # PROC_EVENTS requires that the netlink connector is not built
222222+ # as a module. This is required by libcgroup's cgrulesengd.
223223+ CONNECTOR y
224224+ PROC_EVENTS y
225225+226226+ # Tracing
227227+ FTRACE y
228228+ FUNCTION_TRACER y
229229+ FTRACE_SYSCALLS y
230230+ SCHED_TRACER y
231231+232232+ # Devtmpfs support.
233233+ DEVTMPFS y
234234+235235+ # Media support
236236+ MEDIA_CAMERA_SUPPORT? y
237237+ MEDIA_RC_SUPPORT? y
238238+239239+ ${if kernelPlatform ? kernelExtraConfig then kernelPlatform.kernelExtraConfig else ""}
240240+ ${extraConfig}
241241+ '';
242242+in
243243+244244+import ./generic.nix (
245245+246246+ rec {
247247+ version = "3.7";
248248+ testing = false;
249249+250250+ modDirVersion = "3.7.0";
251251+252252+ preConfigure = ''
253253+ substituteInPlace scripts/depmod.sh --replace '-b "$INSTALL_MOD_PATH"' ""
254254+ '';
255255+256256+ src = fetchurl {
257257+ url = "mirror://kernel/linux/kernel/v3.x/${if testing then "testing/" else ""}linux-${version}.tar.xz";
258258+ sha256 = "0n4lddghf0mvp3jrq4lckii88yvm6mwmfp0ibwsw7vkfyw5lv9k0";
259259+ };
260260+261261+ config = configWithPlatform stdenv.platform;
262262+ configCross = configWithPlatform stdenv.cross.platform;
263263+264264+ features.iwlwifi = true;
265265+ features.efiBootStub = true;
266266+ features.needsCifsUtils = true;
267267+ features.canDisableNetfilterConntrackHelpers = true;
268268+ features.netfilterRPFilter = true;
269269+ }
270270+271271+ // removeAttrs args ["extraConfig"]
272272+)
+14
pkgs/top-level/all-packages.nix
···59005900 ];
59015901 };
5902590259035903+ linux_3_7 = makeOverridable (import ../os-specific/linux/kernel/linux-3.7.nix) {
59045904+ inherit fetchurl stdenv perl mktemp module_init_tools ubootChooser;
59055905+ kernelPatches =
59065906+ [
59075907+ kernelPatches.sec_perm_2_6_24
59085908+ #kernelPatches.aufs3_6
59095909+ ] ++ lib.optionals (platform.kernelArch == "mips")
59105910+ [ kernelPatches.mips_fpureg_emu
59115911+ kernelPatches.mips_fpu_sigill
59125912+ kernelPatches.mips_ext3_n32
59135913+ ];
59145914+ };
59155915+59035916 /* Linux kernel modules are inherently tied to a specific kernel. So
59045917 rather than provide specific instances of those packages for a
59055918 specific kernel, we have a function that builds those packages
···60276040 linuxPackages_3_4 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_4 pkgs.linuxPackages_3_4);
60286041 linuxPackages_3_5 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_5 pkgs.linuxPackages_3_5);
60296042 linuxPackages_3_6 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_6 pkgs.linuxPackages_3_6);
60436043+ linuxPackages_3_7 = recurseIntoAttrs (linuxPackagesFor pkgs.linux_3_7 pkgs.linuxPackages_3_6);
6030604460316045 # The current default kernel / kernel modules.
60326046 linux = linuxPackages.kernel;
+1-1
pkgs/top-level/platforms.nix
···1414 ''
1515 # Virtualisation (KVM, Xen...).
1616 PARAVIRT_GUEST y
1717- KVM_CLOCK y
1717+ KVM_CLOCK? y #Part of KVM_GUEST since linux 3.7
1818 KVM_GUEST y
1919 XEN y
2020 KSM y