Patchwork [meta-fsl-ppc,v2,4/5] qoriq_build_64bit_kernel.bbclass: add for ppce6500

login
register
mail settings
Submitter Ting Liu
Date July 10, 2014, 10:28 a.m.
Message ID <1404988115-22761-4-git-send-email-ting.liu@freescale.com>
Download mbox | patch
Permalink /patch/75309/
State Accepted
Headers show

Comments

Ting Liu - July 10, 2014, 10:28 a.m.
From: Ting Liu <b28495@freescale.com>

ppce6500 is a specific core which only support 64bit kernel,
introduce qoriq_build_64bit_kernel.bbclass to do this

Signed-off-by: Ting Liu <b28495@freescale.com>
---
 classes/qoriq_build_64bit_kernel.bbclass |   18 ++++++++++++++++++
 conf/layer.conf                          |    1 +
 2 files changed, 19 insertions(+)
 create mode 100644 classes/qoriq_build_64bit_kernel.bbclass

Patch

diff --git a/classes/qoriq_build_64bit_kernel.bbclass b/classes/qoriq_build_64bit_kernel.bbclass
new file mode 100644
index 0000000..562afd1
--- /dev/null
+++ b/classes/qoriq_build_64bit_kernel.bbclass
@@ -0,0 +1,18 @@ 
+inherit distro_features_check
+REQUIRED_DISTRO_FEATURES_e6500 += "multiarch"
+
+python () {
+    pkgarch = d.getVar("TUNE_PKGARCH", True)
+    if not "ppce6500" == pkgarch:
+        return
+
+    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', ''))
+}
+
diff --git a/conf/layer.conf b/conf/layer.conf
index 0f81db0..9c0a412 100644
--- a/conf/layer.conf
+++ b/conf/layer.conf
@@ -3,6 +3,7 @@  BBPATH .= ":${LAYERDIR}"
 
 BBFILES += "${LAYERDIR}/recipes-*/*/*.bb*"
 BBFILES += "${LAYERDIR}/images/*.bb*"
+BBFILES += "${LAYERDIR}/classes/*.bb*"
 
 BBFILE_COLLECTIONS += "fsl-ppc"
 BBFILE_PATTERN_fsl-ppc = "^${LAYERDIR}/"