Skip to contentSkip to conversation

lttng-modules: build as 64-bit kernel module on e6500

PATCH In review Chunrong Guo 2 participants 2 messages Dec 13, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 lttng-modules: build as 64-bit kernel module on e6500

*e6500 is built with 32b rootfs/64b kernel, build lttng-modules as 64bit too. *Fix the below build issue on e6500 core:

    | DEBUG: Executing shell function do_make_scripts
    | make: Entering directory `.../tmp/sysroots/t4240qds/usr/src/kernel'
    | CC scripts/mod/empty.o | scripts/mod/empty.c:1:0: error: -mcmodel not supported in this configuration
    | make[2]: *** [scripts/mod/empty.o] Error 1
    | make[1]: *** [scripts/mod] Error 2
    | make: *** [scripts] Error 2
---
 meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb +12 -0
index dd06546..2a48c1a 100644
@@ -22,6 +22,18 @@ export KERNEL_SRC="${STAGING_KERNEL_DIR}"
 
 S = "${WORKDIR}/git"
 
+# Build as 64-bit kernel module on e6500
+python () {
+
+    promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
+
+    if promote_kernel == "1":
+        d.setVar('KERNEL_CC_append', ' -m64')
+        d.setVar('KERNEL_LD_append', ' -melf64ppc')
+
+}
+
+
 do_install_append() {
 	# Delete empty directories to avoid QA failures if no modules were built
 	find ${D}/lib -depth -type d -empty -exec rmdir {} \;
Signature · 1 line
1.7.5.4
#1 lore raw

"64b kernel + 32b userspace" is a scenario of e6500 targets specific to FSL QorIQ SDK, so the change should be located in SDK layer instead of a common layer.

Best Regards,

Zhenhua

Quoted 52 lines

-----Original Message-----
From: Chunrong Guo [mailto:[email protected]]
Sent: Friday, December 13, 2013 3:07 PM
To: [email protected]
Cc: Liu Ting-B28495; Luo Zhenhua-B19537; Guo Chunrong-B40290; Guo Chunrong-B40290
Subject: [OE-core][PATCH] lttng-modules: build as 64-bit kernel module on e6500

*e6500 is built with 32b rootfs/64b kernel, build lttng-modules as
64bit too.
*Fix the below build issue on e6500 core:

    | DEBUG: Executing shell function do_make_scripts
    | make: Entering directory `.../tmp/sysroots/t4240qds/usr/src/kernel'
    | CC scripts/mod/empty.o | scripts/mod/empty.c:1:0: error: -mcmodel
not supported in this configuration
    | make[2]: *** [scripts/mod/empty.o] Error 1
    | make[1]: *** [scripts/mod] Error 2
    | make: *** [scripts] Error 2
---
 meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb |   12 ++++++++++++
 1 files changed, 12 insertions(+), 0 deletions(-)
meta/recipes-kernel/lttng/lttng-modules_2.3.3.bb +11 -0
index dd06546..2a48c1a 100644
@@ -22,6 +22,18 @@ export KERNEL_SRC="${STAGING_KERNEL_DIR}"
 
 S = "${WORKDIR}/git"
 
+# Build as 64-bit kernel module on e6500 python () {
+
+    promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
+
+    if promote_kernel == "1":
+        d.setVar('KERNEL_CC_append', ' -m64')
+        d.setVar('KERNEL_LD_append', ' -melf64ppc')
+
+}
+
+
 do_install_append() {
 	# Delete empty directories to avoid QA failures if no modules were

built
find ${D}/lib -depth -type d -empty -exec rmdir {} \;
--
1.7.5.4