Commit Graph

416 Commits

Author SHA1 Message Date
Matthieu Coudron
3bb7b3f02e linux: ability to merge structured configs
This should make the composability of kernel configurations more straigthforward.

- now distinguish freeform options from tristate ones
- will look for a structured config in kernelPatches too
one can now access the structuredConfig from a kernel via linux_test.configfile.structuredConfig
in order to reinject it into another kernel, no need to rewrite the config from scratch

The following merge strategies are used in case of conflict:
-- freeform items must be equal or they conflict (mergeEqualOption)
-- for tristate (y/m/n) entries, I use the mergeAnswer strategy which takes the best available value, "best" being defined by the user (by default "y" > "m" > "n", e.g. if one entry is both marked "y" and "n", "y" wins)
-- if one item is both marked optional/mandatory, mandatory wins (mergeFalseByDefault)
2019-01-28 09:06:33 +09:00
Vladimír Čunát
3fa77297b5
linux: avoid memory hotplug support on most platforms
It broke i686 build, and it's probably not worth it on others, too.
/cc #54095 e63414078a.
2019-01-19 19:22:02 +01:00
Vladimír Čunát
23eb5e846d
Merge #54095: linux: enable memory hotplug support 2019-01-19 16:26:01 +01:00
Aaron Andersen
e63414078a Enable memory hotplug support 2019-01-18 13:17:33 +00:00
Danylo Hlynskyi
23a13b562c
kernel config: add support for CONFIG_SQUASHFS_ZSTD (#52967)
Also, allow override `make-squashfs.nix` compression parameters.
2019-01-17 15:24:44 +02:00
Tim Steinbach
97aba92bcd
linux: 4.20-rc7 -> 5.0-rc1 2019-01-07 07:57:38 -05:00
Tim Steinbach
98ac5710bd
kernel-config: CIFS_POSIX no longer exists 2018-12-21 09:10:17 -05:00
Jörg Thalheim
e7a9fc2fca
Merge pull request #49470 from grahamc/enable-mlx5core-by-default
kernel: enable MLX5_CORE_EN when possible
2018-11-30 17:55:45 +00:00
Orivej Desh
08d98b2e38 linux: enable CGROUP_HUGETLB, CGROUP_PERF, CGROUP_RDMA (#50225)
These options were added in:

NAMESPACES 2.6.25
CGROUP_DEVICE 2.6.26
CGROUP_HUGETLB 3.6
CGROUP_PERF 2.6.39
CGROUP_RDMA 4.11
2018-11-13 01:13:00 +00:00
Graham Christensen
d65b39a805 kernel: enable MLX5_CORE_EN when possible
Hydra's builders from Packet.net use this option a lot, causing
lots of slow deploys.
2018-10-30 17:29:37 +01:00
John Ericson
2c2f1e37d4 reewide: Purge all uses stdenv.system and top-level system
It is deprecated and will be removed after 18.09.
2018-08-30 17:20:32 -04:00
Vladimír Čunát
e6a37e3ce4
linux: build with SCHEDUTIL governor
- it can't be built as a module
- it's not set as the default yet
- for discussion see https://github.com/NixOS/nixpkgs/pull/42330
2018-08-30 11:26:43 +02:00
Tim Steinbach
f412e19996
linux: 4.18-rc8 -> 4.19-rc1 2018-08-26 21:50:51 -04:00
Izorkin
32c3cbdadd nftables: enable works in linux kernel 4.17 and 4.18 2018-08-25 23:00:54 +03:00
Tim Steinbach
9371f6ad37
linux: 4.18-rc3 -> 4.18-rc4 2018-07-09 20:11:10 -04:00
Tuomas Tynkkynen
ab340f7829 kernel config: Minor text fixes 2018-06-30 16:01:41 +03:00
Tuomas Tynkkynen
fc816e5609 kernel config: Fix recent i686 builds 2018-06-30 16:01:41 +03:00
Matthieu Coudron
e4fe7b31be linux: fix features system 2018-06-30 16:01:41 +03:00
Matthieu Coudron
dcea150a89 kernel: remove conditions based on 3.X kernels
The oldest kernel in nixpkgs being 4.4, we get rid of checks for older
kernels.
2018-06-30 16:01:41 +03:00
Dan Peebles
ff9999ad1b linux: translate config to structured config
Instead of using a string to describe kernel config, use a nix
attribute set, then converted to a string.
- allows to override the config, aka convert 'yes' into 'modules' or
vice-versa
- while for now merging different configs is still crude (last spec wins),
at least there should be only one CONFIG_XYZ value compared to the current string
config where the first defined would be used and others ignored.

[initial idea by copumpkin in 2016, a major rebase to 2018 by teto]
2018-06-30 16:01:41 +03:00
Tim Steinbach
f85a82a647
linux-testing: 4.17-rc7 -> 4.18-rc1 2018-06-16 20:37:15 -04:00
Robert Hensing
fc9ffe790f linux: Enable RT53XX wifi support 2018-06-10 17:55:55 +03:00
gnidorah
c9e7b380e5 linux: enable support for iGVT-g VGPU 2018-05-29 19:25:52 +03:00
Jan Malakhovski
5a6d202a43 Merge pull request #40419 from oxij/pkgs/fix-linux-debug
linuxPackages.kernel: config: fix DEBUG_INFO setting
2018-05-16 00:56:12 -05:00
Yorick
c7e8ddc066
linux: config: remove prefix on KEY_DH_OPERATIONS 2018-05-15 14:33:29 +02:00
Yorick
f8dc3abbb0
linux: add CONFIG_KEY_DH_OPERATIONS 2018-05-14 02:03:42 +02:00
John Ericson
ba52ae5048 treewide: isArm -> isAarch32
Following legacy packing conventions, `isArm` was defined just for
32-bit ARM instruction set. This is confusing to non packagers though,
because Aarch64 is an ARM instruction set.

The official ARM overview for ARMv8[1] is surprisingly not confusing,
given the overall state of affairs for ARM naming conventions, and
offers us a solution. It divides the nomenclature into three levels:

```
ISA:             ARMv8   {-A, -R, -M}
                 /    \
Mode:     Aarch32     Aarch64
             |         /   \
Encoding:   A64      A32   T32
```

At the top is the overall v8 instruction set archicture. Second are the
two modes, defined by bitwidth but differing in other semantics too, and
buttom are the encodings, (hopefully?) isomorphic if they encode the
same mode.

The 32 bit encodings are mostly backwards compatible with previous
non-Thumb and Thumb encodings, and if so we can pun the mode names to
instead mean "sets of compatable or isomorphic encodings", and then
voilà we have nice names for 32-bit and 64-bit arm instruction sets
which do not use the word ARM so as to not confused either laymen or
experienced ARM packages.

[1]: https://developer.arm.com/products/architecture/a-profile
2018-04-25 15:28:55 -04:00
Tim Steinbach
f8665f18fb
linux: 4.16-rc7 -> 4.17-rc1 2018-04-17 20:28:11 -04:00
Frederik Rietdijk
0aa59a08d6 Merge master into staging 2018-04-09 15:12:32 +02:00
Tim Steinbach
c1e1690f62
linux: Hide test warnings from 4.16+ kernels 2018-04-08 19:09:11 -04:00
Nikolay Amiantov
e31c3f8b9f kernel: enable CGROUP_NET_PRIO
It's required by systemd 238 because of a bug, otherwise systemd aborts.
2018-03-22 22:15:37 +03:00
Tuomas Tynkkynen
822526f09e kernel config: Enable CGROUP_BPF
Avoids the following warning:

File /.../systemd-journald.service:35 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
2018-02-28 01:12:54 +02:00
Tim Steinbach
bbbd9de9d7
linux-common: Add CFS_BANDWIDTH
The option is needed to limit CPU usage of processes.
It seems to have no negative impact if left unused.

See https://lwn.net/Articles/428230/
2018-02-16 10:00:08 -05:00
Tuomas Tynkkynen
7a7e8a8004 kernel config: Disable USB_SERIAL_* on 4.16 and above
They got removed:

commit 003948c54e5b5034a9bbb4923336f5aba125eae6
Author: Benjamin Gilbert <benjamin.gilbert@coreos.com>
Date:   Tue Jan 23 18:06:30 2018 -0800

    USB: serial: keyspan: Drop firmware Kconfig options

    The USB_SERIAL_KEYSPAN_* firmware options no longer do anything.
2018-02-16 01:13:30 +02:00
Tuomas Tynkkynen
db38e0c7e7 kernel config: Cleanup self-test module disabling
No reason to have complex version-dependent conditionals when the
question mark already handles this just as well.

Also add RUNTIME_TESTING_MENU setting which nicely disables all of this
on >= 4.16.
2018-02-16 01:13:30 +02:00
Herwig Hochleitner
3027b80f1d linuxPackages.kernel: add feature.debug flag for enabling DEBUG_INFO 2018-02-15 09:10:32 +01:00
Herwig Hochleitner
66080ae4d8 programs.criu: add nixos option for installing criu + kernel flags 2018-02-15 09:10:32 +01:00
Matthieu Coudron
f620b1b693 kernel: buildLinux replaces import ./generic.nix
- defined buildLinux as generic.nix instead of manual-config.nix. This
makes kernel derivations a tad more similar to your typical derivations.
- moved $buildRoot to within the source folder, this way it doesn't have to be created before the unpackPhase
and make it easier to work on kernel source without running the unpackPhase
2018-02-07 10:07:13 +09:00
Ben Gamari
7a9b6ac39a kernel: Enable cross compiling 2018-01-15 11:55:06 -05:00
Tim Steinbach
eb0ecd7eba
linux-copperhead: 4.14.12.a -> 4.14.13.a 2018-01-11 08:30:19 -05:00
Peter Hoeg
f674cb5ecc kernel: enable writeback throttling to avoid IO queues filling up 2018-01-06 11:20:48 +08:00
Raymond Gauthier
7cdd12e4e9 kernel config: Enable MEDIA_CONTROLLER
With this disabled, cameras would not get a `/dev/mediaX` entry matching
the `/dev/videoX` which broke any application (e.g: `uvcdynctrl -l`,
`media-ctl -p`) depending on this interface.
2017-11-21 16:33:31 +02:00
makefu
292f60504c linux.kernel: enable build of stk1160 modules 2017-11-08 12:41:54 +02:00
Tuomas Tynkkynen
a06d64ea69 kernel config: Explicitly enable device mapper
A no-op change on x86 but enables it on ARM.
2017-10-07 11:05:05 +03:00
Tim Steinbach
c8f43edaf5
linux: 4.13-rc7 -> 4.14-rc1 2017-09-17 09:11:04 -04:00
Tuomas Tynkkynen
9a6aa33422 kernel: Disable DEBUG_INFO
Since we don't have a split debug info output yet, don't waste time
writing several gigabytes of debug info that's all going to be stripped
out at the end.

This change only affects Aarch64 (where some joker has enabled it in the
architecture defconfig) and is a no-op on the others.
2017-09-16 15:09:10 +03:00
Jörg Thalheim
44f93731d6 linux_chromiumos_3_18: remove kernel due lack of maintainer/breakage
There is no maintainer for this package, probably not many users.
It requires effort to fix all third-party modules for this old kernel
versions. It might contain unpatched security holes.

For Pixel chromebooks, we have the samus-kernel.
Apart from that https://github.com/GalliumOS/linux might be a good choice.
2017-09-05 14:42:23 +02:00
Tim Steinbach
cd85a704a5
linux: 4.13-rc4 -> 4.13-rc6 2017-08-22 03:23:30 -04:00
Tim Steinbach
f46f98ad31
Revert 0cf0d7186a
Order common kernel config by functionality
See #27949
2017-08-07 17:34:10 -04:00
gnidorah
dc21f1ad65 linux: BFQ Group Scheduling support 2017-08-07 10:12:21 +03:00
Tim Steinbach
0cf0d7186a
linux-common-config: Refactor, clean up 2017-08-06 19:17:30 -04:00
Heitham Omar
5ac00265a8 linux-common-config: add CONFIG_HOTPLUG_PCI_ACPI 2017-08-06 20:41:28 +02:00
Robin Gloster
2b4811887a
kernel: add IP_NF_TARGET_REDIRECT 2017-08-04 08:26:09 +02:00
Tim Steinbach
b103e9317a
linux-testing: 4.12-rc7 -> 4.13-rc1 2017-07-15 19:30:44 -04:00
Tuomas Tynkkynen
42395a191b kernel-config: Disable Xen on non-x86
There's an upstream build failure on ARM (not directly related to Xen
but rather some other config options it enables). The xen package is
x86_64-only anyways.
2017-07-13 20:12:50 +03:00
Tim Steinbach
da8bd6df67 Merge pull request #27161 from NeQuissimus/kernel_config_cleanup
linux: Clean up kernel config warnings
2017-07-07 09:00:52 -04:00
gnidorah
ff348f4b6d linux: Enable more I/O schedulers 2017-07-07 11:43:48 +03:00
Tim Steinbach
3ec2a2f476
linux: Clean up kernel config warnings 2017-07-05 20:09:14 -04:00
Tim Steinbach
f130e0027e
linux: Add 4.12 2017-07-03 11:57:40 -04:00
Tim Steinbach
b06cb59fc1
linux: 4.9.33 -> 4.9.34 2017-06-24 11:22:56 -04:00
Tim Steinbach
3a68f0bb78
linux: 4.11.6 -> 4.11.7 2017-06-24 11:20:32 -04:00
Jörg Thalheim
e89e96a755 linux_4_11: renable CONFIG_UPROBE_EVENTS
CONFIG_UPROBE_EVENT was renamed to CONFIG_UPROBE_EVENTS.
2017-06-21 17:16:46 +01:00
timor
d74f8351a5 kernel: enable audio jack reconfiguration
Change kernel config to allow for changing the functions of the audio
jacks at run-time as well as at boot time.
2017-06-13 08:50:34 +03:00
Tuomas Tynkkynen
370ace4cf0 kernel: Don't build self-test modules 2017-06-11 19:33:24 +03:00
Tim Steinbach
690a83091b
linux: FS_ENCRYPTION only for >= 4.9 kernels 2017-05-25 18:25:08 -04:00
Tim Steinbach
336b044dcb
linux-testing: 4.11-rc7 -> 4.12-rc1 2017-05-14 22:03:14 -04:00
Tuomas Tynkkynen
3ed0d7e2df kernel-config: Explicitly enable CONFIG_NETFILTER
This is needed by the NixOS firewall, but isn't enabled by the ARM
defconfig nor kernelAutoModules (as 'm' doesn't seem to be an option)
2017-04-14 20:43:50 +03:00
Nikolay Amiantov
7099e8da83 linux: build with initrd support by default
We don't require initrd in some cases but still most boot sequences including ARM use it.
2017-04-09 22:46:07 +03:00
Tim Steinbach
c60102d177
linux: 4.11-rc2 -> 4.11-rc3 2017-03-21 20:32:36 -04:00
Franz Pletz
a691c06556
linux_testing: 4.11-rc1 -> 4.11-rc2 2017-03-14 23:08:43 +01:00
Franz Pletz
c1ccedeaff
linux: make some new config settings optional
These are not support on older kernels pre 4.0.
2017-03-11 08:14:29 +01:00
Tuomas Tynkkynen
77c49794cd linux_testing: 4.10-rc7 -> 4.11-rc1
Some config options got removed, so conditionalize them.
2017-03-11 01:27:06 +02:00
Tuomas Tynkkynen
57c6fac3e9 kernel config: Enable IP_MULTICAST
This is lacking on ARM and causes libuv tests to fail.
2017-03-04 12:49:50 +02:00
Franz Pletz
49bdf9803a
linux: IPV6_FOU_TUNNEL is available since 4.7 2017-03-02 17:19:55 +01:00
Franz Pletz
75e85cae42
linux: enable FOU tunnels and VRF interfaces 2017-03-02 17:19:55 +01:00
Shea Levy
b191ac0d89 Revert "linux 4.10"
Somehow the tarball was actually linux 4.4.10

This reverts commit fea71f84d0.
2017-02-20 07:29:47 -05:00
Shea Levy
fea71f84d0 linux 4.10 2017-02-20 06:47:49 -05:00
Tuomas Tynkkynen
2bfd83ab6d platforms.nix: Add some aarch64-specific kernel config
This makes Raspberry Pi 3 and some Cavium ThunderX server hardware work.
2017-01-25 02:14:46 +02:00
Tuomas Tynkkynen
9fc3ce73d1 kernel config: Enable BONDING and TMPFS_POSIX_ACL
Yet again something that's lacking on other platforms than x86.
2017-01-18 01:21:08 +02:00
Thomas Tuegel
04d11637cb
linux_4_9: enable support for amdgpu on older chipsets
Linux 4.9 includes experimental amdgpu support for AMD Southern Islands
chipsets. (By default, only Sea Islands and newer chipsets are supported.)
Southern Islands chips will still use radeon by default, but daring users may
set `services.xserver.videoDrivers = [ "amdgpu" ];` to try the experimental
driver.
2017-01-15 16:29:50 -06:00
Bjørn Forsman
2077385421 kernel: enable CONFIG_DYNAMIC_DEBUG (like Fedora and Ubuntu)
It was useful in tracking down CIFS + DFS issue, and it's apparently
enabled by default in two major distros.
2016-12-10 00:01:21 +02:00
Bjørn Forsman
d429520b13 kernel: add CONFIG_CIFS_* like Fedora, Ubuntu
The plan is to fix mounting DFS shares on NixOS (for which some of these
options are needed), but I figured it might be a good idea to enable all
CONFIG_CIFS_* like Fedora 24 and Ubuntu 16.04 while at it. Ubuntu even
has CONFIG_CIFS_SMB311, but as Fedora do not, I left it out.

Mounting DFS shares still doesn't work; need to configure cifs.upcall
and /etc/request-key.conf. Until then, using GVFS as a workaround.
2016-12-10 00:01:21 +02:00
Tim Steinbach
eecf76eaa2
linux: 4.9-rc6 -> 4.9-rc7 2016-11-27 19:48:24 -05:00
Franz Pletz
7974d7493a
linux: compress kernel image with xz 2016-11-23 02:24:13 +01:00
Tuomas Tynkkynen
74ecbbe4e3 kernel config: Ensure SECCOMP_FILTER is enabled
As noted in a97db109a2, SECCOMP_FILTER must be enabled or systemd gets
very unhappy.
2016-11-11 02:10:20 +02:00
Peter Hoeg
cb93b34999 SMB2 support for CIFS
[tuomas: removed unneeded kernel version check]
Signed-off-by: Tuomas Tynkkynen <tuomas@tuxera.com>
2016-11-11 02:10:20 +02:00
Tim Steinbach
70c8de0536 Merge pull request #19652 from NeQuissimus/linux_4_9_rc1
linux_testing: 4.8-rc6 -> 4.9-rc1
2016-10-19 14:35:21 -04:00
Tuomas Tynkkynen
59f12d9394 kernel config: Add some filesystem options
Enable encryption support for both F2FS and ext4. For ext4 this is a bit
tricky, since pre-4.8 the way to enable it as a module was just
"EXT4_ENCRYPTION=m" but after that it changed to "FS_ENCRYPTION=m &&
EXT4_ENCRYPTION=y".

Also make sure UDF is enabled.
2016-10-19 16:44:08 +03:00
Tim Steinbach
51c9c2f851
linux_testing: 4.8-rc6 -> 4.9-rc1 2016-10-18 11:19:46 -04:00
Aneesh Agrawal
f0602d2d36 kernel: Make SECURITY_YAMA optional
It's highly recommended, but not required to run NixOS.
2016-10-08 17:46:33 +02:00
Aneesh Agrawal
a000ed181c linux config: enable the Yama LSM (#14392)
The Yama Linux Security Module restricts the use of ptrace so that
processes cannot ptrace processes that are not their children. This
prevents attackers from compromising one user-level processes and
snooping on the memory and runtime state of other processes owned
by the same user.
2016-10-08 16:40:12 +02:00
Alexander Ried
96fbdf8594 kernel: Disable RT_GROUP_SCHED
Follow systemd recommendation
fd74fa791f/README (L96-L103)
2016-10-05 12:52:45 +02:00
Tim Steinbach
77e1be36b9
kernel-common: Add ZBUD, move ZSMALLOC into module space 2016-09-16 15:31:51 +00:00
Tuomas Tynkkynen
0c0188c5d2 kernel config: Explicitly enable some NLS-related things
Doesn't affect x86, but ARM can't mount VFAT filesystems without this on
a 3.18 kernel.
2016-09-13 17:06:13 +03:00
aszlig
42e1ec215e
linux/kernel: Remove MLX4_EN_VXLAN for 4.8
This option is no longer needed and has been removed in upstream commit
torvalds/linux@a831274a13.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-08-29 20:52:19 +02:00
aszlig
0bce188ec1
linux/kernel: Remove KVM_APIC_ARCHITECTURE for 4.8
The option is no longer needed and has been removed upstream in
torvalds/linux@557abc40d1.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-08-29 20:52:19 +02:00
Joachim Fasting
fcf5a24d8c
kernel config: set DEBUG_STACKOVERFLOW regardless of features.grsecurity
features.grsecurity has actually been unset for a long time, with no
ill effect on grsec kernel builds so this conditional looks useless.
2016-08-29 04:08:39 +02:00
Tuomas Tynkkynen
c004c6e14d kernel config: Explicitly enable some stuff not enabled by 'make alldefconfig'
List of what to enable taken from https://lwn.net/Articles/672587/.
This doesn't change the resulting x86 configs, but is more useful for
other architectures. For instance, POSIX_MQUEUE is currently missing
on ARM.
2016-08-29 03:07:11 +03:00
Gabriel Ebner
7b01df18a2 kernel: config: enable DRM_AMD_POWERPLAY 2016-08-26 08:45:49 +02:00
Tuomas Tynkkynen
bd68309643 kernel config: Enable SECCOMP
This is used by systemd >= 231 and is not enabled in the ARM
multiplatform defconfig.
2016-08-18 16:33:46 +03:00
Tuomas Tynkkynen
088bcf4ec4 kernel config: Fix 3.10, 3.12, 3.14 builds 2016-08-06 17:06:45 +03:00
Michal Rus
7281740c2e
linux: enable DRM_GMA600 and DRM_GMA3600
Adds basic support for Intel GMA3600/3650 (Intel Cedar Trail) platforms
and support for GMA600 (Intel Moorestown/Oaktrail) platforms with LVDS
ports via the gma500_gfx module.

Resolves #14727 Closes #17519
2016-08-05 19:07:40 +02:00
Franz Pletz
2d6b7aa545 linux: enable some useful networking options
All options are enabled by default on Debian and some other
distributions, so these should be safe.
2016-08-05 04:07:31 +02:00
obadz
927a984de6 kernel: make KEXEC_FILE & KEXEC_JUMP optional to fix i686 build
cc @edolstra @dezgeg @domenkozar
2016-07-13 12:49:18 +02:00
Eelco Dolstra
ecc26d7a40 linux: Disable the old IDE subsystem
This has long been deprecated in favour of the new ATA support
(CONFIG_ATA).
2016-07-11 15:05:21 +02:00
Eelco Dolstra
7b9c493d60 linux: Enable some kernel features
This enables a few features that should be useful and safe (they're
all used by the default Ubuntu kernel config), in particular zswap,
wakelocks, kernel load address randomization, userfaultfd (useful for
QEMU), paravirtualized spinlocks and automatic process group
scheduling.

Also removes some configuration conditional on kernel versions that we
no longer support.
2016-07-11 15:04:56 +02:00
Eelco Dolstra
1cd7dbc00b linux: Bump NR_CPUS
The default limit (64) is too low for systems like EC2 x1.* instances
or Xeon Phis, so let's increase it.
2016-07-11 14:32:18 +02:00
aszlig
566c990f33
linux-testing: 4.6-rc6 -> 4.7-rc6
The config option DEVPTS_MULTIPLE_INSTANCES now no longer exists since
torvalds/linux@eedf265aa0.

Built successfully on my Hydra instance:

https://headcounter.org/hydra/log/r4n6sv0zld0aj65r7l494757s2r8w8sr-linux-4.7-rc6.drv

Verified unpacked tarball with GnuPG:

ABAF 11C6 5A29 70B1 30AB  E3C4 79BE 3E43 0041 1886

gpg: Signature made Mon 04 Jul 2016 08:13:05 AM CEST
gpg:                using RSA key 79BE3E4300411886
gpg: Good signature from "Linus Torvalds <torvalds@linux-foundation.org>"

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2016-07-04 10:46:48 +02:00
Joachim Fasting
4ae5eb97f1
kernel: set virtualization options regardless of grsec
Per my own testing, the NixOS grsecurity kernel works both as a
KVM-based virtualisation host and guest; there appears to be no good
reason to making these conditional on `features.grsecurity`.

More generally, it's unclear what `features.grsecurity` *means*. If
someone configures a grsecurity kernel in such a fashion that it breaks
KVM support, they should know to disable KVM themselves.
2016-06-10 19:27:59 +02:00
Joachim Fasting
d8e4432fe2
kernel: unconditionally disable /dev/kmem
This was presumably set for grsecurity compatibility, but now appears
redundant.  Grsecurity does not expect nor require /dev/kmem to be
present and so it makes little sense to continue making its inclusion in
the standard kernel dependent on grsecurity.

More generally, given the large number of possible grsecurity
configurations, it is unclear what `features.grsecurity` even
*means* and its use should be discouraged.
2016-06-10 19:27:41 +02:00
Alexander Kjeldaas
4c99d22f19 kernel: set nx bit on module ro segments
Fixes #4757.
2016-06-03 15:41:47 +02:00
Tuomas Tynkkynen
7276417870 kernel config: Enable BINFMT_MISC
This is enabled in x86 builds but lacking on ARM.
2016-04-28 20:46:34 +03:00
Eelco Dolstra
4907fc9e8d Merge pull request #14509 from ragnard/bpf-tracing-kernel-config
linux: kernel config for extended BPF support
2016-04-07 11:01:34 +02:00
Ragnar Dahlén
961d1e847c linux: kernel config for extended BPF support
- Enable BPF_SYSCALL and BPF_EVENTS
- Build modules for NET_CLS_BPF and NET_ACT_BPF

With these config options we can leverage the full potential of BPF for
tracing and instrumenting Linux systems, for example using
libraries/tools like those provided by the bcc project.
2016-04-07 08:14:41 +01:00
Louis Taylor
695c2e4ee4 kernel-config: do not use NFSD_PNFS on >=4.6 2016-03-27 03:09:30 +01:00
Al Zohali
9d03355bed ChromiumOS kernel option fixup 2016-03-08 01:19:42 +03:00
Marko Poikonen
ede005ad3f Enabling Media PCI adapters (needed for PCI DVB cards) 2016-03-01 20:57:46 +01:00
Tuomas Tynkkynen
0e1319f03f linux-3.10: fixup config by a slightly hacky way
For explanation see:
https://github.com/NixOS/nixpkgs/pull/13405#issuecomment-188357637
2016-02-25 23:07:47 +01:00
Eelco Dolstra
48f51f1185 linux: Compress kernel modules
This reduces the kernel package from 185 to 62 MiB, for a neglible
boot time cost.
2016-02-01 18:19:23 +01:00
Lluís Batlle i Rossell
b2dc647c1e linux: adding PCI Expresscard Hotplug support 2016-02-01 11:07:08 +01:00
Nikolay Amiantov
29785c5b7a Merge pull request #12309 from zohl/chromiumos-kernel
Add ChromiumOS kernels
2016-01-23 13:13:59 +03:00
Al Zohali
ee9e7b7224 linux_chromiumos_3_18: init at 3.18.0
Co-authored-by: Nikolay Amiantov <ab@fmap.me>
2016-01-13 22:43:19 +03:00
Lluís Batlle i Rossell
1792ca5810 Increasing mmc possible partitions from 8 to 32.
In kernel common config. I have a modern tablet with 18 gpt partitions
on eMMC (Android+Win10 dualboot).
2016-01-11 09:27:58 +01:00
Lluís Batlle i Rossell
be9ad574f7 Adding framebuffer console rotation to kernels.
This helps in some weird screens that otherwise show the console 90° turned.
2016-01-07 16:48:46 +01:00
Eelco Dolstra
e4b4e9b986 linux: Make Unix domain sockets builtin
This hopefully fixes intermittent initrd failures where udevd cannot
create a Unix domain socket:

  machine# running udev...
  machine# error getting socket: Address family not supported by protocol
  machine# error initializing udev control socket
  machine# error getting socket: Address family not supported by protocol

The "unix" kernel module is supposed to be loaded automatically, and
clearly that works most of the time, but maybe there is a race
somewhere. In any case, no sane person would run a kernel without Unix
domain sockets, so we may as well make it builtin.

http://hydra.nixos.org/build/30001448
2016-01-07 13:20:53 +01:00
William A. Kennington III
893179e9c1 linux-testing: Bump to 4.4-rc1 2015-11-17 17:21:25 -08:00
Brian McKenna
6668058a62 linux: add config options needed for a Bay Trail Chromebook
Close #10416.
Got /dev/mmcblk0 on a live CD with these options:

    X86_INTEL_LPSS y
    PINCTRL_BAYTRAIL y
2015-11-11 15:33:42 +01:00
Shea Levy
3c14c32975 Really disable the firmware loader user helper fallback 2015-10-30 13:31:51 -04:00
Shea Levy
a7157fa2f0 Remove firmware loader fallback.
Systemd dropped support in 207 (would be nice if configure failed with a bad flag),
so all this does is add an annoying delay if firmware can't be found by the kernel
2015-10-30 10:29:56 -04:00
Eelco Dolstra
d2918797bb linux: Fix i686 build 2015-10-28 11:09:59 +01:00
Eelco Dolstra
52c9e4415b linux: Support x2APIC
Without this, certain servers with lots of CPU cores would show only
one core.
2015-10-26 16:20:02 +01:00
Shea Levy
fc719c2437 Fix kernel config names for BRCMFMAC_* 2015-10-03 15:35:06 -04:00
Shea Levy
e7f0b0297d Linux: Enable PCIe and USB support for brcmfmac 2015-10-03 15:22:52 -04:00
Thomas Strobel
c720f06f7c linux kernel common config: re-enable NFC support
As test, Linux kernels were build successfully with NFC support for 3.18.x and
for 4.1.x.
2015-10-01 17:53:51 +02:00
William A. Kennington III
9fbbbd5b68 linux-testing: Update to 4.3.0-rc2 2015-09-21 14:38:49 -07:00
Eelco Dolstra
3ebe5f802b Remove references to /root/test-firmware
This is no longer supported by systemd.
2015-09-07 22:55:16 +02:00
Jonathan Rudenberg
921055b4a8 kernel: Enable DRM_LOAD_EDID_FIRMWARE
This allows specifying drm_kms_helper.edid_firmware to work around displays
that provide bad EDID data.

Documentation: https://www.osadl.org/Single-View.111+M5ec938a7b3b.0.html
2015-08-04 16:38:38 -04:00
Tuomas Tynkkynen
82d0acaf37 kernel-config: Explicitly enable NAMESPACES
Namespace support is required by the `unshare` tool used in
`nixos-install`. It's enabled by the x86 defconfig, but not by
e.g. multi_v7_defconfig. So enable it here so that `nixos-install`
can work on ARM.
2015-07-22 16:08:17 +03:00
Tuomas Tynkkynen
62b75c64d4 kernel-config: Fix 4.0 build on 32-bit
KVM_COMPAT apparently enables 32-bit compability syscalls for KVM, and
as such can be enabled only on a 64-bit system.

Resolves error http://hydra.nixos.org/build/23014132/nixlog/1/raw:
GOT: #
GOT: # configuration written to .config
GOT: #
GOT: make[1]: Leaving directory '/tmp/nix-build-linux-config-4.0.5.drv-0/build'
GOT: make: Leaving directory '/tmp/nix-build-linux-config-4.0.5.drv-0/linux-4.0.5'
unused option: KVM_COMPAT
builder for ‘/nix/store/7kskdvmzs116f1fm55ghm0crjniw9q0a-linux-config-4.0.5.drv’ failed with exit code 255
2015-06-10 00:28:01 +03:00
Tuomas Tynkkynen
6be70d17c0 kernel-config: Enable IKCONFIG so ARM gets /proc/config.gz
IKCONFIG must be enabled so IKCONFIG_PROC can be set. On x86 IKCONFIG
gets implicitly enabled by kernelAutoModules in platforms.nix. But ARM
doesn't use kernelAutoModules, so IKCONFIG_PROC won't get enabled
without this patch.
2015-06-04 11:28:35 +03:00
Tuomas Tynkkynen
9c2f2bc893 kernel-config: Enable FB_VESA and FRAMEBUFFER_CONSOLE
Commit 159fed47bc (nixos/grub: Fix video display on efi) changed BIOS
systems to start in non-text mode as well. Enable FB_VESA to get a
framebuffer console on BIOS systems. Change FRAMEBUFFER_CONSOLE to 'y'
instead of the default 'm' to so the user doesn't need to manually load
the fbcon module anymore.

Other distros have similar defaults, at least on Arch:
    CONFIG_FB_VESA=y
    CONFIG_FRAMEBUFFER_CONSOLE=y
and on Ubuntu (12.04):
    CONFIG_FB_VESA=m
    CONFIG_FRAMEBUFFER_CONSOLE=y

Fixes #8139
2015-06-04 11:26:20 +03:00
Shea Levy
8dbd385e1c kernel config: Fix grsecurity-specific config
Refs 13a38440c6
2015-05-18 14:32:29 -04:00
William A. Kennington III
ec1a281f0a kernel-config: Fix for i686 2015-05-17 03:02:44 -07:00
William A. Kennington III
13a38440c6 kernel-config: Grsecurity fixes 2015-05-15 18:38:15 -07:00
William A. Kennington III
bca69399a8 kernel-config: kvm changes 2015-05-15 18:38:15 -07:00
William A. Kennington III
7aae0f3115 kernel-config: mlx4-en enable vxlan offloading 2015-05-15 18:38:15 -07:00
William A. Kennington III
19d5b1e37a kernel-config: nfs changes 2015-05-15 18:38:14 -07:00
Tobias Geerinckx-Rice
8a2deb7abe linux: disable UEVENT_HELPER by default on versions >= 3.15 2015-04-06 14:00:03 +02:00
Domen Kožar
c31f1d99a5 fix linux 3.2/3.4 builds 2015-03-29 21:41:05 +02:00
Arseniy Seroka
a639c710ae Merge pull request #6968 from oxij/unquestionably-good
Easy to check to be unquestionably good changes
2015-03-28 13:16:13 +03:00
Jan Malakhovski
89bfacdf90 kernel: add a warning/note at the top of common-config so that people would hopefully stop breaking the older kernels 2015-03-26 12:43:42 +00:00
William A. Kennington III
4d47c0dd24 kernel-config: Add microcode support + early loading on new kernels 2015-03-25 11:30:03 -07:00
Mathijs Kwik
5cac50b3bf kernel: add support for experimental Realtek2800 models
tested with AVM Fritz wlan Stick N
2015-03-22 13:49:29 +01:00
William A. Kennington III
6437ad00f0 kernel/common-config: More fixes 2015-03-20 15:05:43 -07:00
William A. Kennington III
9dc8335294 kernel/common-config: Fix older kernels 2015-03-20 14:41:03 -07:00
Eelco Dolstra
ebef573641 Merge pull request #6476 from ts468/squashfs
Change kernel config: improve squashfs support of kernel
2015-03-12 21:41:53 +01:00
Eelco Dolstra
798e613e16 kernel: Enable kprobes and other tracing features
All of these should have minimal performance impact unless enabled at
runtime.
2015-03-11 17:14:37 +01:00
Thomas Strobel
0d1c39443b Change kernel config: improve squashfs support of kernel 2015-03-08 13:58:00 +01:00
Eelco Dolstra
3b9b620656 Revert "linux: disable UEVENT_HELPER*"
This reverts commit 9f87f3ccb0 because
it causes /proc/sys/kernel/hotplug to not be cleared on Linux <= 3.14.
2015-03-06 15:59:06 +01:00
Eelco Dolstra
c502efc72a linux: Enable Intel idle driver
Also build the performance governor into the kernel so there is a sane
default. Note that cpufreq.service will still load "ondemand" on
non-pstate systems.
2015-03-04 17:11:41 +01:00
Eelco Dolstra
26da67ff73 Kernel config: Separate power management and debugging 2015-03-04 17:10:47 +01:00
aszlig
791b970c6e
linux/kernel: Remove EXT2_FS_XIP for version 4.0.
The option has been removed in torvalds/linux@6cd176a and thus we
shouldn't try to set it for kernel version 4.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-03-04 15:42:44 +01:00
Eelco Dolstra
584ca36462 linux: Disable CONFIG_DEBUG_STACKOVERFLOW
This got enabled accidentally in
e64e3ad88a.
2015-03-02 23:36:05 +01:00
Tobias Geerinckx-Rice
9f87f3ccb0 linux: disable UEVENT_HELPER*
Deprecated since 2006: http://lwn.net/Articles/166954/
2015-03-01 03:31:59 +01:00
Thomas Strobel
eb97dc0013 Add kernel config for dom0 of Xen 2015-02-16 20:52:06 +01:00
Tobias Geerinckx-Rice
a43db5fa20 kernel: common-config.nix: enable FANOTIFY 2015-02-12 19:39:44 +01:00
Tobias Geerinckx-Rice
a5c072a610 kernel: common-config.nix: remove useless 'FTRACE n' before 'y' 2015-02-11 05:29:48 +01:00
aszlig
8ac1765e28
linux-testing: Update to version 3.19-rc5.
Using linux-testing for a bunch of machines, I'd actually expect it to
be more recent than the latest stable, but until now it actually was
behind.

Since torvalds/linux@464ed18ebd, the option
PM_RUNTIME doesn't exist anymore, so we need to remove it from our
common config.

Signed-off-by: aszlig <aszlig@redmoonstudios.org>
2015-01-22 09:56:37 +01:00
William A. Kennington III
e0098e8408 Revert "linux kernel: set VFIO_PCI_VGA to y for versions > 3.9"
This reverts commit 774486a149.
2015-01-07 10:55:06 -08:00
Jan Malakhovski
774486a149 linux kernel: set VFIO_PCI_VGA to y for versions > 3.9
This allows to passthrough PCI video adapters to KVM virtual machines.
VFIO_PCI is set to `m` by default, which means this will not affect
non-users.
2015-01-07 11:08:58 +00:00
Nikolay Amiantov
e9d868de63 kernel: enable intel_pstate 2015-01-06 03:07:32 +03:00
William A. Kennington III
557a3c92e3 kernel: Don't enable the iommu by default as this breaks for some hardware 2014-11-13 16:23:49 -08:00
Domen Kožar
7ff9cd2c41 more kernel fixes 2014-11-11 09:22:18 +01:00
Domen Kožar
b9388e9711 fix kernel builds on 32bit linux 2014-11-11 07:06:09 +01:00
Eelco Dolstra
e78a1603fc linux: Enable BPF_JIT only on 64-bit
It's not supported on i686.

http://hydra.nixos.org/build/16834647
2014-11-10 20:21:28 +01:00
lethalman
27b79a0469 Merge pull request #4780 from ambrop72/kernel-ppp-filter
kernel: Enable PPP_FILTER by default.
2014-11-08 12:41:13 +01:00
William A. Kennington III
d88c5eed1d kernel: Add more supported features 2014-11-08 02:44:19 -08:00
ambrop7@gmail.com
fc533f0e84 kernel: Enable PPP_FILTER by default.
pppd will try to use it to improve efficiency and complain if it's not available
(but is is not mandatory).
2014-11-02 15:10:09 +01:00
lethalman
2c0cc6cedc Merge pull request #4587 from uzska/master
Added line SCSI_SAS_ATA y on line 62
2014-10-24 09:39:40 +02:00
Eelco Dolstra
38ed4d4d0f linux: Enable FW_LOADER_USER_HELPER_FALLBACK
We don't really need this anymore, except that our docs say that you
can put firmware in /root/test-firmware, which doesn't work via
/sys/module/firmware_class/parameters/path.
2014-10-20 13:25:00 +02:00
uzska
0fa57137cf Added line SCSI_SAS_ATA y on line 62
This kernel change will make the nixOS live cd detect the hard drive upon boot.
2014-10-17 13:31:08 -07:00
Daniel Peebles
0bb14e4fea Disable NFC on 3.17 or above
This should only be temporary, but there's a bug in the 3.17 rc1 and rc2 that leads to cyclic module dependencies and a segfault during the build process.
2014-08-29 01:49:32 -04:00
Eelco Dolstra
e4752d7877 linux: Enable ACLs in ext3
http://hydra.nixos.org/build/13462892
2014-08-18 14:33:09 +02:00
Bjørn Forsman
28cb0f58c4 linux: only enable CONFIG_NFS_SWAP for v3.6+ kernels
Linux v3.6 is the earliest version with CONFIG_NFS_SWAP support. This
change unbreaks NixOS tests for older kernels.
2014-07-16 12:13:06 +02:00
Ricardo M. Correia
85e444f4f8 linux: Enable NFSv4.1, v4.2 clients and swap on NFS
I'm only enabling for kernels >= 3.11 to be conservative, because clients and
servers automatically negotiate and use the highest mutually supported version
by default, but only in kernel 3.11 server NFSv4.1 support actually became RFC
compliant.

I'm also adding support for swap on NFS, which is enabled by default on
Ubuntu kernels.
2014-07-15 15:07:25 +02:00
Michael Raskin
0ecfc6cb49 Merge pull request #2213 from thoughtpolice/kernel-config
nixos: make several kernel common-config options optional
2014-06-30 09:01:08 +04:00
Michael Raskin
8297a26746 Create an option to build 3.16-rc1 which carries a new Wireless driver; make USB_DEBUG optional as it seems to be planned to disappear in 3.16. 2014-06-18 00:23:48 +02:00
Michael Raskin
f9c05a3bad Merge pull request #2378 from wizeman/u/kernel-zram
linux: Add support for zram
2014-05-27 01:40:18 -07:00
Austin Seipp
ac38b32974 kernel/grsec: another optional option
This should fix the testing kernels.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-18 08:57:10 -05:00
Austin Seipp
e64e3ad88a kernel: only use DEBUG_STACKOVERFLOW if !grsecurity
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-18 08:56:52 -05:00
Austin Seipp
80d0e31a94 kernel: allow features to be used in common-config
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-18 08:49:32 -05:00
Austin Seipp
657998dbcb kernel/common-config: Another optional option
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-17 19:44:03 -05:00
Austin Seipp
b5b434c98a kernel: make some common-config options optional for grsec
Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-17 16:37:22 -05:00
Austin Seipp
4f27ad14a1 grsec: refactor grsecurity packages
This now provides a handful of different grsecurity kernels for slightly
different 'flavors' of packages. This doesn't change the grsecurity
module to use them just yet, however.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-17 14:09:43 -05:00
Austin Seipp
92abc4c610 kernel: enable AppArmor by default
AppArmor only requires a few patches to the 3.2 and 3.4 kernels in order
to work properly (with the minor catch grsecurity -stable includes the
3.2 patches.) This adds them to the kernel builds by default, removes
features.apparmor (since it's always true) and makes it the default MAC
system.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-05-17 14:09:09 -05:00
Ricardo M. Correia
f0e3775f2e linux: Add support for zram 2014-04-24 23:47:08 +02:00
Eelco Dolstra
4e8c2f0ff9 Merge branch 'systemd-update' 2014-04-20 19:31:01 +02:00
Eelco Dolstra
5da309fcaa linux: Enable SND_DYNAMIC_MINORS
This is necessary if you get:

  kernel: Too many HDMI devices
  kernel: Consider building the kernel with CONFIG_SND_DYNAMIC_MINORS=y
2014-04-18 21:50:00 +02:00
Eelco Dolstra
3f01caa89f linux: Enable transparent hugepages 2014-04-16 22:40:07 +02:00
Austin Seipp
acbf28145c nixos: make several kernel common-config options optional
Realistically, common-config is useful, but there are a lot of things in
there that are non-optionally specified that aren't always useful. For
example, when deploying grsecurity, I don't want the bluetooth,
wireless, or input joystick/extra filesystem stack (XFS, etc), nor the
staging drivers tree.

The problem is that if you specify this in your own kernel config in the
grsecurity module, by saying 'BT n' to turn off bluetooth,
common-config turns on 'BT_HCIUART_BCSP y', which then becomes unused
and errors out.

This is really just an arbitrary picking at the moment, but it should be
OK.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2014-04-11 22:39:29 -05:00
Shea Levy
0c66dbaee6 Enable CC_STACKPROTECTOR_REGULAR on linux 3.14+ 2014-04-02 17:58:54 -04:00
Shea Levy
2d4ce25b5b Add linux 3.14 2014-03-31 20:54:47 -04:00
Shea Levy
3ae5e801a5 Linux 3.13
Signed-off-by: Shea Levy <shea@shealevy.com>
2014-01-19 22:35:24 -05:00
Eelco Dolstra
8a182718ca splashutils: Remove 2013-09-26 18:03:43 +02:00
aszlig
2e89b40634
Merge pull request #1010 from offlinehacker.
Although this is a release canidate version of kernel 3.12, there are
reasons for merging this anyway, as discussed in #1010 and #1006.

Thanks to @offlinehacker for this and the initial pull request.
2013-09-25 14:05:33 +02:00
Jaka Hudoklin
69f30432dd kernel: add linux 3.12-rc2 2013-09-25 12:49:49 +02:00
Eelco Dolstra
7856ba881a linux: Enable proper blkio controller support
Having BLK_CGROUP is not enough, you need BLK_DEV_THROTTLING or
CFQ_GROUP_IOSCHED to do anything useful.
2013-09-17 16:00:36 +02:00
Mathijs Kwik
27a810346a Revert "linux: really provide /proc/config.gz"
This reverts commit 68ce9e91e1.

/proc/config.gz is available after "modprobe configs"
and in
/run/booted-system/kernel-modules/config
2013-09-04 09:29:00 +02:00
Mathijs Kwik
03c9a1fb33 linux 3.11
works fine for me, but nvidia binary driver fails once again
2013-09-04 09:29:00 +02:00
Bjørn Forsman
68ce9e91e1 linux: really provide /proc/config.gz
Currently there is no /proc/config.gz, even though the configuration
indicates it. This fixes it.
2013-08-16 23:12:07 +02:00
Evgeny Egorochkin
339e1d94c6 Turning off PAE support which makes kernel unbootable on older hardware causes CRASH_DUMP option to
disappear, so make it optional.
2013-08-12 05:32:11 +03:00
Eelco Dolstra
f155a35d7d Move kernelExtraConfig to common-config.nix (for x86)
It's bad to have the kernel config scattered across two places.  (This
should also be done for the other architectures.)

Also, restore Xen and KVM guest support in Linux 3.10.
2013-08-01 14:35:31 +02:00
Eelco Dolstra
d1de0e2d6d linux: Enable detection of hung tasks 2013-08-01 01:40:41 +02:00
Eelco Dolstra
f2f00c56e4 linux: Enable stack protector
This may prevent exploitation of buffer overflows.
2013-08-01 01:40:41 +02:00
Eelco Dolstra
bc8186be1e linux: Disable /dev/kmem
See e.g.
  https://wiki.ubuntu.com/Security/Features#A.2BAC8-dev.2BAC8-kmem_disabled
2013-08-01 01:40:40 +02:00
Eelco Dolstra
7ce325f3e0 Unify the Linux kernel configurations
Having N different copies of the NixOS kernel configuration is bad
because these copies tend to diverge.  For instance, our 3.10 config
lacked some modules that were enabled in older configs, probably
because the 3.10 config had been copied off an earlier version of some
older kernel config.

So now there is a single kernel config in common-config.nix.  It has a
few conditionals to deal with new/removed kernel options, but
otherwise it's pretty straightforward.

Also, a lot of cut&paste boilerplate between the kernel Nix
expressions is gone (such as preConfigure).
2013-08-01 01:40:40 +02:00