Add linux-rt-5.15
5.15 is the current stable rt kernel[^1]. I've defined it but I didn't change `stable` or `latest` since I assumed we'd want a testing period. I didn't see a pre-existing `next` or `testing` type label to use. [^1]: https://wiki.linuxfoundation.org/realtime/start
This commit is contained in:
parent
6e904178e0
commit
cb929a8951
45
pkgs/os-specific/linux/kernel/linux-rt-5.15.nix
Normal file
45
pkgs/os-specific/linux/kernel/linux-rt-5.15.nix
Normal file
|
@ -0,0 +1,45 @@
|
|||
{ lib, buildLinux, fetchurl
|
||||
, kernelPatches ? [ ]
|
||||
, structuredExtraConfig ? {}
|
||||
, extraMeta ? {}
|
||||
, argsOverride ? {}
|
||||
, ... } @ args:
|
||||
|
||||
let
|
||||
version = "5.15.79-rt54"; # updated by ./update-rt.sh
|
||||
branch = lib.versions.majorMinor version;
|
||||
kversion = builtins.elemAt (lib.splitString "-" version) 0;
|
||||
in buildLinux (args // {
|
||||
inherit version;
|
||||
|
||||
# modDirVersion needs a patch number, change X.Y-rtZ to X.Y.0-rtZ.
|
||||
modDirVersion = if (builtins.match "[^.]*[.][^.]*-.*" version) == null then version
|
||||
else lib.replaceStrings ["-"] [".0-"] version;
|
||||
|
||||
src = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/v5.x/linux-${kversion}.tar.xz";
|
||||
sha256 = "0m61k7k6lj24z9a266q08wzghggjik2wizcabdwd1vn0vcqr18yb";
|
||||
};
|
||||
|
||||
kernelPatches = let rt-patch = {
|
||||
name = "rt";
|
||||
patch = fetchurl {
|
||||
url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
|
||||
sha256 = "098dml58d2nf7qhwn1pznqk7wvsh83rh85gsw7nmn2dym08510p9";
|
||||
};
|
||||
}; in [ rt-patch ] ++ kernelPatches;
|
||||
|
||||
structuredExtraConfig = with lib.kernel; {
|
||||
PREEMPT_RT = yes;
|
||||
# Fix error: unused option: PREEMPT_RT.
|
||||
EXPERT = yes; # PREEMPT_RT depends on it (in kernel/Kconfig.preempt)
|
||||
# Fix error: option not set correctly: PREEMPT_VOLUNTARY (wanted 'y', got 'n').
|
||||
PREEMPT_VOLUNTARY = lib.mkForce no; # PREEMPT_RT deselects it.
|
||||
# Fix error: unused option: RT_GROUP_SCHED.
|
||||
RT_GROUP_SCHED = lib.mkForce (option no); # Removed by sched-disable-rt-group-sched-on-rt.patch.
|
||||
} // structuredExtraConfig;
|
||||
|
||||
extraMeta = extraMeta // {
|
||||
inherit branch;
|
||||
};
|
||||
} // argsOverride)
|
|
@ -822,6 +822,7 @@ mapAliases ({
|
|||
|
||||
# Linux kernels
|
||||
linux-rt_5_10 = linuxKernel.kernels.linux_rt_5_10;
|
||||
linux-rt_5_15 = linuxKernel.kernels.linux_rt_5_15;
|
||||
linux-rt_5_4 = linuxKernel.kernels.linux_rt_5_4;
|
||||
linuxPackages_4_14 = linuxKernel.packages.linux_4_14;
|
||||
linuxPackages_4_19 = linuxKernel.packages.linux_4_19;
|
||||
|
@ -841,6 +842,7 @@ mapAliases ({
|
|||
linuxPackages_rpi3 = linuxKernel.packages.linux_rpi3;
|
||||
linuxPackages_rpi4 = linuxKernel.packages.linux_rpi4;
|
||||
linuxPackages_rt_5_10 = linuxKernel.packages.linux_rt_5_10;
|
||||
linuxPackages_rt_5_15 = linuxKernel.packages.linux_rt_5_15;
|
||||
linuxPackages_rt_5_4 = linuxKernel.packages.linux_rt_5_4;
|
||||
linux_4_14 = linuxKernel.kernels.linux_4_14;
|
||||
linux_4_19 = linuxKernel.kernels.linux_4_19;
|
||||
|
|
|
@ -151,6 +151,14 @@ in {
|
|||
];
|
||||
};
|
||||
|
||||
linux_rt_5_15 = callPackage ../os-specific/linux/kernel/linux-rt-5.15.nix {
|
||||
kernelPatches = [
|
||||
kernelPatches.bridge_stp_helper
|
||||
kernelPatches.request_key_helper
|
||||
kernelPatches.export-rt-sched-migrate
|
||||
];
|
||||
};
|
||||
|
||||
linux_5_17 = throw "linux 5.17 was removed because it has reached its end of life upstream";
|
||||
|
||||
linux_5_18 = throw "linux 5.18 was removed because it has reached its end of life upstream";
|
||||
|
@ -526,6 +534,7 @@ in {
|
|||
# realtime kernel packages
|
||||
linux_rt_5_4 = packagesFor kernels.linux_rt_5_4;
|
||||
linux_rt_5_10 = packagesFor kernels.linux_rt_5_10;
|
||||
linux_rt_5_15 = packagesFor kernels.linux_rt_5_15;
|
||||
};
|
||||
|
||||
rpiPackages = {
|
||||
|
|
Loading…
Reference in a new issue