[OE-core] [PATCH] lttng-modules: Add git based recipe

zhe.he at windriver.com zhe.he at windriver.com
Wed Jun 12 09:15:09 UTC 2019


From: He Zhe <zhe.he at windriver.com>

This is based on meta/recipes-kernel/lttng/lttng-modules_2.10.9.bb and is for
those who want to build lttng-modules with bleeding edge kernel, to avoid
regularly backporting patches from upstream.

Note that PREFERRED_VERSION needs to be set to select this recipe instead of the
tar ball one.

Signed-off-by: He Zhe <zhe.he at windriver.com>
---
 meta/recipes-kernel/lttng/lttng-modules_git.bb | 34 ++++++++++++++++++++++++++
 1 file changed, 34 insertions(+)
 create mode 100644 meta/recipes-kernel/lttng/lttng-modules_git.bb

diff --git a/meta/recipes-kernel/lttng/lttng-modules_git.bb b/meta/recipes-kernel/lttng/lttng-modules_git.bb
new file mode 100644
index 0000000..966d342
--- /dev/null
+++ b/meta/recipes-kernel/lttng/lttng-modules_git.bb
@@ -0,0 +1,34 @@
+SECTION = "devel"
+SUMMARY = "Linux Trace Toolkit KERNEL MODULE"
+DESCRIPTION = "The lttng-modules 2.0 package contains the kernel tracer modules"
+LICENSE = "LGPLv2.1 & GPLv2 & MIT"
+LIC_FILES_CHKSUM = "file://LICENSE;md5=3f882d431dc0f32f1f44c0707aa41128 \
+                    "
+DEFAULT_PREFERENCE = "-1"
+
+inherit module
+
+COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm|riscv).*-linux'
+
+SRC_URI = "git://git.lttng.org/lttng-modules;branch=master \
+           file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \
+           file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \
+           "
+SRCREV = "${AUTOREV}"
+PV = "2.11.0-rc+git${SRCPV}"
+S = "${WORKDIR}/git"
+
+export INSTALL_MOD_DIR="kernel/lttng-modules"
+
+EXTRA_OEMAKE += "KERNELDIR='${STAGING_KERNEL_DIR}'"
+
+do_install_append() {
+	# Delete empty directories to avoid QA failures if no modules were built
+	find ${D}/${nonarch_base_libdir} -depth -type d -empty -exec rmdir {} \;
+}
+
+python do_package_prepend() {
+    if not os.path.exists(os.path.join(d.getVar('D'), d.getVar('nonarch_base_libdir')[1:], 'modules')):
+        bb.warn("%s: no modules were created; this may be due to CONFIG_TRACEPOINTS not being enabled in your kernel." % d.getVar('PN'))
+}
+
-- 
2.7.4



More information about the Openembedded-core mailing list