2023-05-05 20:18:01 +02:00
|
|
|
{ pkgs, lib, ... }:
|
|
|
|
|
|
|
|
let
|
|
|
|
#fcs-devel = pkgs.linuxPackages_custom {
|
|
|
|
# version = "6.2.8";
|
|
|
|
# src = /mnt/data/kernel/fcs/kernel/src;
|
|
|
|
# configfile = /mnt/data/kernel/fcs/kernel/configs/defconfig;
|
|
|
|
#};
|
|
|
|
|
|
|
|
#fcsv1 = fcs-kernel "bc11660676d3d68ce2459b9fb5d5e654e3f413be" false;
|
|
|
|
#fcsv2 = fcs-kernel "db0f2eca0cd57a58bf456d7d2c7d5d8fdb25dfb1" false;
|
|
|
|
#fcsv1-lockdep = fcs-kernel "bc11660676d3d68ce2459b9fb5d5e654e3f413be" true;
|
|
|
|
#fcsv2-lockdep = fcs-kernel "db0f2eca0cd57a58bf456d7d2c7d5d8fdb25dfb1" true;
|
|
|
|
#fcs-kernel = gitCommit: lockdep: pkgs.linuxPackages_custom {
|
|
|
|
# version = "6.2.8";
|
|
|
|
# src = builtins.fetchGit {
|
|
|
|
# url = "git@bscpm03.bsc.es:ompss-kernel/linux.git";
|
|
|
|
# rev = gitCommit;
|
|
|
|
# ref = "fcs";
|
|
|
|
# };
|
|
|
|
# configfile = if lockdep then ./configs/lockdep else ./configs/defconfig;
|
|
|
|
#};
|
|
|
|
|
2024-07-16 17:36:21 +02:00
|
|
|
kernel = nixos-fcs;
|
2023-05-05 20:18:01 +02:00
|
|
|
|
2024-07-16 17:36:21 +02:00
|
|
|
nixos-fcs-kernel = lib.makeOverridable ({gitCommit, lockStat ? false, preempt ? false, branch ? "fcs"}: pkgs.linuxPackagesFor (pkgs.buildLinux rec {
|
2023-05-05 20:18:01 +02:00
|
|
|
version = "6.2.8";
|
|
|
|
src = builtins.fetchGit {
|
|
|
|
url = "git@bscpm03.bsc.es:ompss-kernel/linux.git";
|
|
|
|
rev = gitCommit;
|
2023-07-12 13:22:42 +02:00
|
|
|
ref = branch;
|
2023-05-05 20:18:01 +02:00
|
|
|
};
|
|
|
|
structuredExtraConfig = with lib.kernel; {
|
2023-06-12 17:16:01 +02:00
|
|
|
# add general custom kernel options here
|
2023-05-05 20:18:01 +02:00
|
|
|
} // lib.optionalAttrs lockStat {
|
|
|
|
LOCK_STAT = yes;
|
2023-06-12 17:16:01 +02:00
|
|
|
} // lib.optionalAttrs preempt {
|
|
|
|
PREEMPT = lib.mkForce yes;
|
|
|
|
PREEMPT_VOLUNTARY = lib.mkForce no;
|
2023-05-05 20:18:01 +02:00
|
|
|
};
|
|
|
|
kernelPatches = [];
|
|
|
|
extraMeta.branch = lib.versions.majorMinor version;
|
2024-07-16 17:36:21 +02:00
|
|
|
}));
|
2023-05-05 20:18:01 +02:00
|
|
|
|
2024-07-16 17:36:21 +02:00
|
|
|
nixos-fcs = nixos-fcs-kernel {gitCommit = "8a09822dfcc8f0626b209d6d2aec8b5da459dfee";};
|
|
|
|
nixos-fcs-lockstat = nixos-fcs.override {
|
2023-07-12 13:22:42 +02:00
|
|
|
lockStat = true;
|
|
|
|
};
|
2024-07-16 17:36:21 +02:00
|
|
|
nixos-fcs-lockstat-preempt = nixos-fcs.override {
|
2023-06-12 17:16:01 +02:00
|
|
|
lockStat = true;
|
|
|
|
preempt = true;
|
|
|
|
};
|
2023-05-05 20:18:01 +02:00
|
|
|
latest = pkgs.linuxPackages_latest;
|
|
|
|
|
|
|
|
in {
|
2023-06-07 19:52:24 +02:00
|
|
|
imports = [
|
|
|
|
./lttng.nix
|
2023-06-09 10:58:11 +02:00
|
|
|
./perf.nix
|
2023-06-07 19:52:24 +02:00
|
|
|
];
|
2023-05-05 20:18:01 +02:00
|
|
|
boot.kernelPackages = lib.mkForce kernel;
|
2023-06-29 09:14:39 +02:00
|
|
|
|
|
|
|
# disable all cpu mitigations
|
|
|
|
boot.kernelParams = [
|
|
|
|
"mitigations=off"
|
|
|
|
];
|
2023-06-30 12:49:44 +02:00
|
|
|
|
|
|
|
# enable memory overcommit, needed to build a taglibc system using nix after
|
|
|
|
# increasing the openblas memory footprint
|
|
|
|
boot.kernel.sysctl."vm.overcommit_memory" = 1;
|
2023-05-05 20:18:01 +02:00
|
|
|
}
|