blob: 6dfde8dcad5083b5de051fbdae439b4b2499ad3d [file] [log] [blame]
Andrew Geissler82c905d2020-04-13 13:39:40 -05001SECTION = "devel"
2SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
3DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
Andrew Geissler90fd73c2021-03-05 15:25:55 -06004HOMEPAGE = "https://lttng.org/"
Andrew Geissler82c905d2020-04-13 13:39:40 -05005LICENSE = "LGPLv2.1 & GPLv2 & MIT"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05006LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
Andrew Geissler82c905d2020-04-13 13:39:40 -05007
8inherit module
9
Andrew Geisslerc9f78652020-09-18 14:11:35 -050010include lttng-platforms.inc
Andrew Geissler82c905d2020-04-13 13:39:40 -050011
Patrick Williams93c203f2021-10-06 16:15:23 -050012SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \
13 file://0001-fix-cpu-hotplug-Remove-deprecated-CPU-hotplug-functi.patch \
14 file://0002-fix-Revert-Makefile-Enable-Wimplicit-fallthrough-for.patch \
15 "
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050016# Use :append here so that the patch is applied also when using devupstream
17SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
Andrew Geissler82c905d2020-04-13 13:39:40 -050018
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050019SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356"
Andrew Geissler82c905d2020-04-13 13:39:40 -050020
21export INSTALL_MOD_DIR="kernel/lttng-modules"
22
23EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
24
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050025MODULES_MODULE_SYMVERS_LOCATION = "src"
26
Patrick Williams213cb262021-08-07 19:21:33 -050027do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050028 # Delete empty directories to avoid QA failures if no modules were built
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050029 if [ -d ${D}/${nonarch_base_libdir} ]; then
30 find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
31 fi
Andrew Geissler82c905d2020-04-13 13:39:40 -050032}
33
Patrick Williams213cb262021-08-07 19:21:33 -050034python do_package:prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050035 if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
36 bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
37}
38
39BBCLASSEXTEND = "devupstream:target"
Patrick Williams213cb262021-08-07 19:21:33 -050040LIC_FILES_CHKSUM:class-devupstream = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
41DEFAULT_PREFERENCE:class-devupstream = "-1"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050042SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13"
Andrew Geissler95ac1b82021-03-31 14:34:31 -050043
Patrick Williams93c203f2021-10-06 16:15:23 -050044SRCREV:class-devupstream = "c570be0da77e963d77bac099d468bc0cd5f1bd63"
45PV:class-devupstream = "2.13.0+git${SRCPV}"
Patrick Williams213cb262021-08-07 19:21:33 -050046S:class-devupstream = "${WORKDIR}/git"
Andrew Geissler82c905d2020-04-13 13:39:40 -050047SRCREV_FORMAT ?= "lttng_git"