lttng-modules: new package
Add linux kernel modules needed to do kernel tracing with LTTng. To make them available to lttng in NixOS, add this to configuration.nix: boot.extraModulePackages = [ pkgs.linuxPackages.lttngModules ];
This commit is contained in:
parent
5a3a82d81c
commit
70ea99cfa8
31
pkgs/os-specific/linux/lttng-modules/default.nix
Normal file
31
pkgs/os-specific/linux/lttng-modules/default.nix
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
{ stdenv, fetchurl, kernelDev }:
|
||||||
|
|
||||||
|
stdenv.mkDerivation rec {
|
||||||
|
pname = "lttng-modules-2.2.1";
|
||||||
|
name = "${pname}-${kernelDev.version}";
|
||||||
|
|
||||||
|
src = fetchurl {
|
||||||
|
url = "https://lttng.org/files/lttng-modules/${pname}.tar.bz2";
|
||||||
|
sha256 = "00ww1443ssv614s1ix6zby8llaf6zzlxcf5k4w7jsyji47ng33m2";
|
||||||
|
};
|
||||||
|
|
||||||
|
patches = [ ./lttng-fix-build-error-on-linux-3.2.patch ];
|
||||||
|
|
||||||
|
preConfigure = ''
|
||||||
|
export KERNELDIR="${kernelDev}/lib/modules/${kernelDev.modDirVersion}/build"
|
||||||
|
export INSTALL_MOD_PATH="$out"
|
||||||
|
'';
|
||||||
|
|
||||||
|
installPhase = ''
|
||||||
|
make modules_install
|
||||||
|
'';
|
||||||
|
|
||||||
|
meta = with stdenv.lib; {
|
||||||
|
description = "Linux kernel modules for LTTng tracing";
|
||||||
|
homepage = http://lttng.org/;
|
||||||
|
license = with licenses; [ lgpl21 gpl2 mit ];
|
||||||
|
platforms = platforms.linux;
|
||||||
|
maintainers = [ maintainers.bjornfor ];
|
||||||
|
};
|
||||||
|
|
||||||
|
}
|
@ -0,0 +1,33 @@
|
|||||||
|
When building against linux 3.2, we get this build error:
|
||||||
|
|
||||||
|
building /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o
|
||||||
|
CC [M] /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.o
|
||||||
|
In file included from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/lttng-events.h:759:0,
|
||||||
|
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/define_trace.h:148,
|
||||||
|
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/ext3.h:868,
|
||||||
|
from /tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/lttng-probe-ext3.c:48:
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3__page_op':
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:240:1: error: dereferencing pointer to incomplete type
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h: In function '__event_probe__ext3_invalidatepage':
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
||||||
|
/tmp/nix-build-lttng-modules-2.2.0.drv-0/lttng-modules-2.2.0/probes/../instrumentation/events/lttng-module/../../../probes/../instrumentation/events/lttng-module/ext3.h:298:1: error: dereferencing pointer to incomplete type
|
||||||
|
|
||||||
|
because a check for existing ext3/*h files in the kernel build tree is skipped
|
||||||
|
for linux < 3.4. Fix it by extending the ext3_dep_check thing to also be run
|
||||||
|
when building against linux >= 3.2 (not only linux >= 3.4).
|
||||||
|
|
||||||
|
diff -uNr lttng-modules-2.2.0.orig/probes/Makefile lttng-modules-2.2.0/probes/Makefile
|
||||||
|
--- lttng-modules-2.2.0.orig/probes/Makefile 2013-06-19 03:22:44.000000000 +0200
|
||||||
|
+++ lttng-modules-2.2.0/probes/Makefile 2013-07-06 13:22:15.902957717 +0200
|
||||||
|
@@ -59,7 +59,7 @@
|
||||||
|
ext3_dep_check = $(wildcard $(ext3_dep))
|
||||||
|
ext3 = $(shell \
|
||||||
|
if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 1 ] ; then \
|
||||||
|
- if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 4 -a \
|
||||||
|
+ if [ $(VERSION) -ge 3 -a $(PATCHLEVEL) -ge 2 -a \
|
||||||
|
-z "$(ext3_dep_check)" ] ; then \
|
||||||
|
echo "warn" ; \
|
||||||
|
exit ; \
|
@ -6521,6 +6521,8 @@ let
|
|||||||
|
|
||||||
iwlwifi4965ucode = iwlwifi4965ucodeV2;
|
iwlwifi4965ucode = iwlwifi4965ucodeV2;
|
||||||
|
|
||||||
|
lttngModules = callPackage ../os-specific/linux/lttng-modules { };
|
||||||
|
|
||||||
atheros = callPackage ../os-specific/linux/atheros/0.9.4.nix { };
|
atheros = callPackage ../os-specific/linux/atheros/0.9.4.nix { };
|
||||||
|
|
||||||
broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { };
|
broadcom_sta = callPackage ../os-specific/linux/broadcom-sta/default.nix { };
|
||||||
|
Loading…
x
Reference in New Issue
Block a user