diff --git a/nix/kernel-source.nix b/nix/kernel-source.nix index 3075083..ab8ab47 100644 --- a/nix/kernel-source.nix +++ b/nix/kernel-source.nix @@ -25,21 +25,25 @@ { pkgs , lib ? pkgs.lib -, enableGdb -, version +, tag +, version ? tag , sha256 +, source +, ... }: let localVersion = "-ukci"; + sources = { + mirror = "mirror://kernel/linux/kernel/v6.x/linux-${tag}.tar.xz"; + linus = "https://github.com/torvalds/linux/archive/refs/tags/${tag}.tar.gz"; + }; in { kernelArgs = { - inherit enableGdb; - inherit version; src = pkgs.fetchurl { - url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; + url = sources.${source}; inherit sha256; }; @@ -159,7 +163,9 @@ in ACPI = yes; ## BPF - DEBUG_INFO_DWARF4 = yes; + DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = yes; + DEBUG_INFO_SPLIT = no; + DEBUG_INFO_REDUCED = no; DEBUG_INFO_BTF = yes; BPF_SYSCALL = yes; BPF_JIT = yes; @@ -168,9 +174,6 @@ in # Debug FS is be enabled (done above) to show registered kprobes in /sys/kernel/debug: https://www.kernel.org/doc/html/latest/trace/kprobes.html#the-kprobes-debugfs-interface KPROBES = yes; KALLSYMS_ALL = yes; - } // lib.optionalAttrs enableGdb { - DEBUG_INFO_DWARF_TOOLCHAIN_DEFAULT = yes; - GDB_SCRIPTS = yes; }; # Flags that get passed to generate-config.pl diff --git a/nix/ukci.nix b/nix/ukci.nix index 0bd79e5..8cfef06 100644 --- a/nix/ukci.nix +++ b/nix/ukci.nix @@ -5,13 +5,16 @@ localFlake: perSystem = { self', system, pkgs, ... }: { packages = let - sources = [{ name = "6.6lts"; version = "6.6.58"; sha256 = "sha256-59+B5YjXD6tew+w7sErFPVHwhg/DsexF4KQWegJomds="; } - { name = "6.1lts"; version = "6.1.113"; sha256 = "sha256-VK8QhxkvzFJQpCUUUf1hR2GFnT2WREncAjWOVYxEnjA="; } - { name = "6.11"; version = "6.11.5"; sha256 = "sha256-RxSFs7fy+2N72P49AJRMTBNcfY7gLzV/M2kLqrB1Kgc="; }]; + sources = [ + { name = "6.6lts"; tag = "6.6.58"; source = "mirror"; sha256 = "sha256-59+B5YjXD6tew+w7sErFPVHwhg/DsexF4KQWegJomds="; } + { name = "6.1lts"; tag = "6.1.113"; source = "mirror"; sha256 = "sha256-VK8QhxkvzFJQpCUUUf1hR2GFnT2WREncAjWOVYxEnjA="; } + { name = "6.11"; tag = "6.11.5"; source = "mirror"; sha256 = "sha256-RxSFs7fy+2N72P49AJRMTBNcfY7gLzV/M2kLqrB1Kgc="; } + { name = "6.12rc"; tag = "v6.12-rc5"; version = "6.12.0-rc5"; source = "linus"; sha256 = "sha256-AvTQCJKdjWKvKhzVhbTcWMDHpCeFVRW3gy7LNPbzhbE="; } + ]; nixpkgs = localFlake.nixpkgs; configureKernel = pkgs.callPackage ./kernel-configure.nix { }; buildKernel = pkgs.callPackage ./kernel-build.nix { }; - kernelNixConfig = source: pkgs.callPackage ./kernel-source.nix { enableGdb = false; inherit (source) version sha256; }; + kernelNixConfig = source: pkgs.callPackage ./kernel-source.nix source; kernels = map (source: let @@ -33,7 +36,6 @@ localFlake: src modDirVersion version - enableGdb kernelPatches ; inherit configfile nixpkgs;