[meta-freescale] [meta-fsl-arm][PATCH] imx-base.inc: on thumb builds, add MACHINE_SOCARCH arm feed

Max Krummenacher max.oss.09 at gmail.com
Mon Mar 23 01:28:40 PDT 2015


This ensures that all MACHINE_SOCARCH feeds are part of PACKAGE_EXTRA_ARCHS.

oe-core now puts packages into an arm feed dir when a recipe forces the
ARM instruction set on a build configured to default to thumb.
http://cgit.openembedded.org/openembedded-core/commit/?id=3e760031f91fb87c3e2f62b77a117eb41164f259

This is true also for packages in MACHINE_SOCARCH, i.e. we get in deploy/ipk for
an angstrom based build:
armv7ahf-vfp-neon-mx6qdl  armv7at2hf-vfp-neon-mx6qdl
so we must put both into PACKAGE_EXTRA_ARCHS.

I guess that in theorie the opposite would also be true. If a recipe explicitely
sets thumb in build configured for arm one would need to add the thumb feed.
However in the layers I have installed I could not find such a recipe, let alone
a recipe which would be put in MACHINE_SOCARCH.

Signed-off-by: Max Krummenacher <max.oss.09 at gmail.com>
---
 conf/machine/include/imx-base.inc | 12 +++++++++++-
 1 file changed, 11 insertions(+), 1 deletion(-)

diff --git a/conf/machine/include/imx-base.inc b/conf/machine/include/imx-base.inc
index bb5539c..985d3b1 100644
--- a/conf/machine/include/imx-base.inc
+++ b/conf/machine/include/imx-base.inc
@@ -46,7 +46,17 @@ MACHINE_SOCARCH_mx6sx = "${TUNE_PKGARCH}-mx6sx"
 MACHINE_SOCARCH_mx6sl = "${TUNE_PKGARCH}-mx6sl"
 MACHINE_SOCARCH_vf60 = "${TUNE_PKGARCH}-vf60"
 MACHINE_SOCARCH_vf50 = "${TUNE_PKGARCH}-vf50"
-PACKAGE_EXTRA_ARCHS_append = " ${MACHINE_SOCARCH}"
+
+# If TUNE_PKGARCH is set for thumb2 allow also arm for package extra archs
+def thumb_handler(d):
+    import re
+    socarch = d.getVar('MACHINE_SOCARCH', True)
+    extraarcharm = re.sub('(.*)(t2)(.*)', r'\1\3', socarch)
+    if extraarcharm == socarch:
+        extraarcharm = ""
+    return extraarcharm
+
+PACKAGE_EXTRA_ARCHS_append = " ${MACHINE_SOCARCH} ${@thumb_handler(d)}"
 
 MACHINE_ARCH_FILTER = "virtual/kernel"
 MACHINE_SOCARCH_FILTER = "libfslcodec libfslvpuwrap libfslparser gst-fsl-plugins"
-- 
1.9.3



More information about the meta-freescale mailing list