1SUMMARY = "UProbes kernel module for SystemTap" 2HOMEPAGE = "https://sourceware.org/systemtap/" 3require systemtap_git.inc 4 5DEPENDS = "systemtap virtual/kernel" 6 7# On systems without CONFIG_UTRACE, this package is empty. 8ALLOW_EMPTY:${PN} = "1" 9 10inherit module-base gettext 11 12FILESEXTRAPATHS =. "${FILE_DIRNAME}/systemtap:" 13 14FILES:${PN} += "${datadir}/systemtap/runtime/uprobes" 15 16# Compile and install the uprobes kernel module on machines with utrace 17# support. Note that staprun expects it in the systemtap/runtime directory, 18# not in /lib/modules. 19do_compile() { 20 if grep -q "CONFIG_UTRACE=y" ${STAGING_KERNEL_BUILDDIR}/.config 21 then 22 unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS CC LD CPP 23 oe_runmake CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ 24 AR="${KERNEL_AR}" \ 25 -C ${STAGING_KERNEL_DIR} scripts 26 oe_runmake KDIR=${STAGING_KERNEL_DIR} \ 27 M="${S}/runtime/uprobes/" \ 28 CC="${KERNEL_CC}" LD="${KERNEL_LD}" \ 29 AR="${KERNEL_AR}" \ 30 -C "${S}/runtime/uprobes/" 31 fi 32} 33 34do_install() { 35 if [ -e "${S}/runtime/uprobes/uprobes.ko" ] 36 then 37 install -d ${D}${datadir}/systemtap/runtime/uprobes/ 38 install -m 0644 ${S}/runtime/uprobes/uprobes.ko ${D}${datadir}/systemtap/runtime/uprobes/ 39 fi 40} 41