Add a Linux kernel suitable for SystemTap.
svn path=/nixpkgs/trunk/; revision=21618
This commit is contained in:
parent
83609f6191
commit
588be9d6db
@ -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}
|
||||
'';
|
||||
|
@ -114,4 +114,26 @@ in
|
||||
'';
|
||||
};
|
||||
|
||||
tracehook_2_6_32 =
|
||||
{ # From <http://people.redhat.com/roland/utrace/>.
|
||||
name = "tracehook";
|
||||
patch = fetchurl {
|
||||
url = http://people.redhat.com/roland/utrace/2.6.32/tracehook.patch;
|
||||
sha256 = "1y009p8dyqknbjm8ryb495jqmvl372gfhswdn167xh2g1f24xqv8";
|
||||
};
|
||||
};
|
||||
|
||||
utrace_2_6_32 =
|
||||
{ # From <http://people.redhat.com/roland/utrace/>, depends on the
|
||||
# `tracehook' patch above.
|
||||
# See also <http://sourceware.org/systemtap/wiki/utrace>.
|
||||
name = "utrace";
|
||||
patch = fetchurl {
|
||||
url = http://people.redhat.com/roland/utrace/2.6.32/utrace.patch;
|
||||
sha256 = "1951mwc8jfiwrl0d2bb1zk9yrl7n7kadc00ymjsxrg2irda1b89r";
|
||||
};
|
||||
extraConfig =
|
||||
'' UTRACE y
|
||||
'';
|
||||
};
|
||||
}
|
||||
|
@ -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.
|
||||
|
Loading…
Reference in New Issue
Block a user