fsl-dynamic-packagearch: on thumb builds, add MACHINE_SOCARCH arm feed
PATCH v3 1/1 fsl-dynamic-packagearch: on thumb builds, add MACHINE_SOCARCH arm feed
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.
In theorie, but less likely, the opposite is also true. If a recipe explicitely sets thumb in a build configured for arm the resulting packages end up in a thumb feed.
---
v2:
- moved the functionality from imx-base.inc to fsl-dynamic-packagearch.bbclass
- implements the'vice versa' recipe with thumb on default arm configuration
- reads the datastore to construct the feed name rather than relying on "t2"
v3:
- removed PACKAGE_EXTRA_ARCHS from mxs-base.inc also.
Minimal Use Case to reproduce the issue:
- fsl-community-bsp setup, master
- default to thumb instruction set and add a SOCARCH package which forces arm:
local.conf:ARM_INSTRUCTION_SET ?= "thumb"DEFAULTTUNE_mx6 = "cortexa9thf-neon"CORE_IMAGE_EXTRA_INSTALL += "libasound"
- build core-image-minimal
Unpatched sources will fail in do_rootfs:
Quoted 1 line
MACHINE=imx6qsabresd bitbake core-image-minimal
WARNING: Host distribution "openSUSE-project-13.1" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution. Loading cache: 100% |########################################################################################################################################| ETA: 00:00:00
Loaded 2084 entries from dependency cache.
NOTE: Resolving any missing task queue dependencies
Build Configuration:
BB_VERSION = "1.27.0" BUILD_SYS = "x86_64-linux" NATIVELSBSTRING = "openSUSE-project-13.1" TARGET_SYS = "arm-poky-linux-gnueabi" MACHINE = "imx6qsabresd" DISTRO = "poky" DISTRO_VERSION = "1.8+snapshot-20150327" TUNE_FEATURES = "arm armv7a vfp thumb neon callconvention-hard cortexa9" TARGET_FPU = "vfp-neon"
meta
meta-yocto = "(detachedfrom5c76ceb):5c76cebc24675edb3dff473fce9b67cedff615db"
meta-oe
meta-multimedia = "(detachedfromdf6c7b1):df6c7b1279790d27ebfd58fbdfbac89bde5782ec"
meta-fsl-arm = "(detachedfrom115aace):115aaced72fddc23024f8838f0eeb8ad5e37d048"
meta-fsl-arm-extra = "(detachedfrom22f6672):22f6672c3ef58bf5070d0c6894a459fada66f55e"
meta-fsl-demos = "(detachedfromdb7ca84):db7ca84b4a81167edc507b68241d78adb346268a"
NOTE: Preparing RunQueue
NOTE: Executing SetScene Tasks
NOTE: Executing RunQueue Tasks
ERROR: libasound2 not found in the base feeds (imx6qsabresd cortexa9t2hf-vfp-neon-mx6qdl cortexa9t2hf-vfp-neon cortexa9t2hf-vfp cortexa9hf-vfp-neon cortexa9hf-vfp armv7at2hf-vfp-neon armv7ahf-vfp-neon armv7at2hf-vfp armv7ahf-vfp armv6thf-vfp armv6hf-vfp armv5tehf-vfp armv5ehf-vfp armv5thf-vfp armv5hf-vfp noarch any all).
...
Analyzing the following helped in putting together the patch:
MACHINE=imx6qsabresd bitbake alsa-lib -e > libasound.txt MACHINE=imx6qsabresd bitbake core-image-minimal -e > image.txt
classes/fsl-dynamic-packagearch.bbclass | 16 +++++++++++++++- conf/machine/include/imx-base.inc | 1 - conf/machine/include/mxs-base.inc | 1 - 3 files changed, 15 insertions(+), 3 deletions(-)
classes/fsl-dynamic-packagearch.bbclass +15 -1
@@ -29,6 +29,7 @@ python __anonymous () { machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER", True) or "").split()) machine_socarch_filter = set((d.getVar("MACHINE_SOCARCH_FILTER", True) or "").split()) if machine_socarch_filter or machine_arch_filter: + socarch = d.getVar('MACHINE_SOCARCH', True) provides = set((d.getVar("PROVIDES", True) or "").split()) depends = set((d.getVar("DEPENDS", True) or "").split()) PN = d.getVar("PN", True)
@@ -37,11 +38,24 @@ python __anonymous () { if list(machine_arch_filter & (provides | depends)): package_arch = d.getVar("MACHINE_ARCH", True) elif list(machine_socarch_filter & (provides | depends)): - package_arch = d.getVar("MACHINE_SOCARCH", True) + package_arch = socarch if not package_arch: bb.parse.SkipPackage("You must set MACHINE_SOCARCH as MACHINE_SOCARCH_FILTER is set for this SoC.") if package_arch: bb.debug(1, "Use '%s' as package archictecture for '%s'" % (package_arch, PN)) d.setVar("PACKAGE_ARCH", package_arch) + + suffix = socarch[len(d.getVar("TUNE_PKGARCH", True)):] + # If TUNE_PKGARCH is set for thumb allow also arm for package extra archs and vice versa + if d.getVar("ARM_INSTRUCTION_SET", True) == "thumb": + extrasocarch = d.getVar("ARMPKGARCH", True) + \ + d.getVar("ARMPKGSFX_DSP", True) + d.getVar("ARMPKGSFX_EABI", True) + \ + d.getVar("ARMPKGSFX_ENDIAN", True) + d.getVar("ARMPKGSFX_FPU", True) + suffix + else: + extrasocarch = d.getVar("ARMPKGARCH", True) + \ + d.getVar("ARM_THUMB_SUFFIX", True) + \ + d.getVar("ARMPKGSFX_DSP", True) + d.getVar("ARMPKGSFX_EABI", True) + \ + d.getVar("ARMPKGSFX_ENDIAN", True) + d.getVar("ARMPKGSFX_FPU", True) + suffix + d.appendVar("PACKAGE_EXTRA_ARCHS", " " + socarch + " " + extrasocarch) }
conf/machine/include/imx-base.inc +0 -1
@@ -46,7 +46,6 @@ 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}" MACHINE_ARCH_FILTER = "virtual/kernel" MACHINE_SOCARCH_FILTER = "libfslcodec libfslvpuwrap libfslparser gst-fsl-plugins"
conf/machine/include/mxs-base.inc +0 -1
@@ -27,7 +27,6 @@ MACHINE_GSTREAMER_PLUGIN_mx28 ?= "gst-fsl-plugin" MACHINE_SOCARCH ?= "" MACHINE_SOCARCH_mx23 = "${TUNE_PKGARCH}-mx23" MACHINE_SOCARCH_mx28 = "${TUNE_PKGARCH}-mx28" -PACKAGE_EXTRA_ARCHS_append = " ${MACHINE_SOCARCH}" MACHINE_ARCH_FILTER = "virtual/kernel" MACHINE_SOCARCH_FILTER = "libfslcodec libfslvpuwrap libfslparser gst-fsl-plugins"
Signature · 1 line
1.8.4.5
Hello Max,
(I have added some more people to the Cc list as I think this is a generic problem)
Quoted 11 lines · Max Krummenacher
This ensures that all
MACHINE_SOCARCHfeeds are part ofPACKAGE_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=3e760031f91fb87c3e2f62b77a117eb41164f259This 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 intoPACKAGE_EXTRA_ARCHS.
Quoted 5 lines
In theorie, but less likely, the opposite is also true. If a recipe explicitely sets thumb in a build configured for arm the resulting packages end up in a thumb feed.
Signed-off-by Max Krummenacher <[email protected]>
For reference of the source changes, the patch is online[1].
1. http://patchwork.openembedded.org/patch/90989/
I think when thumb is used, the normal ARM should be added but the inverse shouldn't be truth as I might want to not use thumb at all.
In any case, I think this should be handled in the generic code which adds the PACKAGE_EXTRA_ARCHES and not in our class.
Please people, I need your view on this...
Signature · 3 lines
Otavio Salvador O.S. Systems http://www.ossystems.com.br http://code.ossystems.com.br Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Hi
2015-03-27 23:33 GMT+01:00 Otavio Salvador <[email protected]>:
Quoted 21 lines
Hello Max,
(I have added some more people to the Cc list as I think this is a generic problem)
Quoted 15 lines · Max Krummenacher
This ensures that all
MACHINE_SOCARCHfeeds are part ofPACKAGE_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=3e760031f91fb87c3e2f62b77a117eb41164f259This 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 intoPACKAGE_EXTRA_ARCHS.In theorie, but less likely, the opposite is also true. If a recipe explicitely sets thumb in a build configured for arm the resulting packages end up in a thumb feed.
Quoted 8 lines
Quoted 1 line
Signed-off-by Max Krummenacher <[email protected]>For reference of the source changes, the patch is online[1].
1. http://patchwork.openembedded.org/patch/90989/
I think when thumb is used, the normal ARM should be added but the inverse shouldn't be truth as I might want to not use thumb at all.
Note that this use case is more academic. I have not found a single recipe which forces thumb mode in the layers I have on disk. Plus I did not test if and how a build would fail when adding such a recipe to an image.
Quoted 10 lines
In any case, I think this should be handled in the generic code which adds the
PACKAGE_EXTRA_ARCHESand not in our class.Please people, I need your view on this...
--
Otavio SalvadorO.S. Systems
http://www.ossystems.com.br http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854 Mobile: +1 (347) 903-9750
Regards
Max