41 lines
1.6 KiB
Nix
41 lines
1.6 KiB
Nix
{ lib, linuxKernel, linuxPackagesFor, writeText, buildPackages, fetchurl, fetchFromGitHub, raspberrypifw, ... }: rec {
|
|
kernel = linuxKernel.kernels.linux_rpi4.override {
|
|
argsOverride = rec {
|
|
modDirVersion = "6.1.54-rt15";
|
|
version = "${modDirVersion}-notag";
|
|
src = fetchFromGitHub {
|
|
owner = "raspberrypi";
|
|
repo = "linux";
|
|
rev = "cc08810f89e52337a99cc6ae5f53f08588357c5f";
|
|
sha256 = "xHTGJRIdfN4pzxmMWgPOOs57oDA5WblWrye0NRTAhnw=";
|
|
};
|
|
kernelPatches = [{
|
|
name = "rt";
|
|
patch = fetchurl {
|
|
url = "https://cdn.kernel.org/pub/linux/kernel/projects/rt/6.1/patch-6.1.54-rt15.patch.xz";
|
|
sha256 = "cKIh4BcK2hf/iaql2hF9QAgC90HSmGijnEY8GEOLDUY=";
|
|
};
|
|
}] ++ linuxKernel.kernels.linux_rpi4.kernelPatches;
|
|
structuredExtraConfig = with lib.kernel; {
|
|
#KVM = lib.mkForce no; # Not compatible with PREEMPT_RT. NOTE: this conflict shoulb be fixed in 5.16
|
|
PREEMPT_RT = yes;
|
|
EXPERT = yes; # PREEMPT_RT depends on it (in kernel/Kconfig.preempt)
|
|
PREEMPT_VOLUNTARY = lib.mkForce no; # PREEMPT_RT deselects it.
|
|
RT_GROUP_SCHED = lib.mkForce (option no); # Removed by sched-disable-rt-group-sched-on-rt.patch.
|
|
} // linuxKernel.kernels.linux_rpi4.structuredExtraConfig;
|
|
};
|
|
};
|
|
|
|
linuxPackages = (linuxPackagesFor kernel);
|
|
|
|
firmware = raspberrypifw.overrideAttrs (old: rec {
|
|
version = "notag";
|
|
src = fetchFromGitHub {
|
|
owner = "raspberrypi";
|
|
repo = "firmware";
|
|
rev = "6b37a457122714aa14b2c7df0926455173fd04f1";
|
|
sha256 = "E2W3ft2bSi4/qM0TujEUXT0kwpWIxUa9NeEmEyFo4Ow=";
|
|
};
|
|
});
|
|
}
|