2021-11-12 21:54:23 +07:00
|
|
|
{ fetchFromGitHub, inputs, lib }:
|
2021-07-04 14:10:44 +07:00
|
|
|
let
|
2023-08-24 20:10:48 +07:00
|
|
|
version = "6.4.12";
|
|
|
|
|
kernelHash = "1wx7innfzlx508f7csfwp6k017wcljdy783pmi6a9v1c1j7mi84g";
|
|
|
|
|
kernelPatchHash = "0va10x241v5dmks5p3242j5ihyfiydb3qri4mh6cjg0803mpzmnw";
|
|
|
|
|
boreVersion = "3.1.2";
|
2021-07-04 14:10:44 +07:00
|
|
|
|
2022-10-03 22:12:14 +07:00
|
|
|
mm = lib.versions.majorMinor version;
|
2021-07-04 14:10:44 +07:00
|
|
|
tkgPatches = [
|
|
|
|
|
"0001-mm-Support-soft-dirty-flag-reset-for-VA-range"
|
|
|
|
|
"0002-clear-patches"
|
|
|
|
|
"0002-mm-Support-soft-dirty-flag-read-with-reset"
|
2023-08-24 20:10:48 +07:00
|
|
|
"0003-eevdf"
|
2021-07-04 14:10:44 +07:00
|
|
|
"0003-glitched-base"
|
2022-10-03 22:12:14 +07:00
|
|
|
"0003-glitched-cfs"
|
2021-11-12 21:54:23 +07:00
|
|
|
"0007-v${mm}-fsync1_via_futex_waitv"
|
2021-07-04 14:10:44 +07:00
|
|
|
"0007-v${mm}-winesync"
|
|
|
|
|
"0012-misc-additions"
|
|
|
|
|
];
|
|
|
|
|
|
|
|
|
|
patch = path: {
|
|
|
|
|
name = "patch-${path}";
|
|
|
|
|
patch = path;
|
|
|
|
|
};
|
2022-12-28 20:11:51 +07:00
|
|
|
kernelPatchSrc = {
|
|
|
|
|
name = "patch";
|
|
|
|
|
patch = builtins.fetchurl {
|
|
|
|
|
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/patch-${version}.xz";
|
|
|
|
|
sha256 = kernelPatchHash;
|
|
|
|
|
};
|
|
|
|
|
};
|
2022-10-03 22:12:14 +07:00
|
|
|
|
|
|
|
|
borePatch = {
|
|
|
|
|
name = "bore-patch";
|
2022-04-13 22:06:22 +07:00
|
|
|
patch = builtins.fetchurl {
|
2023-08-24 20:10:48 +07:00
|
|
|
url = "https://raw.githubusercontent.com/firelzrd/bore-scheduler/033cf689936a21af725207aa48f34076ac9a1f03/eevdf-bore-dev/0001-linux${mm}.y-eevdf-bore${boreVersion}.patch";
|
|
|
|
|
sha256 = "019n33kfkjyx3zq8vjkl3jgilybhh6bznfybzhgjlyhs3qlrrrgw";
|
2022-04-13 22:06:22 +07:00
|
|
|
};
|
|
|
|
|
};
|
2021-07-04 14:10:44 +07:00
|
|
|
in {
|
|
|
|
|
inherit version;
|
|
|
|
|
|
2022-02-02 17:18:47 +07:00
|
|
|
# src = builtins.fetchurl {
|
2022-04-13 22:06:22 +07:00
|
|
|
# url = "https://git.kernel.org/torvalds/t/linux-${mm}${rc}.tar.gz";
|
2022-02-02 17:18:47 +07:00
|
|
|
# sha256 = kernelHash;
|
|
|
|
|
# };
|
2022-04-13 22:06:22 +07:00
|
|
|
src = builtins.fetchurl {
|
|
|
|
|
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/linux-${mm}.tar.xz";
|
|
|
|
|
sha256 = kernelHash;
|
|
|
|
|
};
|
2021-07-04 14:10:44 +07:00
|
|
|
|
2021-07-10 01:09:36 +07:00
|
|
|
kernelPatches = [
|
2022-12-28 20:11:51 +07:00
|
|
|
kernelPatchSrc
|
2021-07-10 01:09:36 +07:00
|
|
|
]
|
2021-07-04 14:10:44 +07:00
|
|
|
++ builtins.map (name: {
|
|
|
|
|
inherit name;
|
2021-11-12 21:54:23 +07:00
|
|
|
patch = "${inputs.linux-tkg}/linux-tkg-patches/${mm}/${name}.patch";
|
2023-08-24 20:10:48 +07:00
|
|
|
}) tkgPatches
|
|
|
|
|
++ [
|
|
|
|
|
borePatch
|
|
|
|
|
];
|
2021-07-04 14:10:44 +07:00
|
|
|
}
|