summaryrefslogtreecommitdiffstats
path: root/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb')
-rw-r--r--meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb44
1 files changed, 44 insertions, 0 deletions
diff --git a/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
new file mode 100644
index 0000000000..4d2bec4714
--- /dev/null
+++ b/meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb
@@ -0,0 +1,44 @@
1SUMMARY = "UProbes kernel module for SystemTap"
2
3require systemtap_git.inc
4
5DEPENDS = "systemtap virtual/kernel"
6
7PR = "r1"
8
9# On systems without CONFIG_UTRACE, this package is empty.
10ALLOW_EMPTY_${PN} = "1"
11
12inherit module-base gettext
13
14FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:"
15
16FILES_${PN} += "${datadir}/systemtap/runtime/uprobes"
17
18EXTRA_OEMAKE = ""
19
20# Compile and install the uprobes kernel module on machines with utrace
21# support. Note that staprun expects it in the systemtap/runtime directory,
22# not in /lib/modules.
23do_compile() {
24 if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_DIR}/.config
25 then
26 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP
27 oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
28 AR="${KERNEL_AR}" \
29 -C ${STAGING_KERNEL_DIR} scripts
30 oe_runmake KDIR=${STAGING_KERNEL_DIR} \
31 M="${S}/runtime/uprobes/" \
32 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
33 AR="${KERNEL_AR}" \
34 -C "${S}/runtime/uprobes/"
35 fi
36}
37
38do_install() {
39 if [ -e "${S}/runtime/uprobes/uprobes.ko" ]
40 then
41 install -d ${D}${datadir}/systemtap/runtime/uprobes/
42 install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}${datadir}/systemtap/runtime/uprobes/
43 fi
44}