1 { lib, buildLinux, fetchurl
3 , structuredExtraConfig ? {}
9 version = "6.1.112-rt43"; # updated by ./update-rt.sh
10 branch = lib.versions.majorMinor version;
11 kversion = builtins.elemAt (lib.splitString "-" version) 0;
12 in buildLinux (args // {
16 # modDirVersion needs a patch number, change X.Y-rtZ to X.Y.0-rtZ.
17 modDirVersion = if (builtins.match "[^.]*[.][^.]*-.*" version) == null then version
18 else lib.replaceStrings ["-"] [".0-"] version;
21 url = "mirror://kernel/linux/kernel/v6.x/linux-${kversion}.tar.xz";
22 sha256 = "094z3wfcxqx2rbi072i5frshpy6rdvk39aahwm9nc07vc8sxxn4b";
25 kernelPatches = let rt-patch = {
28 url = "mirror://kernel/linux/kernel/projects/rt/${branch}/older/patch-${version}.patch.xz";
29 sha256 = "0qvil92xkbwmyrmj0zlg0ssg95ncscmr4ga4380903bqhhh74d6h";
31 }; in [ rt-patch ] ++ kernelPatches;
33 structuredExtraConfig = with lib.kernel; {
35 # Fix error: unused option: PREEMPT_RT.
36 EXPERT = yes; # PREEMPT_RT depends on it (in kernel/Kconfig.preempt)
37 # Fix error: option not set correctly: PREEMPT_VOLUNTARY (wanted 'y', got 'n').
38 PREEMPT_VOLUNTARY = lib.mkForce no; # PREEMPT_RT deselects it.
39 # Fix error: unused option: RT_GROUP_SCHED.
40 RT_GROUP_SCHED = lib.mkForce (option no); # Removed by sched-disable-rt-group-sched-on-rt.patch.
41 } // structuredExtraConfig;
43 extraMeta = extraMeta // {