From 7a2fea94ddf4adca45ae7afd4df3bb432f6457ed Mon Sep 17 00:00:00 2001 From: Leon Anavi Date: Mon, 19 Feb 2018 14:47:24 +0200 Subject: lttng-modules: update to v2.10.5 Update recipe lttng-modules to v2.10.5 to fix build issue for machine intel-corei7-64 with Linux kernel 4.9.77. The fix has been already applied in oe-core master but AGL relies on branch rocko therefore the fix has to be applied temporary through meta-agl-bsp. (From OE-Core rev: 7f00a5161889a422d83dc113521d9241fdd89abf) Bug-AGL: SPEC-1302 Change-Id: I87166026f011ab6735155e65d95a19e56a001d63 Co-Authored-By: Bruce Ashfield Signed-off-by: Leon Anavi --- .../BUILD_RUNTIME_BUG_ON-vs-gcc7.patch | 43 +++++ ...-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch | 197 +++++++++++++++++++++ .../recipes-kernel/lttng/lttng-modules_2.10.5.bb | 35 ++++ 3 files changed, 275 insertions(+) create mode 100644 meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch create mode 100644 meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch create mode 100644 meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb (limited to 'meta-agl-bsp/meta-intel/recipes-kernel/lttng') diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch new file mode 100644 index 000000000..76063607a --- /dev/null +++ b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/BUILD_RUNTIME_BUG_ON-vs-gcc7.patch @@ -0,0 +1,43 @@ +From ab07574ef90fa510f293c37897d577066a88fe0d Mon Sep 17 00:00:00 2001 +From: Nathan Lynch +Date: Tue, 25 Apr 2017 16:26:57 -0500 +Subject: [PATCH] BUILD_RUNTIME_BUG_ON vs gcc7 + +Avoid using LTTng's BUILD_RUNTIME_BUG_ON macro, as it appears to run +into a similar problem as Linux experienced with ilog2. + +See: +https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=474c90156c8dcc2fa815e6716cc9394d7930cb9c +https://gcc.gnu.org/bugzilla/show_bug.cgi?id=72785 + +Upstream-Status: Pending +Signed-off-by: Nathan Lynch +--- + lib/align.h | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/lib/align.h b/lib/align.h +index 5b91ae87410b..5e134cd485fe 100644 +--- a/lib/align.h ++++ b/lib/align.h +@@ -48,7 +48,7 @@ + */ + #define offset_align(align_drift, alignment) \ + ({ \ +- BUILD_RUNTIME_BUG_ON((alignment) == 0 \ ++ BUG_ON((alignment) == 0 \ + || ((alignment) & ((alignment) - 1))); \ + (((alignment) - (align_drift)) & ((alignment) - 1)); \ + }) +@@ -63,7 +63,7 @@ + */ + #define offset_align_floor(align_drift, alignment) \ + ({ \ +- BUILD_RUNTIME_BUG_ON((alignment) == 0 \ ++ BUG_ON((alignment) == 0 \ + || ((alignment) & ((alignment) - 1))); \ + (((align_drift) - (alignment)) & ((alignment) - 1)); \ + }) +-- +2.9.3 + diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch new file mode 100644 index 000000000..aa165ba53 --- /dev/null +++ b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules/Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch @@ -0,0 +1,197 @@ + + + +poky - Poky Build Tool and Metadata + + + + + + + + + +
+ + + + +
+summaryrefslogtreecommitdiffstats
+ + + +
+
+
blob: e41124227201a9d7bb53cd6a7a5ef6aa733328e2 (plain) + + +
1
+2
+3
+4
+5
+6
+7
+8
+9
+10
+11
+12
+13
+14
+15
+16
+17
+18
+19
+20
+21
+22
+23
+24
+25
+26
+27
+28
+29
+30
+31
+32
+33
+34
+35
+36
+37
+38
+39
+40
+41
+42
+43
+44
+45
+46
+47
+48
+49
+
From 1b0e574d680101105a6c1e8931c78824f5a97a42 Mon Sep 17 00:00:00 2001
+From: Otavio Salvador <otavio@ossystems.com.br>
+Date: Mon, 5 Sep 2016 17:08:56 +0000
+Subject: [PATCH] Makefile: Do not fail if CONFIG_TRACEPOINTS is not enabled
+Organization: O.S. Systems Software LTDA.
+
+The lttng-modules are being pulled by the tools-profile image feature,
+however, not every kernel has the CONFIG_TRACEPOINTS feature enabled.
+
+This change makes the build do not fail when CONFIG_TRACEPOINTS is not
+available, allowing it to be kept being pulled by default.
+
+Upstream-Status: Inappropriate [embedded specific]
+
+Signed-off-by: Otavio Salvador <otavio@ossystems.com.br>
+---
+ Makefile | 9 +++++----
+ 1 file changed, 5 insertions(+), 4 deletions(-)
+
+diff --git a/Makefile b/Makefile
+index 8602649..75550cc 100644
+--- a/Makefile
++++ b/Makefile
+@@ -8,10 +8,7 @@ ifneq ($(KERNELRELEASE),)
+   # and defines the modules to be built.
+ 
+   ifdef CONFIG_LOCALVERSION	# Check if dot-config is included.
+-    ifeq ($(CONFIG_TRACEPOINTS),)
+-      $(error The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
+-    endif # CONFIG_TRACEPOINTS
+-  endif # ifdef CONFIG_LOCALVERSION
++    ifneq ($(CONFIG_TRACEPOINTS),)
+ 
+   TOP_LTTNG_MODULES_DIR := $(shell dirname $(lastword $(MAKEFILE_LIST)))
+ 
+@@ -94,6 +91,10 @@ ifneq ($(KERNELRELEASE),)
+   obj-$(CONFIG_LTTNG) += lib/
+   obj-$(CONFIG_LTTNG) += tests/
+ 
++    else
++      $(warning The option CONFIG_TRACEPOINTS needs to be enabled in your kernel configuration)
++    endif # CONFIG_TRACEPOINTS
++  endif # ifdef CONFIG_LOCALVERSION
+ else # KERNELRELEASE
+ 
+ # This part of the Makefile is used when the 'make' command is runned in the
+-- 
+2.1.4
+
+
+
+ +
+ + diff --git a/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb new file mode 100644 index 000000000..370b78aae --- /dev/null +++ b/meta-agl-bsp/meta-intel/recipes-kernel/lttng/lttng-modules_2.10.5.bb @@ -0,0 +1,35 @@ +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=c4613d1f8a9587bd7b366191830364b3 \ + file://gpl-2.0.txt;md5=751419260aa954499f7abaabaa882bbe \ + file://lgpl-2.1.txt;md5=243b725d71bb5df4a1e5920b344b86ad \ + " + +inherit module + +COMPATIBLE_HOST = '(x86_64|i.86|powerpc|aarch64|mips|nios2|arm).*-linux' + +SRC_URI = "https://lttng.org/files/${BPN}/${BPN}-${PV}.tar.bz2 \ + file://Makefile-Do-not-fail-if-CONFIG_TRACEPOINTS-is-not-en.patch \ + file://BUILD_RUNTIME_BUG_ON-vs-gcc7.patch \ +" + +SRC_URI[md5sum] = "4aaabaafd15d9455c83972e26ccfbca7" +SRC_URI[sha256sum] = "b8dbbbee45a673c381f51b99c555e36655c3c2c7a5477aab927591cc7f003a1f" + +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')) +} + -- cgit 1.2.3-korg