diff options
Diffstat (limited to 'pkgs/os-specific/linux/kernel')
-rw-r--r-- | pkgs/os-specific/linux/kernel/common-config.nix | 59 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/generic.nix | 19 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/hardened/patches.json | 62 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/kernels-org.json | 32 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-libre.nix | 4 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-rpi.nix | 2 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-rt-5.10.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-rt-5.15.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-rt-6.1.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/linux-rt-6.6.nix | 6 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/manual-config.nix | 3 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/perf/default.nix | 9 | ||||
-rwxr-xr-x | pkgs/os-specific/linux/kernel/update-mainline.py | 8 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/xanmod-kernels.nix | 111 | ||||
-rw-r--r-- | pkgs/os-specific/linux/kernel/zen-kernels.nix | 13 |
15 files changed, 201 insertions, 145 deletions
diff --git a/pkgs/os-specific/linux/kernel/common-config.nix b/pkgs/os-specific/linux/kernel/common-config.nix index aeb78f1ad38a..54a9753b5fa1 100644 --- a/pkgs/os-specific/linux/kernel/common-config.nix +++ b/pkgs/os-specific/linux/kernel/common-config.nix @@ -11,6 +11,7 @@ # Configuration { lib, stdenv, version +, rustAvailable , features ? {} }: @@ -29,6 +30,18 @@ let (stdenv.hostPlatform.isPower && stdenv.hostPlatform.is64bit) || (stdenv.hostPlatform.isMips && stdenv.hostPlatform.is64bit)); + forceRust = features.rust or false; + kernelSupportsRust = lib.versionAtLeast version "6.7"; + + # Currently only enabling Rust by default on kernel 6.12+, + # which actually has features that use Rust that we want. + defaultRust = lib.versionAtLeast version "6.12" && rustAvailable; + withRust = + assert lib.assertMsg (!(forceRust && !kernelSupportsRust)) '' + Kernels below 6.7 (the kernel being built is ${version}) don't support Rust. + ''; + (forceRust || defaultRust) && kernelSupportsRust; + options = { debug = { @@ -134,6 +147,7 @@ let # Required to bring up some Bay Trail devices properly I2C = yes; + I2C_DESIGNWARE_CORE = yes; I2C_DESIGNWARE_PLATFORM = yes; PMIC_OPREGION = whenAtLeast "5.10" yes; INTEL_SOC_PMIC = whenAtLeast "5.10" yes; @@ -182,7 +196,7 @@ let # Collect ECC errors and retire pages that fail too often RAS_CEC = yes; - } // lib.optionalAttrs (stdenv.is32bit) { + } // lib.optionalAttrs (stdenv.hostPlatform.is32bit) { # Enable access to the full memory range (aka PAE) on 32-bit architectures # This check isn't super accurate but it's close enough HIGHMEM = option yes; @@ -214,7 +228,7 @@ let timer = { # Enable Full Dynticks System. # NO_HZ_FULL depends on HAVE_VIRT_CPU_ACCOUNTING_GEN depends on 64BIT - NO_HZ_FULL = lib.mkIf stdenv.is64bit yes; + NO_HZ_FULL = lib.mkIf stdenv.hostPlatform.is64bit yes; }; # Enable NUMA. @@ -411,7 +425,7 @@ let }; video = let - whenHasDevicePrivate = lib.mkIf (!stdenv.isx86_32); + whenHasDevicePrivate = lib.mkIf (!stdenv.hostPlatform.isx86_32); in { # compile in DRM so simpledrm can load before initrd if necessary AGP = yes; @@ -484,14 +498,16 @@ let DRM_VC4_HDMI_CEC = yes; }; - # Enables Rust support in the Linux kernel. This is currently not enabled by default, because it occasionally requires - # patching the Linux kernel for the specific Rust toolchain in nixpkgs. These patches usually take a bit - # of time to appear and this would hold up Linux kernel and Rust toolchain updates. - # - # Once Rust in the kernel has more users, we can reconsider enabling it by default. - rust = lib.optionalAttrs ((features.rust or false) && lib.versionAtLeast version "6.7") { + # Enable Rust and features that depend on it + rust = lib.optionalAttrs withRust { RUST = yes; - GCC_PLUGINS = no; + + # These don't technically require Rust but we probably want to get some more testing + # on the whole DRM panic setup before shipping it by default. + DRM_PANIC = whenAtLeast "6.12" yes; + DRM_PANIC_SCREEN = whenAtLeast "6.12" (freeform "kmsg"); + + DRM_PANIC_SCREEN_QR_CODE = whenAtLeast "6.12" yes; }; sound = { @@ -552,7 +568,7 @@ let USB_EHCI_ROOT_HUB_TT = yes; # Root Hub Transaction Translators USB_EHCI_TT_NEWSCHED = yes; # Improved transaction translator scheduling - USB_HIDDEV = yes; # USB Raw HID Devices (like monitor controls and Uninterruptable Power Supplies) + USB_HIDDEV = yes; # USB Raw HID Devices (like monitor controls and Uninterruptable Power Supplies) # default to dual role mode USB_DWC2_DUAL_ROLE = yes; @@ -628,6 +644,7 @@ let NFS_V4_1 = yes; # NFSv4.1 client support NFS_V4_2 = yes; NFS_V4_SECURITY_LABEL = yes; + NFS_LOCALIO = whenAtLeast "6.12" yes; CIFS_XATTR = yes; CIFS_POSIX = option yes; @@ -836,9 +853,9 @@ let KSM = yes; VIRT_DRIVERS = yes; # We need 64 GB (PAE) support for Xen guest support - HIGHMEM64G = { optional = true; tristate = lib.mkIf (!stdenv.is64bit) "y";}; + HIGHMEM64G = { optional = true; tristate = lib.mkIf (!stdenv.hostPlatform.is64bit) "y";}; - VFIO_PCI_VGA = lib.mkIf stdenv.is64bit yes; + VFIO_PCI_VGA = lib.mkIf stdenv.hostPlatform.is64bit yes; UDMABUF = yes; @@ -895,6 +912,12 @@ let ZRAM = module; ZRAM_WRITEBACK = option yes; ZRAM_MULTI_COMP = whenAtLeast "6.2" yes; + ZRAM_BACKEND_842 = whenAtLeast "6.12" yes; + ZRAM_BACKEND_DEFLATE = whenAtLeast "6.12" yes; + ZRAM_BACKEND_LZ4 = whenAtLeast "6.12" yes; + ZRAM_BACKEND_LZ4HC = whenAtLeast "6.12" yes; + ZRAM_BACKEND_LZO = whenAtLeast "6.12" yes; + ZRAM_BACKEND_ZSTD = whenAtLeast "6.12" yes; ZRAM_DEF_COMP_ZSTD = whenAtLeast "5.11" yes; ZSWAP = option yes; ZSWAP_COMPRESSOR_DEFAULT_ZSTD = whenAtLeast "5.7" (lib.mkOptionDefault yes); @@ -940,7 +963,7 @@ let # 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 (!stdenv.isx86_32) yes; + MEM_SOFT_DIRTY = lib.mkIf (!stdenv.hostPlatform.isx86_32) yes; }; misc = let @@ -967,13 +990,18 @@ let JOYSTICK_PSXPAD_SPI_FF = yes; LOGIG940_FF = yes; NINTENDO_FF = whenAtLeast "5.16" yes; + NVIDIA_SHIELD_FF = whenAtLeast "6.5" yes; PLAYSTATION_FF = whenAtLeast "5.12" yes; SONY_FF = yes; SMARTJOYPLUS_FF = yes; THRUSTMASTER_FF = yes; ZEROPLUS_FF = yes; - MODULE_COMPRESS = whenOlder "5.13" yes; + MODULE_COMPRESS = lib.mkMerge [ + (whenOlder "5.13" yes) + (whenAtLeast "6.12" yes) + ]; + MODULE_COMPRESS_ALL = whenAtLeast "6.12" yes; MODULE_COMPRESS_XZ = yes; SYSVIPC = yes; # System-V IPC @@ -1179,6 +1207,7 @@ let LIRC = yes; SCHED_CORE = whenAtLeast "5.14" yes; + SCHED_CLASS_EXT = whenAtLeast "6.12" yes; LRU_GEN = whenAtLeast "6.1" yes; LRU_GEN_ENABLED = whenAtLeast "6.1" yes; diff --git a/pkgs/os-specific/linux/kernel/generic.nix b/pkgs/os-specific/linux/kernel/generic.nix index 74e603623412..046fb3fe6120 100644 --- a/pkgs/os-specific/linux/kernel/generic.nix +++ b/pkgs/os-specific/linux/kernel/generic.nix @@ -71,7 +71,7 @@ lib.makeOverridable ({ # The kernel source tarball. , autoModules ? stdenv.hostPlatform.linux-kernel.autoModules , preferBuiltin ? stdenv.hostPlatform.linux-kernel.preferBuiltin or false , kernelArch ? stdenv.hostPlatform.linuxArch -, kernelTests ? [] +, kernelTests ? {} , stdenv ? args'.stdenv , buildPackages ? args'.buildPackages @@ -84,7 +84,7 @@ lib.makeOverridable ({ # The kernel source tarball. # cgit) that are needed here should be included directly in Nixpkgs as # files. -assert stdenv.isLinux; +assert stdenv.hostPlatform.isLinux; let # Dirty hack to make sure that `version` & `src` have @@ -108,6 +108,11 @@ let commonStructuredConfig = import ./common-config.nix { inherit lib stdenv version; + rustAvailable = + lib.any (lib.meta.platformMatch stdenv.hostPlatform) rustc.targetPlatforms + && lib.all (p: !lib.meta.platformMatch stdenv.hostPlatform p) rustc.badTargetPlatforms + # Known to be broken: https://lore.kernel.org/lkml/31885EDD-EF6D-4EF1-94CA-276BA7A340B7@kernel.org/T/ + && !(stdenv.hostPlatform.isRiscV && stdenv.cc.isGNU); features = kernelFeatures; # Ensure we know of all extra patches, etc. }; @@ -276,12 +281,12 @@ kernel.overrideAttrs (finalAttrs: previousAttrs: { modDirVersion = throw (explain "modDirVersion"); }))).version emptyFile; - in [ - (nixosTests.kernel-generic.passthru.testsForKernel overridableKernel) - versionDoesNotDependOnPatchesEtc + in { + inherit versionDoesNotDependOnPatchesEtc; + testsForKernel = nixosTests.kernel-generic.passthru.testsForKernel overridableKernel; # Disabled by default, because the infinite recursion is hard to understand. The other test's error is better and produces a shorter trace. - # versionDoesNotDependOnPatchesEtcNixOS - ] ++ kernelTests; + # inherit versionDoesNotDependOnPatchesEtcNixOS; + } // kernelTests; }; })); diff --git a/pkgs/os-specific/linux/kernel/hardened/patches.json b/pkgs/os-specific/linux/kernel/hardened/patches.json index dc3b43a4d19f..4e0e3feb67df 100644 --- a/pkgs/os-specific/linux/kernel/hardened/patches.json +++ b/pkgs/os-specific/linux/kernel/hardened/patches.json @@ -2,61 +2,61 @@ "5.10": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-v5.10.226-hardened1.patch", - "sha256": "1vxcr0f3ikkg10wcvq76djxzmhlc6h5fv34xf8vm48wfi7ryajbk", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.10.226-hardened1/linux-hardened-v5.10.226-hardened1.patch" + "name": "linux-hardened-v5.10.229-hardened1.patch", + "sha256": "0bagy0x1kwm05x9mlgisjrlybk9yl91maxw6fai2si5m4xb3xv7n", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.10.229-hardened1/linux-hardened-v5.10.229-hardened1.patch" }, - "sha256": "19hwwl5sbya65mch7fwmji2cli9b8796zjqbmkybjrarg1j9m8gn", - "version": "5.10.226" + "sha256": "1q6di05rk4bsy91r03zw6vz14zzcpvv25dv7gw0yz1gzpgkbb9h8", + "version": "5.10.229" }, "5.15": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-v5.15.167-hardened1.patch", - "sha256": "1mwww490bf5i1njzyprnamfn8n471r94klgn7wghwi2f5vsn6j9g", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.15.167-hardened1/linux-hardened-v5.15.167-hardened1.patch" + "name": "linux-hardened-v5.15.171-hardened1.patch", + "sha256": "08fbvra05rj0xcj9a8hd6mhv4lis2mhp57v7x4mw7rxxz2vim4bz", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.15.171-hardened1/linux-hardened-v5.15.171-hardened1.patch" }, - "sha256": "0c6s6l5sz9ibws7bymb393ww0z9i3amsk1yx0bahipz3xhc1yxdi", - "version": "5.15.167" + "sha256": "0fra5zwcixgl6fg9hgdzlfcqng6pg09h2j7xqhi4qg0jv1jf0lr9", + "version": "5.15.171" }, "5.4": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-v5.4.284-hardened1.patch", - "sha256": "1skqaq90bigrxg0w075nssqbdq868ii62r8asx0m6wcvd5cl50af", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.4.284-hardened1/linux-hardened-v5.4.284-hardened1.patch" + "name": "linux-hardened-v5.4.285-hardened1.patch", + "sha256": "1zm846mzvz1x88iskfw8513jkhlphxkd4v2qs86maxlgiz5zcxqp", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/v5.4.285-hardened1/linux-hardened-v5.4.285-hardened1.patch" }, - "sha256": "0axkwfhvq3w2072xjqww476qa3rjglxyqmf72mlp9b5ymswil8kp", - "version": "5.4.284" + "sha256": "1722sc365ajxmqyr4r49yp73mzdckay3rx5c2gx29xzny9zc6cmy", + "version": "5.4.285" }, "6.1": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-v6.1.110-hardened1.patch", - "sha256": "1v43n3h9d3y3xjjyf6r8n7a3fh3zpqw4f925bn2z5vwzblmg4bhf", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.1.110-hardened1/linux-hardened-v6.1.110-hardened1.patch" + "name": "linux-hardened-v6.1.116-hardened1.patch", + "sha256": "0q597vszhgj6bgq56j11nq01mjjxl0ws8kqcr839fzkcgn1h6xv9", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.1.116-hardened1/linux-hardened-v6.1.116-hardened1.patch" }, - "sha256": "0slgvwldjdyi5vzhgriamkmrj4p942yacclgcw29331gfjs39gly", - "version": "6.1.110" + "sha256": "109vhc1hcfx6sacw4553xmwbj1gqx3zqjq5zg11z7a72dqrnisqp", + "version": "6.1.116" }, - "6.10": { + "6.11": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-v6.10.10-hardened1.patch", - "sha256": "13hlk1qd9inq711bz2sw4rq6r2lcagdl7mwxkx6rq8iimic758f2", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.10.10-hardened1/linux-hardened-v6.10.10-hardened1.patch" + "name": "linux-hardened-v6.11.7-hardened1.patch", + "sha256": "1rfvlhgl78ixsb75aah9173h8jp37c8i0hs7b4484vljmqv0khcy", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.11.7-hardened1/linux-hardened-v6.11.7-hardened1.patch" }, - "sha256": "1kcvh1g3p1sj4q34ylcmm43824f97z4k695lcxnzp7pbnlsyg1z6", - "version": "6.10.10" + "sha256": "1cpbycx79nl517rz573mja52bgzm249mhqzp424r5mqp91jfrx8b", + "version": "6.11.7" }, "6.6": { "patch": { "extra": "-hardened1", - "name": "linux-hardened-v6.6.51-hardened1.patch", - "sha256": "03m82lylflnk466ixz3dywnj7scp6ynif4qhbx67ak3f0n44f738", - "url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.6.51-hardened1/linux-hardened-v6.6.51-hardened1.patch" + "name": "linux-hardened-v6.6.60-hardened1.patch", + "sha256": "090bs6nvc9by5higmxfwmzlqjrhbhqs21gsmpxvm18p9l3s08dq3", + "url": "https://github.com/anthraxx/linux-hardened/releases/download/v6.6.60-hardened1/linux-hardened-v6.6.60-hardened1.patch" }, - "sha256": "1cq8l3n12gnk6kgms5c7v71l199ip8lc9fpx7s8w8y88cla9l30w", - "version": "6.6.51" + "sha256": "1vsjb7ifmf6ic6zv16fbrxjvffqc1mkndza76hjr9aw2a0ny7yaj", + "version": "6.6.60" } } diff --git a/pkgs/os-specific/linux/kernel/kernels-org.json b/pkgs/os-specific/linux/kernel/kernels-org.json index 2eb28ea42025..e448d42e3e5f 100644 --- a/pkgs/os-specific/linux/kernel/kernels-org.json +++ b/pkgs/os-specific/linux/kernel/kernels-org.json @@ -1,34 +1,30 @@ { "testing": { - "version": "6.11-rc7", - "hash": "sha256:17c8vwvra042mib1s60nqqai0s7qc0qkvrf0j7ziqmy2llq8cbxy" + "version": "6.12-rc6", + "hash": "sha256:1cllyav4pg2z22a52j8vq1sdk8qrr6h8w2f3blrs4ispbhxa8xsb" }, "6.1": { - "version": "6.1.111", - "hash": "sha256:1c7d49kppv8xgqlsrfm1286mnvz8vcnbqqh6zgfca2s13px9hwn4" + "version": "6.1.116", + "hash": "sha256:109vhc1hcfx6sacw4553xmwbj1gqx3zqjq5zg11z7a72dqrnisqp" }, "5.15": { - "version": "5.15.167", - "hash": "sha256:0c6s6l5sz9ibws7bymb393ww0z9i3amsk1yx0bahipz3xhc1yxdi" + "version": "5.15.171", + "hash": "sha256:0fra5zwcixgl6fg9hgdzlfcqng6pg09h2j7xqhi4qg0jv1jf0lr9" }, "5.10": { - "version": "5.10.226", - "hash": "sha256:19hwwl5sbya65mch7fwmji2cli9b8796zjqbmkybjrarg1j9m8gn" + "version": "5.10.229", + "hash": "sha256:1q6di05rk4bsy91r03zw6vz14zzcpvv25dv7gw0yz1gzpgkbb9h8" }, "5.4": { - "version": "5.4.284", - "hash": "sha256:0axkwfhvq3w2072xjqww476qa3rjglxyqmf72mlp9b5ymswil8kp" + "version": "5.4.285", + "hash": "sha256:1722sc365ajxmqyr4r49yp73mzdckay3rx5c2gx29xzny9zc6cmy" }, "6.6": { - "version": "6.6.52", - "hash": "sha256:1f5l6y7abscm01dr740fzvq8r756ar854n0i299smm4rhcsap48m" - }, - "6.10": { - "version": "6.10.11", - "hash": "sha256:15ihkbsj0idwzbvhynjm3kcnkk0alf3xipip8ngib1f1z13a0kgv" + "version": "6.6.60", + "hash": "sha256:1vsjb7ifmf6ic6zv16fbrxjvffqc1mkndza76hjr9aw2a0ny7yaj" }, "6.11": { - "version": "6.11", - "hash": "sha256:0bnbvadm4wvnwzcq319gsgl03ijvvljn7mj8qw87ihpb4p0cdljm" + "version": "6.11.7", + "hash": "sha256:1cpbycx79nl517rz573mja52bgzm249mhqzp424r5mqp91jfrx8b" } } diff --git a/pkgs/os-specific/linux/kernel/linux-libre.nix b/pkgs/os-specific/linux/kernel/linux-libre.nix index 7f4f1aa29116..06adab0e0ac9 100644 --- a/pkgs/os-specific/linux/kernel/linux-libre.nix +++ b/pkgs/os-specific/linux/kernel/linux-libre.nix @@ -1,8 +1,8 @@ { stdenv, lib, fetchsvn, linux , scripts ? fetchsvn { url = "https://www.fsfla.org/svn/fsfla/software/linux-libre/releases/branches/"; - rev = "19631"; - sha256 = "0hydmrdwqrrmrnk6r583m7c2hq1k68c9c8yqjc0bd6q4x7ys32ci"; + rev = "19663"; + sha256 = "126b05v6hcdag3pfaxwbabfwkrp4c7010v52rk2dqh9i631ykavd"; } , ... } @ args: diff --git a/pkgs/os-specific/linux/kernel/linux-rpi.nix b/pkgs/os-specific/linux/kernel/linux-rpi.nix index 8ea483fc2579..54c5ace09154 100644 --- a/pkgs/os-specific/linux/kernel/linux-rpi.nix +++ b/pkgs/os-specific/linux/kernel/linux-rpi.nix @@ -72,7 +72,7 @@ lib.overrideDerivation (buildLinux (args // { # Make copies of the DTBs named after the upstream names so that U-Boot finds them. # This is ugly as heck, but I don't know a better solution so far. postFixup = '' - dtbDir=${if stdenv.isAarch64 then "$out/dtbs/broadcom" else "$out/dtbs"} + dtbDir=${if stdenv.hostPlatform.isAarch64 then "$out/dtbs/broadcom" else "$out/dtbs"} rm $dtbDir/bcm283*.dtb copyDTB() { cp -v "$dtbDir/$1" "$dtbDir/$2" diff --git a/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix b/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix index e11651d82493..257754d218ec 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-5.10.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "5.10.224-rt116"; # updated by ./update-rt.sh + version = "5.10.225-rt117"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -18,14 +18,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "06nivms93yjbddv3gl88m7bdrr0676nm3p12iqvsdfr4fg39kc0r"; + sha256 = "0770757ildcc0cs6alnb5cspg6ysg2wqly9z5q1vjf3mh0xbzmw5"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "0d7dcbpn0b0nqmcr35z2f5gsknn4hmqsr01n6j35amzv9fd45iwl"; + sha256 = "1c14gm4wzcbkhzgdm5lwq1as9is784yra7bc226bz3bqs3h7vmw2"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix b/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix index 070a5714ee83..bd48959b2b23 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-5.15.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "5.15.163-rt78"; # updated by ./update-rt.sh + version = "5.15.170-rt81"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -19,14 +19,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz"; - sha256 = "00mkipkhz0i5xld7kyaxcj8cj8faw4gmjl5fribg832nn7ccfpq2"; + sha256 = "1ag7fvixhdcyxv6rqfsvq2wh02g64r4rx8izvfb33nfnld2nangx"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "030aycnrcnjhylkqj0wrfi992v2l26v17rgvxl16514zpdjmiv1x"; + sha256 = "0vr6c93dr0gcszx0hfnfhqbg5flkvxmkpf2hw13gi4rg8x4bx5ll"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix b/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix index efa9fcc0fb29..16c4f021ed00 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-6.1.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.1.108-rt40"; # updated by ./update-rt.sh + version = "6.1.112-rt43"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -19,14 +19,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz"; - sha256 = "18lcd2b7ffwzqwqnmb948r7z95470bh7jiqps5nil8hfl24lwkiz"; + sha256 = "094z3wfcxqx2rbi072i5frshpy6rdvk39aahwm9nc07vc8sxxn4b"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "1ki0rn2cp3jkfna60sjlf2qn77fwpy0l2hdjk3i5xpmavir4mhdj"; + sha256 = "0qvil92xkbwmyrmj0zlg0ssg95ncscmr4ga4380903bqhhh74d6h"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix b/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix index b8e4608bd2ff..ffbe4fc47e4c 100644 --- a/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix +++ b/pkgs/os-specific/linux/kernel/linux-rt-6.6.nix @@ -6,7 +6,7 @@ , ... } @ args: let - version = "6.6.49-rt41"; # updated by ./update-rt.sh + version = "6.6.58-rt45"; # updated by ./update-rt.sh branch = lib.versions.majorMinor version; kversion = builtins.elemAt (lib.splitString "-" version) 0; in buildLinux (args // { @@ -19,14 +19,14 @@ in buildLinux (args // { src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz"; - sha256 = "1dyk5pr5g8s5ia7f1vnkid4jghi81pxvwlgn9rmw2n88nz1dlmic"; + sha256 = "1nwrd017l5m4w12yrcf31y3g0l9xqm5b0fzcqdgan3ypi3jq3pz7"; }; kernelPatches = let rt-patch = { name = "rt"; patch = fetchurl { url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz"; - sha256 = "0aajxiwawk624y1r36l818m1ikgcl8szl6sapj70dcv95z9ach4i"; + sha256 = "0npvydlk2z33c5xqhg31xky045s5rvjnvfqml30nycmzbsmqjc7c"; }; }; in [ rt-patch ] ++ kernelPatches; diff --git a/pkgs/os-specific/linux/kernel/manual-config.nix b/pkgs/os-specific/linux/kernel/manual-config.nix index 5544409a74d6..f69de86fd1a6 100644 --- a/pkgs/os-specific/linux/kernel/manual-config.nix +++ b/pkgs/os-specific/linux/kernel/manual-config.nix @@ -396,6 +396,9 @@ let requiredSystemFeatures = [ "big-parallel" ]; meta = { + # https://github.com/NixOS/nixpkgs/pull/345534#issuecomment-2391238381 + broken = withRust && lib.versionOlder version "6.12"; + description = "The Linux kernel" + (if kernelPatches == [] then "" else diff --git a/pkgs/os-specific/linux/kernel/perf/default.nix b/pkgs/os-specific/linux/kernel/perf/default.nix index 0d639531e840..b1f1f4e203b2 100644 --- a/pkgs/os-specific/linux/kernel/perf/default.nix +++ b/pkgs/os-specific/linux/kernel/perf/default.nix @@ -59,7 +59,7 @@ stdenv.mkDerivation { pname = "perf-linux"; inherit (kernel) version src; - patches = [ + patches = lib.optionals (lib.versionAtLeast kernel.version "5.10") [ # fix wrong path to dmesg ./fix-dmesg-path.diff ] ++ lib.optionals (lib.versions.majorMinor kernel.version == "6.10") [ @@ -143,7 +143,12 @@ stdenv.mkDerivation { ++ lib.optional withZstd zstd ++ lib.optional withLibcap libcap ++ lib.optional (lib.versionAtLeast kernel.version "5.8") libpfm - ++ lib.optional (lib.versionAtLeast kernel.version "6.0") python3.pkgs.setuptools; + ++ lib.optional (lib.versionAtLeast kernel.version "6.0") python3.pkgs.setuptools + # Python 3.12 no longer includes distutils, not needed for 6.0 and newer. + ++ lib.optional (!(lib.versionAtLeast kernel.version "6.0") && lib.versionAtLeast python3.version "3.12") [ + python3.pkgs.distutils + python3.pkgs.packaging + ]; env.NIX_CFLAGS_COMPILE = toString [ "-Wno-error=cpp" diff --git a/pkgs/os-specific/linux/kernel/update-mainline.py b/pkgs/os-specific/linux/kernel/update-mainline.py index 320d5065fefa..13e89d3df1e1 100755 --- a/pkgs/os-specific/linux/kernel/update-mainline.py +++ b/pkgs/os-specific/linux/kernel/update-mainline.py @@ -87,9 +87,8 @@ def get_hash(kernel: KernelRelease): return f"sha256:{hash}" -def get_oldest_branch() -> Version: - with open(VERSIONS_FILE) as f: - return parse_version(sorted(json.load(f).keys())[0]) +def get_oldest_branch(kernels) -> Version: + return min(parse_version(v) for v in kernels.keys() if v != "testing") def predates_oldest_branch(oldest: Version, to_compare: str) -> bool: @@ -118,8 +117,7 @@ def main(): if (parsed := parse_release(release)) is not None ] all_kernels = json.load(VERSIONS_FILE.open()) - - oldest_branch = get_oldest_branch() + oldest_branch = get_oldest_branch(all_kernels) for (branch, kernels) in groupby(parsed_releases, lambda kernel: kernel.branch): kernel = max(kernels, key=lambda kernel: kernel.parsed_version) diff --git a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix index a9e75b651156..1a8366f652db 100644 --- a/pkgs/os-specific/linux/kernel/xanmod-kernels.nix +++ b/pkgs/os-specific/linux/kernel/xanmod-kernels.nix @@ -1,4 +1,11 @@ -{ lib, stdenv, fetchFromGitHub, buildLinux, variant, ... } @ args: +{ + lib, + stdenv, + fetchFromGitLab, + buildLinux, + variant, + ... +}@args: let # These names are how they are designated in https://xanmod.org. @@ -7,60 +14,76 @@ let # kernel config in the xanmod version commit variants = { lts = { - version = "6.6.51"; - hash = "sha256-dNUTePfL6cAA0EmEG/D36dNJUobDRBHR5+BYrLIYot4="; + version = "6.6.60"; + hash = "sha256-hbuMuLoXVaFb/HnkVlJm8BSwStxsWmz5e4y65kXBJto="; }; main = { - version = "6.10.10"; - hash = "sha256-abxhlF0zmY9WvcQ+FnkR5fNMvrw+oTCIMaCs8DFJ+oA="; + version = "6.11.7"; + hash = "sha256-+gj6sR20v4+NHR4cqsVK5fVpqXs9zxcBh0kJUH5qpNE="; }; }; - xanmodKernelFor = { version, suffix ? "xanmod1", hash }: buildLinux (args // rec { - inherit version; - pname = "linux-xanmod"; - modDirVersion = lib.versions.pad 3 "${version}-${suffix}"; + xanmodKernelFor = + { + version, + suffix ? "xanmod1", + hash, + }: + buildLinux ( + args + // rec { + inherit version; + pname = "linux-xanmod"; + modDirVersion = lib.versions.pad 3 "${version}-${suffix}"; - src = fetchFromGitHub { - owner = "xanmod"; - repo = "linux"; - rev = modDirVersion; - inherit hash; - }; + src = fetchFromGitLab { + owner = "xanmod"; + repo = "linux"; + rev = modDirVersion; + inherit hash; + }; - structuredExtraConfig = with lib.kernel; { - # CPUFreq governor Performance - CPU_FREQ_DEFAULT_GOV_PERFORMANCE = lib.mkOverride 60 yes; - CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = lib.mkOverride 60 no; + structuredExtraConfig = with lib.kernel; { + # CPUFreq governor Performance + CPU_FREQ_DEFAULT_GOV_PERFORMANCE = lib.mkOverride 60 yes; + CPU_FREQ_DEFAULT_GOV_SCHEDUTIL = lib.mkOverride 60 no; - # Full preemption - PREEMPT = lib.mkOverride 60 yes; - PREEMPT_VOLUNTARY = lib.mkOverride 60 no; + # Full preemption + PREEMPT = lib.mkOverride 60 yes; + PREEMPT_VOLUNTARY = lib.mkOverride 60 no; - # Google's BBRv3 TCP congestion Control - TCP_CONG_BBR = yes; - DEFAULT_BBR = yes; + # Google's BBRv3 TCP congestion Control + TCP_CONG_BBR = yes; + DEFAULT_BBR = yes; - # Preemptive Full Tickless Kernel at 250Hz - HZ = freeform "250"; - HZ_250 = yes; - HZ_1000 = no; + # Preemptive Full Tickless Kernel at 250Hz + HZ = freeform "250"; + HZ_250 = yes; + HZ_1000 = no; - # RCU_BOOST and RCU_EXP_KTHREAD - RCU_EXPERT = yes; - RCU_FANOUT = freeform "64"; - RCU_FANOUT_LEAF = freeform "16"; - RCU_BOOST = yes; - RCU_BOOST_DELAY = freeform "0"; - RCU_EXP_KTHREAD = yes; - }; + # RCU_BOOST and RCU_EXP_KTHREAD + RCU_EXPERT = yes; + RCU_FANOUT = freeform "64"; + RCU_FANOUT_LEAF = freeform "16"; + RCU_BOOST = yes; + RCU_BOOST_DELAY = freeform "0"; + RCU_EXP_KTHREAD = yes; + }; - extraMeta = { - branch = lib.versions.majorMinor version; - maintainers = with lib.maintainers; [ moni lovesegfault atemu shawn8901 zzzsy ]; - description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience"; - broken = stdenv.isAarch64; - }; - } // (args.argsOverride or { })); + extraMeta = { + branch = lib.versions.majorMinor version; + maintainers = with lib.maintainers; [ + moni + lovesegfault + atemu + shawn8901 + zzzsy + ]; + description = "Built with custom settings and new features built to provide a stable, responsive and smooth desktop experience"; + broken = stdenv.hostPlatform.isAarch64; + }; + } + // (args.argsOverride or { }) + ); in xanmodKernelFor variants.${variant} diff --git a/pkgs/os-specific/linux/kernel/zen-kernels.nix b/pkgs/os-specific/linux/kernel/zen-kernels.nix index 113627e0fd5d..f4eda83e6f64 100644 --- a/pkgs/os-specific/linux/kernel/zen-kernels.nix +++ b/pkgs/os-specific/linux/kernel/zen-kernels.nix @@ -5,16 +5,16 @@ let variants = { # ./update-zen.py zen zen = { - version = "6.10.9"; #zen + version = "6.11.5"; #zen suffix = "zen1"; #zen - sha256 = "199362jd1waqri6arb8sdfqrzjkdki5vis2z03cpp2blnbqva10b"; #zen + sha256 = "1w342k54ns6rwkk13l9f7h0qzikn6hbnb2ydxyqalrmll8n2g237"; #zen isLqx = false; }; # ./update-zen.py lqx lqx = { - version = "6.10.9"; #lqx + version = "6.11.5"; #lqx suffix = "lqx1"; #lqx - sha256 = "0y7r55iy7ylddv7yrlwkz7ps82j447a6m3khq2w4sfh8f0xy86p7"; #lqx + sha256 = "0ql7nw6sph4ai44n66c7l06aj4ibhdy45415yzgibin1jg9rqa6d"; #lqx isLqx = true; }; }; @@ -83,8 +83,6 @@ let HZ = freeform "1000"; HZ_1000 = yes; - # Alternative zpool for zswap - Z3FOLD = yes; } // lib.optionalAttrs (isLqx) { # Google's BBRv3 TCP congestion Control TCP_CONG_BBR = yes; @@ -101,7 +99,6 @@ let # Swap storage is compressed with LZ4 using zswap ZSWAP_COMPRESSOR_DEFAULT_LZ4 = lib.mkOptionDefault yes; ZSWAP_COMPRESSOR_DEFAULT_ZSTD = lib.mkDefault no; - ZSWAP_ZPOOL_DEFAULT_Z3FOLD = yes; # Fix error: unused option: XXX. CFS_BANDWIDTH = lib.mkForce (option no); @@ -120,7 +117,7 @@ let maintainers = with lib.maintainers; [ thiagokokada jerrysm64 ]; description = "Built using the best configuration and kernel sources for desktop, multimedia, and gaming workloads." + lib.optionalString isLqx " (Same as linux_zen, but less aggressive release schedule and additional extra config)"; - broken = stdenv.isAarch64; + broken = stdenv.hostPlatform.isAarch64; }; } // (args.argsOverride or { })); |