diff --git a/pkgs/os-specific/linux/kernel/linux-2.6.32.nix b/pkgs/os-specific/linux/kernel/linux-2.6.32.nix index 013dc24332c..3a4ae7feacf 100644 --- a/pkgs/os-specific/linux/kernel/linux-2.6.32.nix +++ b/pkgs/os-specific/linux/kernel/linux-2.6.32.nix @@ -1,11 +1,11 @@ -args @ { stdenv, fetchurl, userModeLinux ? false, extraConfig ? "" -, ... }: +args @ { stdenv, fetchurl, userModeLinux ? false, systemtap ? false +, extraConfig ? "", ... }: let configWithPlatform = kernelPlatform : '' # Don't include any debug features. - DEBUG_KERNEL n + DEBUG_KERNEL ${if systemtap then "y" else "n"} # Support drivers that need external firmware. STANDALONE n @@ -25,7 +25,6 @@ let # Disable some expensive (?) features. FTRACE n - KPROBES n NUMA? n PM_TRACE_RTC n @@ -191,6 +190,14 @@ let X86_CHECK_BIOS_CORRUPTION y X86_MCE y + ${if systemtap then '' + # SystemTap support. + KPROBES y # kernel probes (needs `utrace' for process probes) + DEBUG_INFO y + RELAY y + DEBUG_FS y + '' else ""} + ${if kernelPlatform ? kernelExtraConfig then kernelPlatform.kernelExtraConfig else ""} ${extraConfig} ''; diff --git a/pkgs/os-specific/linux/kernel/patches.nix b/pkgs/os-specific/linux/kernel/patches.nix index f1ac2a37895..70e2f017697 100644 --- a/pkgs/os-specific/linux/kernel/patches.nix +++ b/pkgs/os-specific/linux/kernel/patches.nix @@ -114,4 +114,26 @@ in ''; }; + tracehook_2_6_32 = + { # From . + name = "tracehook"; + patch = fetchurl { + url = http://people.redhat.com/roland/utrace/2.6.32/tracehook.patch; + sha256 = "1y009p8dyqknbjm8ryb495jqmvl372gfhswdn167xh2g1f24xqv8"; + }; + }; + + utrace_2_6_32 = + { # From , depends on the + # `tracehook' patch above. + # See also . + name = "utrace"; + patch = fetchurl { + url = http://people.redhat.com/roland/utrace/2.6.32/utrace.patch; + sha256 = "1951mwc8jfiwrl0d2bb1zk9yrl7n7kadc00ymjsxrg2irda1b89r"; + }; + extraConfig = + '' UTRACE y + ''; + }; } diff --git a/pkgs/top-level/all-packages.nix b/pkgs/top-level/all-packages.nix index 2f09392cebf..3e7e0e4b889 100644 --- a/pkgs/top-level/all-packages.nix +++ b/pkgs/top-level/all-packages.nix @@ -6143,6 +6143,17 @@ let ]; }; + linux_2_6_32_systemtap = makeOverridable (import ../os-specific/linux/kernel/linux-2.6.32.nix) { + inherit fetchurl stdenv perl mktemp module_init_tools ubootChooser; + systemtap = true; + kernelPatches = + [ kernelPatches.fbcondecor_2_6_31 + kernelPatches.sec_perm_2_6_24 + kernelPatches.tracehook_2_6_32 + kernelPatches.utrace_2_6_32 + ]; + }; + linux_2_6_32_zen4 = makeOverridable (import ../os-specific/linux/zen-kernel/2.6.32-zen4.nix) { inherit fetchurl stdenv perl mktemp module_init_tools runCommand xz; }; @@ -6324,6 +6335,8 @@ let linuxPackages_2_6_29 = recurseIntoAttrs (linuxPackagesFor linux_2_6_29); linuxPackages_2_6_31 = recurseIntoAttrs (linuxPackagesFor linux_2_6_31); linuxPackages_2_6_32 = recurseIntoAttrs (linuxPackagesFor linux_2_6_32); + linuxPackages_2_6_32_systemtap = + recurseIntoAttrs (linuxPackagesFor linux_2_6_32_systemtap); linuxPackages_2_6_33 = recurseIntoAttrs (linuxPackagesFor linux_2_6_33); # The current default kernel / kernel modules.