blob: 72d912eaf63a615b3c8364631d5e6144643ed247 [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
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050012SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2"
13# Use :append here so that the patch is applied also when using devupstream
14SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch"
Andrew Geissler82c905d2020-04-13 13:39:40 -050015
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050016SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356"
Andrew Geissler82c905d2020-04-13 13:39:40 -050017
18export INSTALL_MOD_DIR="kernel/lttng-modules"
19
20EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
21
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050022MODULES_MODULE_SYMVERS_LOCATION = "src"
23
Patrick Williams213cb262021-08-07 19:21:33 -050024do_install:append() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050025 # Delete empty directories to avoid QA failures if no modules were built
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050026 if [ -d ${D}/${nonarch_base_libdir} ]; then
27 find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
28 fi
Andrew Geissler82c905d2020-04-13 13:39:40 -050029}
30
Patrick Williams213cb262021-08-07 19:21:33 -050031python do_package:prepend() {
Andrew Geissler82c905d2020-04-13 13:39:40 -050032 if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
33 bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
34}
35
36BBCLASSEXTEND = "devupstream:target"
Patrick Williams213cb262021-08-07 19:21:33 -050037LIC_FILES_CHKSUM:class-devupstream = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4"
38DEFAULT_PREFERENCE:class-devupstream = "-1"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -050039SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13"
Andrew Geissler95ac1b82021-03-31 14:34:31 -050040
Patrick Williams213cb262021-08-07 19:21:33 -050041SRCREV:class-devupstream = "f982b51a98a29cb4aaf607cb9bbf2b509d8e6933"
42PV:class-devupstream = "2.13.0-rc2+git${SRCPV}"
43S:class-devupstream = "${WORKDIR}/git"
Andrew Geissler82c905d2020-04-13 13:39:40 -050044SRCREV_FORMAT ?= "lttng_git"