From: Ting Liu <[email protected]>

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

Signed-off-by: Ting Liu <[email protected]>
---
 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

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}/"
-- 
1.7.9.7

-- 
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale

Reply via email to