diff options
Diffstat (limited to 'meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb')
-rw-r--r-- | meta/recipes-kernel/systemtap/systemtap-uprobes_git.bb | 44 |
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 @@ | |||
1 | SUMMARY = "UProbes kernel module for SystemTap" | ||
2 | |||
3 | require systemtap_git.inc | ||
4 | |||
5 | DEPENDS = "systemtap virtual/kernel" | ||
6 | |||
7 | PR = "r1" | ||
8 | |||
9 | # On systems without CONFIG_UTRACE, this package is empty. | ||
10 | ALLOW_EMPTY_${PN} = "1" | ||
11 | |||
12 | inherit module-base gettext | ||
13 | |||
14 | FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:" | ||
15 | |||
16 | FILES_${PN} += "${datadir}/systemtap/runtime/uprobes" | ||
17 | |||
18 | EXTRA_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. | ||
23 | do_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 | |||
38 | do_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 | } | ||