Skip to contentSkip to conversation

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

PATCH Superseded [email protected] 2 participants 2 messages Dec 16, 2013

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

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

From: Chunrong Guo <[email protected]>

*e6500 is built with 32b rootfs/64b kernel, build asf 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
---
 recipes-kernel/lttng/lttng-modules_2.3.3.bbappend |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)
 create mode 100644 recipes-kernel/lttng/lttng-modules_2.3.3.bbappend
recipes-kernel/lttng/lttng-modules_2.3.3.bbappend new file +13 -0
new file mode 100644
index 0000000..6742afe
@@ -0,0 +1,13 @@
+inherit distro_features_check
+
+REQUIRED_DISTRO_FEATURES ?= "multiarch"
+
+python () {
+
+        promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
+
+        if promote_kernel == "1":
+                d.appendVar('KERNEL_CC', ' -m64')
+                d.appendVar('KERNEL_LD', ' -melf64ppc')
+
+}
Signature · 1 line
1.7.5.4
#1 lore raw

Hi Chunrong,

Quoted 29 lines

-----Original Message-----
From: [email protected] [mailto:[email protected]]
Sent: Monday, December 16, 2013 2:47 PM

From: Chunrong Guo <[email protected]>

*e6500 is built with 32b rootfs/64b kernel, build asf 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
---
 recipes-kernel/lttng/lttng-modules_2.3.3.bbappend |   13 +++++++++++++
 1 files changed, 13 insertions(+), 0 deletions(-)  create mode 100644

recipes-kernel/lttng/lttng-modules_2.3.3.bbappend

recipes- renamed from recipes-kernel/lttng/lttng-modules_2.3.3.bbappend +0 -0

kernel/lttng/lttng-modules_2.3.3.bbappend
new file mode 100644
index 0000000..6742afe

recipes-kernel/lttng/lttng-modules_2.3.3.bbappend line 3

Quoted 3 lines
recipes-kernel/lttng/lttng-modules_2.3.3.bbappend new file +3 -0
@@ -0,0 +1,13 @@
+inherit distro_features_check
+
+REQUIRED_DISTRO_FEATURES ?= "multiarch"

[Luo Zhenhua-B19537] Only e6500 targets need the check.

recipes-kernel/lttng/lttng-modules_2.3.3.bbappend line 11

Quoted 7 lines
recipes-kernel/lttng/lttng-modules_2.3.3.bbappend new file +7 -0
+python () {
+
+        promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
+
+        if promote_kernel == "1":
+                d.appendVar('KERNEL_CC', ' -m64')
+                d.appendVar('KERNEL_LD', ' -melf64ppc')

[Luo Zhenhua-B19537] Is below code needed?
error_qa = d.getVar('ERROR_QA', True)
if 'arch' in error_qa:
d.setVar('ERROR_QA', error_qa.replace(' arch', '')) }

Best Regards,

Zhenhua