separate kernel sources into a file, and bump - 5.13.0
much easier to update also slightly modified config: - use 2000hz tickless - disable ftrace
This commit is contained in:
parent
450fd2f355
commit
e379ff4799
2 changed files with 65 additions and 66 deletions
|
|
@ -1,32 +1,16 @@
|
||||||
{
|
{
|
||||||
buildLinux,
|
buildLinux,
|
||||||
|
callPackage,
|
||||||
kernelPatches,
|
kernelPatches,
|
||||||
lib,
|
lib,
|
||||||
...
|
...
|
||||||
} @ args:
|
} @ args:
|
||||||
|
|
||||||
let
|
let
|
||||||
major = "5";
|
sources = callPackage ./sources.nix {};
|
||||||
minor = "12";
|
|
||||||
patch = "13";
|
|
||||||
tkg = "2da317c20ed6f70085b195639b9aad2cacf31ab5";
|
|
||||||
|
|
||||||
mm = "${major}.${minor}";
|
|
||||||
mmp = "${major}.${minor}.${patch}";
|
|
||||||
|
|
||||||
kernelUrl = name: sha256: builtins.fetchurl {
|
|
||||||
inherit sha256;
|
|
||||||
url = "https://cdn.kernel.org/pub/linux/kernel/v${major}.x/${name}.xz";
|
|
||||||
};
|
|
||||||
|
|
||||||
tkgPatch = name: sha256: {
|
|
||||||
inherit name;
|
|
||||||
patch = builtins.fetchurl {
|
|
||||||
inherit sha256;
|
|
||||||
url = "https://raw.githubusercontent.com/Frogging-Family/linux-tkg/${tkg}/linux-tkg-patches/${mm}/${name}.patch";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
in buildLinux (args // {
|
in buildLinux (args // {
|
||||||
version = "${mmp}-tkg-Lava";
|
inherit (sources) src kernelPatches;
|
||||||
|
version = "${sources.version}-tkg-Lava";
|
||||||
isZen = true;
|
isZen = true;
|
||||||
# TODO:
|
# TODO:
|
||||||
# some stuff is set in pkgs/os-specific/linux/kernel/common-config.nix
|
# some stuff is set in pkgs/os-specific/linux/kernel/common-config.nix
|
||||||
|
|
@ -38,17 +22,17 @@ in buildLinux (args // {
|
||||||
MHASWELL = yes;
|
MHASWELL = yes;
|
||||||
WINESYNC = module;
|
WINESYNC = module;
|
||||||
|
|
||||||
# timers
|
# tickless timers
|
||||||
HZ_PERIODIC = no;
|
HZ_PERIODIC = no;
|
||||||
NO_HZ = yes;
|
NO_HZ = yes;
|
||||||
NO_HZ_COMMON = yes;
|
NO_HZ_COMMON = yes;
|
||||||
NO_HZ_FULL = yes;
|
NO_HZ_FULL = yes;
|
||||||
|
NO_HZ_FULL_NODEF = yes;
|
||||||
NO_HZ_IDLE = no;
|
NO_HZ_IDLE = no;
|
||||||
CONTEXT_TRACKING = yes;
|
CONTEXT_TRACKING = yes;
|
||||||
CONTEXT_TRACKING_FORCE = yes;
|
CONTEXT_TRACKING_FORCE = no;
|
||||||
# HZ_100 = yes;
|
HZ_2000 = yes;
|
||||||
HZ_1000 = yes;
|
HZ_2000_NODEF = yes;
|
||||||
HZ_1000_NODEF = yes;
|
|
||||||
|
|
||||||
# preempt
|
# preempt
|
||||||
PREEMPT = yes;
|
PREEMPT = yes;
|
||||||
|
|
@ -58,11 +42,7 @@ in buildLinux (args // {
|
||||||
PREEMPT_DYNAMIC = yes;
|
PREEMPT_DYNAMIC = yes;
|
||||||
|
|
||||||
# scheduler
|
# scheduler
|
||||||
# SCHED_ALT = yes;
|
|
||||||
# SCHED_PDS = yes;
|
|
||||||
CACULE_SCHED = yes;
|
CACULE_SCHED = yes;
|
||||||
|
|
||||||
# cacule stuff
|
|
||||||
SCHED_AUTOGROUP = yes;
|
SCHED_AUTOGROUP = yes;
|
||||||
BSD_PROCESS_ACCT = no;
|
BSD_PROCESS_ACCT = no;
|
||||||
TASK_XACCT = no;
|
TASK_XACCT = no;
|
||||||
|
|
@ -79,6 +59,10 @@ in buildLinux (args // {
|
||||||
USE_PERCPU_NUMA_NODE_ID = no;
|
USE_PERCPU_NUMA_NODE_ID = no;
|
||||||
ACPI_NUMA = no;
|
ACPI_NUMA = no;
|
||||||
|
|
||||||
|
# disable ftrace
|
||||||
|
FUNCTION_TRACER = no;
|
||||||
|
FUNCTION_GRAPH_TRACER = no;
|
||||||
|
|
||||||
# disable misc debugging
|
# disable misc debugging
|
||||||
SLUB_DEBUG = no;
|
SLUB_DEBUG = no;
|
||||||
PM_DEBUG = no;
|
PM_DEBUG = no;
|
||||||
|
|
@ -90,40 +74,4 @@ in buildLinux (args // {
|
||||||
DEBUG_PREEMPT = no;
|
DEBUG_PREEMPT = no;
|
||||||
};
|
};
|
||||||
ignoreConfigErrors = true;
|
ignoreConfigErrors = true;
|
||||||
|
|
||||||
src = kernelUrl "linux-${mm}.tar" "0rn3z942vjc7bixjw066rm6kcr0x0wzgxqfq1f6xd113pzrgc3bx";
|
|
||||||
kernelPatches = [
|
|
||||||
# Kernel version patch
|
|
||||||
{
|
|
||||||
name = "patch-${patch}";
|
|
||||||
patch = kernelUrl "patch-${mmp}" "17d38hns5qfbw1pajpa5y38v86r49nqnw7a3pwsay5fapj69z8w4";
|
|
||||||
}
|
|
||||||
|
|
||||||
# AMD SI manual clocking
|
|
||||||
{
|
|
||||||
name = "si-clock";
|
|
||||||
patch = ./si-manual-clocking.patch;
|
|
||||||
}
|
|
||||||
|
|
||||||
# Graysky gcc patches
|
|
||||||
{
|
|
||||||
name = "graysky-gcc";
|
|
||||||
patch = builtins.fetchurl {
|
|
||||||
url = "https://raw.githubusercontent.com/graysky2/kernel_gcc_patch/d2e7942c19ee568638d3795cf52db5274a90ce0a/more-uarches-for-kernel-5.8+.patch";
|
|
||||||
sha256 = "16jbknjlg12jxbj8cjkk01djvr01n9zz7qlzxppcqizmz55vk0wh";
|
|
||||||
};
|
|
||||||
}
|
|
||||||
|
|
||||||
# TK-Glitch patches
|
|
||||||
( tkgPatch "0002-clear-patches" "1h1gx6rq2c961d36z1szqv9xpq1xgz2bhqjsyb03jjdrdzlcv9rm" )
|
|
||||||
( tkgPatch "0003-cacule-${mm}" "1rgdk1x514xsjwcjjcdmggbaj6biql5p41skn98ysqbjaw7k22ib" )
|
|
||||||
( tkgPatch "0003-glitched-base" "1dg177i3y54z5nadc5678hm67angram2vlr314mpxv3jgsh7vj8s" )
|
|
||||||
( tkgPatch "0003-glitched-cfs" "1cm4s72pymxnh37da84qrzvrwbbwagk46m1xsk99ir7cjb1l1zay" )
|
|
||||||
# ( tkgPatch "0005-glitched-pds" "0833awp8n9ngyl5spx8znwyw1lj3nacp8vg7ffysw0j5r8akv9pw" )
|
|
||||||
( tkgPatch "0007-v${mm}-fsync" "0mplwdglw58bmkkxix4ccwgax3r02gahax9042dx33mybdnbl0mk" )
|
|
||||||
( tkgPatch "0007-v${mm}-futex2_interface" "1j29zyx2s85scfhbprgb9cs11rp50glbzczl4plphli8wds342pw" )
|
|
||||||
( tkgPatch "0007-v${mm}-winesync" "1av2k86ns0zc3lmgbfdch1z2a808brp2jvsfl4cwwlwwb51qzipp" )
|
|
||||||
# ( tkgPatch "0009-prjc_v${mm}-r1" "1z731jiwyc7z4d5hzd6szrxnvw0iygbqx82y2anzm32n22731dqv" )
|
|
||||||
( tkgPatch "0012-misc-additions" "092ws9v1snk61i6x3gbqm5m803zd81wykkdxizn7knvy2r611cbz")
|
|
||||||
];
|
|
||||||
} // (args.argsOverride or {}))
|
} // (args.argsOverride or {}))
|
||||||
|
|
|
||||||
51
packages/linux-lava/sources.nix
Normal file
51
packages/linux-lava/sources.nix
Normal file
|
|
@ -0,0 +1,51 @@
|
||||||
|
{ fetchFromGitHub, lib }:
|
||||||
|
let
|
||||||
|
version = "5.13.0";
|
||||||
|
kernelHash = "1nc9didbjlycs9h8xahny1gwl8m8clylybnza6gl663myfbslsrz";
|
||||||
|
kernelPatchHash = "";
|
||||||
|
tkgRev = "1137522351b2044de4ac9edc6675b3dcb3de504a";
|
||||||
|
tkgHash = "118hvwjjc71gh8jsyswpbap90fmqczcknxdf7bvyn7cgacaix7bq";
|
||||||
|
|
||||||
|
tkgPatches = [
|
||||||
|
"0001-mm-Support-soft-dirty-flag-reset-for-VA-range"
|
||||||
|
"0002-clear-patches"
|
||||||
|
"0002-mm-Support-soft-dirty-flag-read-with-reset"
|
||||||
|
"0003-cacule-${mm}"
|
||||||
|
"0003-glitched-base"
|
||||||
|
"0003-glitched-cfs"
|
||||||
|
#"0007-v${mm}-fsync"
|
||||||
|
"0007-v${mm}-futex2_interface"
|
||||||
|
"0007-v${mm}-winesync"
|
||||||
|
"0012-misc-additions"
|
||||||
|
];
|
||||||
|
|
||||||
|
|
||||||
|
patch = path: {
|
||||||
|
name = "patch-${path}";
|
||||||
|
patch = path;
|
||||||
|
};
|
||||||
|
tkgSrc = fetchFromGitHub {
|
||||||
|
owner = "Frogging-Family";
|
||||||
|
repo = "linux-tkg";
|
||||||
|
rev = tkgRev;
|
||||||
|
sha256 = tkgHash;
|
||||||
|
};
|
||||||
|
mm = lib.versions.majorMinor version;
|
||||||
|
in {
|
||||||
|
inherit version;
|
||||||
|
|
||||||
|
src = builtins.fetchurl {
|
||||||
|
url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/linux-${mm}.tar.xz";
|
||||||
|
sha256 = kernelHash;
|
||||||
|
};
|
||||||
|
|
||||||
|
kernelPatches = [(patch ./si-manual-clocking.patch)]
|
||||||
|
# ++ [(builtins.fetchurl {
|
||||||
|
# url = "https://cdn.kernel.org/pub/linux/kernel/v${lib.versions.major version}.x/patch${version}.xz";
|
||||||
|
# sha256 = kernelPatchHash;
|
||||||
|
# })]
|
||||||
|
++ builtins.map (name: {
|
||||||
|
inherit name;
|
||||||
|
patch = "${tkgSrc}/linux-tkg-patches/${mm}/${name}.patch";
|
||||||
|
}) tkgPatches;
|
||||||
|
}
|
||||||
Loading…
Add table
Add a link
Reference in a new issue