summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTing Liu <ting.liu@freescale.com>2015-07-17 15:17:37 +0800
committerZhenhua Luo <zhenhua.luo@freescale.com>2015-07-22 17:37:55 +0800
commitc1a8932311a95a541da41de0b8095c8e0cc374d1 (patch)
treeefb9e18cd0abdfaa844bdf92023c8efcef61dcda
parent9a3b2ffb915db39ba5cda9fb6721cd82d8cecbb6 (diff)
downloadmeta-fsl-ppc-c1a8932311a95a541da41de0b8095c8e0cc374d1.tar.gz
use 64b toolchain binaries to build e6500 kernel
e6500 only supports 64b kernel. When building 64b kernel + 32b rootfs, kernel build uses a hack previously, ie. append '-m64' and '-elf64ppc' to 32b toolchain binaries. This fails if kernel use some builtin functions: | LINK vmlinux | LD vmlinux.o | powerpc-fsl-linux-ld.bfd: Relocatable linking with relocations from | format elf32-powerpc (.../4.9.2/libgcc.a(_popcountdi2.o)) to format | elf64-powerpc (vmlinux.o) is not supported | make: *** [vmlinux] Error 1 | ERROR: oe_runmake failed modify KERNEL_{CC,LD,AR} to use 64b toolchain binaries to avoid error. Signed-off-by: Ting Liu <ting.liu@freescale.com> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
-rw-r--r--classes/qoriq_build_64bit_kernel.bbclass10
1 files changed, 7 insertions, 3 deletions
diff --git a/classes/qoriq_build_64bit_kernel.bbclass b/classes/qoriq_build_64bit_kernel.bbclass
index 5dd8931..f145746 100644
--- a/classes/qoriq_build_64bit_kernel.bbclass
+++ b/classes/qoriq_build_64bit_kernel.bbclass
@@ -4,11 +4,15 @@ REQUIRED_DISTRO_FEATURES_e6500 += "multiarch"
4python () { 4python () {
5 promote_kernel = d.getVar('BUILD_64BIT_KERNEL') 5 promote_kernel = d.getVar('BUILD_64BIT_KERNEL')
6 if promote_kernel == "1": 6 if promote_kernel == "1":
7 d.setVar('KERNEL_CC_append', ' -m64') 7 sys_multilib = 'powerpc64' + d.getVar('TARGET_VENDOR') + 'mllib64-' + d.getVar('HOST_OS')
8 d.setVar('KERNEL_LD_append', ' -melf64ppc') 8 tc_options = d.getVar('TOOLCHAIN_OPTIONS') + '/../lib64-' + d.getVar("MACHINE")
9 d.setVar('DEPENDS_append', ' lib64-gcc-cross-powerpc64 lib64-libgcc')
10 d.setVar('PATH_append', ':' + d.getVar('STAGING_BINDIR_NATIVE') + '/' + sys_multilib)
11 d.setVar('KERNEL_CC', d.getVar('CCACHE') + sys_multilib + '-' + 'gcc' + d.getVar('HOST_CC_KERNEL_ARCH') + tc_options)
12 d.setVar('KERNEL_LD', d.getVar('CCACHE') + sys_multilib + '-' + 'ld.bfd' + d.getVar('HOST_LD_KERNEL_ARCH') + tc_options)
13 d.setVar('KERNEL_AR', d.getVar('CCACHE') + sys_multilib + '-' + 'ar' + d.getVar('HOST_AR_KERNEL_ARCH'))
9 14
10 error_qa = d.getVar('ERROR_QA', True) 15 error_qa = d.getVar('ERROR_QA', True)
11 if 'arch' in error_qa: 16 if 'arch' in error_qa:
12 d.setVar('ERROR_QA', error_qa.replace(' arch', '')) 17 d.setVar('ERROR_QA', error_qa.replace(' arch', ''))
13} 18}
14