Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 1 | SECTION = "devel" |
| 2 | SUMMARY = "Linux Trace Toolkit KERNEL MODULE" |
| 3 | DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules" |
Andrew Geissler | 90fd73c | 2021-03-05 15:25:55 -0600 | [diff] [blame] | 4 | HOMEPAGE = "https://lttng.org/" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 5 | LICENSE = "LGPLv2.1 & GPLv2 & MIT" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 6 | LIC_FILES_CHKSUM = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 7 | |
| 8 | inherit module |
| 9 | |
Andrew Geissler | c9f7865 | 2020-09-18 14:11:35 -0500 | [diff] [blame] | 10 | include lttng-platforms.inc |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 11 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 12 | SRC_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 Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 16 | # Use :append here so that the patch is applied also when using devupstream |
| 17 | SRC_URI:append = " file://0001-src-Kbuild-change-missing-CONFIG_TRACEPOINTS-to-warn.patch" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 18 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 19 | SRC_URI[sha256sum] = "5ebf2b3cd128b3a1c8afaea1e98d5a6f7f0676fd524fcf72361c34d9dc603356" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 20 | |
| 21 | export INSTALL_MOD_DIR="kernel/lttng-modules" |
| 22 | |
| 23 | EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'" |
| 24 | |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 25 | MODULES_MODULE_SYMVERS_LOCATION = "src" |
| 26 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 27 | do_install:append() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 28 | # Delete empty directories to avoid QA failures if no modules were built |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 29 | if [ -d ${D}/${nonarch_base_libdir} ]; then |
| 30 | find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \; |
| 31 | fi |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 32 | } |
| 33 | |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 34 | python do_package:prepend() { |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 35 | 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 | |
| 39 | BBCLASSEXTEND = "devupstream:target" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 40 | LIC_FILES_CHKSUM:class-devupstream = "file://LICENSE;md5=0464cff101a009c403cd2ed65d01d4c4" |
| 41 | DEFAULT_PREFERENCE:class-devupstream = "-1" |
Andrew Geissler | d159c7f | 2021-09-02 21:05:58 -0500 | [diff] [blame] | 42 | SRC_URI:class-devupstream = "git://git.lttng.org/lttng-modules;branch=stable-2.13" |
Andrew Geissler | 95ac1b8 | 2021-03-31 14:34:31 -0500 | [diff] [blame] | 43 | |
Patrick Williams | 93c203f | 2021-10-06 16:15:23 -0500 | [diff] [blame] | 44 | SRCREV:class-devupstream = "c570be0da77e963d77bac099d468bc0cd5f1bd63" |
| 45 | PV:class-devupstream = "2.13.0+git${SRCPV}" |
Patrick Williams | 213cb26 | 2021-08-07 19:21:33 -0500 | [diff] [blame] | 46 | S:class-devupstream = "${WORKDIR}/git" |
Andrew Geissler | 82c905d | 2020-04-13 13:39:40 -0500 | [diff] [blame] | 47 | SRCREV_FORMAT ?= "lttng_git" |