]> code.ossystems Code Review - meta-freescale.git/commitdiff
lttng-modules: build as 64-bit kernel module on e6500
authorChunrong Guo <B40290@freescale.com>
Fri, 13 Dec 2013 07:47:44 +0000 (15:47 +0800)
committerZhenhua Luo <zhenhua.luo@freescale.com>
Sat, 14 Dec 2013 05:34:18 +0000 (13:34 +0800)
   *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>
meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend [new file with mode: 0644]

diff --git a/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend b/meta-fsl-ppc/recipes-kernel/lttng/lttng-modules_2.3.3.bbappend
new file mode 100644 (file)
index 0000000..0452d7c
--- /dev/null
@@ -0,0 +1,21 @@
+PRINC := "${@int(PRINC) + 1}"
+
+python () {
+    ma = d.getVar("DISTRO_FEATURES", True)
+    arch = d.getVar("OVERRIDES", True)
+
+    # the : after the arch is to skip the message on 64b
+    if not "multiarch" in ma and "e6500:" in arch:
+        raise bb.parse.SkipPackage("Building the kernel for this arch requires multiarch to be in DISTRO_FEATURES")
+
+    promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
+
+    if promote_kernel == "1":
+        d.setVar('KERNEL_CC_append', ' -m64')
+        d.setVar('KERNEL_LD_append', ' -melf64ppc')
+
+    error_qa = d.getVar('ERROR_QA', True)
+    if 'arch' in error_qa:
+        d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
+}
+