blob: b05cad6be723aff9a16895f24a6365387feeadb4 [file] [log] [blame]
Andrew Geissler595f6302022-01-24 19:11:47 +00001SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
3DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
4HOMEPAGE = "https://lttng.org/"
5LICENSE = "LGPLv2.1 & GPLv2 & MIT"
6LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
7
8inherit module
9
10include lttng-platforms.inc
11
12SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
13 "
14# Use :append here so that the patch is applied also when using devupstream
15SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
16
17SRC_URI[sha256sum] = "a7c86d91c9bbe66d27f025aa04b8cfc6d7785ed2fc7ef774930800ee44d7f343"
18
19export INSTALL_MOD_DIR="kernel/lttng-modules"
20
21EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
22
23MODULES_MODULE_SYMVERS_LOCATION = "src"
24
25do_install:append() {
26 # Delete empty directories to avoid QA failures if no modules were built
27 if [ -d ${D}/${nonarch_base_libdir} ]; then
28 find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
29 fi
30}
31
32python do_package:prepend() {
33 if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
34 bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
35}
36
37BBCLASSEXTEND = "devupstream:target"
38LIC_FILES_CHKSUM:class-devupstream = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
39DEFAULT_PREFERENCE:class-devupstream = "-1"
40SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13"
41
42SRCREV:class-devupstream = "c570be0da77e963d77bac099d468bc0cd5f1bd63"
43PV:class-devupstream = "2.13.0+git${SRCPV}"
44S:class-devupstream = "${WORKDIR}/git"
45SRCREV_FORMAT ?= "lttng_git"