Patchwork [meta-fsl-ppc,v3] lttng-modules: build as 64-bit kernel module on e6500

login
register
mail settings
Submitter chunrong guo
Date Dec. 16, 2013, 8:21 a.m.
Message ID <1387182080-9203-1-git-send-email-b40290@freescale.com>
Download mbox | patch
Permalink /patch/63381/
State Superseded
Headers show

Comments

chunrong guo - Dec. 16, 2013, 8:21 a.m.
From: Chunrong Guo <B40290@freescale.com>

   *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

Signed-off-by: Chunrong Guo <B40290@freescale.com>
---
 recipes-kernel/lttng/lttng-modules_2.3.3.bbappend |   18 ++++++++++++++++++
 1 files changed, 18 insertions(+), 0 deletions(-)
 create mode 100644 recipes-kernel/lttng/lttng-modules_2.3.3.bbappend
Zhenhua Luo - Dec. 16, 2013, 8:53 a.m.
> -----Original Message-----
> From: b40290@freescale.com [mailto:b40290@freescale.com]
> Sent: Monday, December 16, 2013 4:21 PM
> 
> @@ -0,0 +1,18 @@
> +inherit distro_features_check
> +
> +REQUIRED_DISTRO_FEATURES ?= "multiarch"
[Luo Zhenhua-B19537] It will be checked for all FSL ppc core types, this is only required by e6500. 


Best Regards,

Zhenhua

Patch

diff --git a/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend b/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend
new file mode 100644
index 0000000..bdde402
--- /dev/null
+++ b/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend
@@ -0,0 +1,18 @@ 
+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')
+
+        
+        error_qa = d.getVar('ERROR_QA', True)
+        if 'arch' in error_qa:
+            d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
+
+}