mirror of
https://github.com/xddxdd/nix-cachyos-kernel.git
synced 2026-07-03 19:18:07 +02:00
Add latest kernel variants with processor specific tuning
This commit is contained in:
parent
5e9dafb25c
commit
4c556e1bc0
10
README.md
10
README.md
@ -13,8 +13,18 @@ This repo provides the following kernel variants, consistent with the [upstream
|
||||
```bash
|
||||
└───packages
|
||||
└───x86_64-linux
|
||||
# Latest kernel, provide all LTO/CPU arch variants
|
||||
├───linux-cachyos-latest
|
||||
├───linux-cachyos-latest-x86_64-v2
|
||||
├───linux-cachyos-latest-x86_64-v3
|
||||
├───linux-cachyos-latest-x86_64-v4
|
||||
├───linux-cachyos-latest-zen4
|
||||
├───linux-cachyos-latest-lto
|
||||
├───linux-cachyos-latest-lto-x86_64-v2
|
||||
├───linux-cachyos-latest-lto-x86_64-v3
|
||||
├───linux-cachyos-latest-lto-x86_64-v4
|
||||
├───linux-cachyos-latest-lto-zen4
|
||||
# LTS kernel, provide LTO variants
|
||||
├───linux-cachyos-lts
|
||||
├───linux-cachyos-lts-lto
|
||||
# Additional CachyOS kernel variants
|
||||
|
||||
@ -65,6 +65,38 @@ with lib.kernel;
|
||||
CPU_FREQ_DEFAULT_GOV_PERFORMANCE = yes;
|
||||
};
|
||||
|
||||
processorOpt = {
|
||||
x86_64-v1 = {
|
||||
GENERIC_CPU = yes;
|
||||
MZEN4 = no;
|
||||
X86_NATIVE_CPU = no;
|
||||
X86_64_VERSION = freeform "1";
|
||||
};
|
||||
x86_64-v2 = {
|
||||
GENERIC_CPU = yes;
|
||||
MZEN4 = no;
|
||||
X86_NATIVE_CPU = no;
|
||||
X86_64_VERSION = freeform "2";
|
||||
};
|
||||
x86_64-v3 = {
|
||||
GENERIC_CPU = yes;
|
||||
MZEN4 = no;
|
||||
X86_NATIVE_CPU = no;
|
||||
X86_64_VERSION = freeform "3";
|
||||
};
|
||||
x86_64-v4 = {
|
||||
GENERIC_CPU = yes;
|
||||
MZEN4 = no;
|
||||
X86_NATIVE_CPU = no;
|
||||
X86_64_VERSION = freeform "4";
|
||||
};
|
||||
zen4 = {
|
||||
GENERIC_CPU = no;
|
||||
MZEN4 = yes;
|
||||
X86_NATIVE_CPU = no;
|
||||
};
|
||||
};
|
||||
|
||||
tickrate = {
|
||||
periodic = {
|
||||
NO_HZ_IDLE = no;
|
||||
|
||||
@ -12,17 +12,72 @@ let
|
||||
in
|
||||
builtins.listToAttrs (
|
||||
builtins.map (v: lib.nameValuePair v.pname v) [
|
||||
# Latest kernel, provide all LTO/CPU arch variants
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-x86_64-v2";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
processorOpt = "x86_64-v2";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-x86_64-v3";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
processorOpt = "x86_64-v3";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-x86_64-v4";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
processorOpt = "x86_64-v4";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-zen4";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
processorOpt = "zen4";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-lto";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
lto = "thin";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-lto-x86_64-v2";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
lto = "thin";
|
||||
processorOpt = "x86_64-v2";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-lto-x86_64-v3";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
lto = "thin";
|
||||
processorOpt = "x86_64-v3";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-lto-x86_64-v4";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
lto = "thin";
|
||||
processorOpt = "x86_64-v4";
|
||||
})
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-latest-lto-zen4";
|
||||
inherit (linux_latest) version src;
|
||||
configVariant = "linux-cachyos";
|
||||
lto = "thin";
|
||||
processorOpt = "zen4";
|
||||
})
|
||||
|
||||
# LTS kernel
|
||||
(mkCachyKernel {
|
||||
pname = "linux-cachyos-lts";
|
||||
inherit (linux) version src;
|
||||
|
||||
@ -39,6 +39,7 @@ lib.makeOverridable (
|
||||
ccHarder ? true,
|
||||
bbr3 ? false,
|
||||
hugepage ? "always",
|
||||
processorOpt ? "x86_64-v1",
|
||||
|
||||
# CachyOS additional patch settings
|
||||
hardened ? false,
|
||||
@ -126,6 +127,7 @@ lib.makeOverridable (
|
||||
// (lib.optionalAttrs ccHarder cachySettings.ccHarder)
|
||||
// (lib.optionalAttrs bbr3 cachySettings.bbr3)
|
||||
// (lib.optionalAttrs (hugepage != null) cachySettings.hugepage."${hugepage}")
|
||||
// (lib.optionalAttrs (processorOpt != null) cachySettings.processorOpt.${processorOpt})
|
||||
))
|
||||
|
||||
# Apply user custom settings
|
||||
|
||||
Loading…
Reference in New Issue
Block a user