fsl-dynamic-packagearch: on thumb builds, add MACHINE_SOCARCH arm feed
PATCH v2 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"
classes/fsl-dynamic-packagearch.bbclass | 16 +++++++++++++++- conf/machine/include/imx-base.inc | 1 - 2 files changed, 15 insertions(+), 2 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"
Signature · 1 line
1.9.3
Hello Max,
Quoted 42 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.
Signed-off-by Max Krummenacher <[email protected]>---
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"classes/fsl-dynamic-packagearch.bbclass | 16 +++++++++++++++- conf/machine/include/imx-base.inc | 1 - 2 files changed, 15 insertions(+), 2 deletions(-)classes/fsl-dynamic-packagearch.bbclass +1
-0@@ -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)):
classes/fsl-dynamic-packagearch.bbclass python __anonymous () { · line 49
Quoted 10 lines
classes/fsl-dynamic-packagearch.bbclass +3
-1- 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)):]
Could use 'ARM_THUMB_SUFFIX' no?
classes/fsl-dynamic-packagearch.bbclass python __anonymous () { · line 51
Quoted 2 lines
classes/fsl-dynamic-packagearch.bbclass +2
-0+ # 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":
ARMPKGSFX_THUMB will be non-empty here, no?
Quoted 15 lines
classes/fsl-dynamic-packagearch.bbclass +9
-0+ 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
-0
conf/machine/include/imx-base.inc MACHINE_SOCARCH_mx6sx = "${TUNE_PKGARCH}-mx6sx" · line 49
Quoted 4 lines
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}"
mxs-base.inc seems to require same change, no?
Quoted 5 lines
conf/machine/include/imx-base.inc +0
-1MACHINE_ARCH_FILTER = "virtual/kernel" MACHINE_SOCARCH_FILTER = "libfslcodec libfslvpuwrap libfslparser gst-fsl-plugins" --1.9.3
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
2015-03-26 20:24 GMT+01:00 Otavio Salvador <[email protected]>:
Quoted 22 lines
Hello Max,
Quoted 21 lines
classes/fsl-dynamic-packagearch.bbclass +2
-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.")
Quoted 8 lines
classes/fsl-dynamic-packagearch.bbclass python __anonymous () { · line 49
Quoted 5 lines
classes/fsl-dynamic-packagearch.bbclass +2
-0if 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)):]Could use '
ARM_THUMB_SUFFIX' no?
No.
This cuts of the TUNE_PKGARCH part away so that we get the e.g. suffix="-mx6qdl" part.MACHINE_SOCARCH_mx6q = "${TUNE_PKGARCH}-mx6qdl"
Quoted 4 lines
classes/fsl-dynamic-packagearch.bbclass python __anonymous () { · line 51
Quoted 2 lines
classes/fsl-dynamic-packagearch.bbclass +2
-0+ # 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":
ARMPKGSFX_THUMBwill be non-empty here, no?
Yes. If this becomes true we have have MACHINE_SOCARCH pointing to a thumb feed and get the arm feed name in extrasocarch.
Quoted 14 lines
Quoted 14 lines
classes/fsl-dynamic-packagearch.bbclass +9
-0+ 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--- a/conf/machine/include/imx-base.inc
Quoted 9 lines
conf/machine/include/imx-base.inc MACHINE_SOCARCH_mx6sx = "${TUNE_PKGARCH}-mx6sx" · line 49
Quoted 6 lines
+++ b/conf/machine/include/imx-base.inc
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}"mxs-base.inc seems to require same change, no?
Ups, forgot about that.
Quoted 5 lines
Quoted 5 lines
conf/machine/include/imx-base.inc +0
-1MACHINE_ARCH_FILTER = "virtual/kernel" MACHINE_SOCARCH_FILTER = "libfslcodec libfslvpuwrap libfslparser gst-fsl-plugins" --1.9.3
Unless you disagree I will put together a v3 which only adds mxs-base.inc.
Regards
Max
Quoted 71 lines · Max Krummenacher
2015-03-26 20:24 GMT+01:00 Otavio Salvador <[email protected]>:
Quoted 22 lines
Hello Max,
Quoted 21 lines
classes/fsl-dynamic-packagearch.bbclass +2
-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.")Quoted 8 lines
classes/fsl-dynamic-packagearch.bbclass python __anonymous () { · line 49
Quoted 5 lines
classes/fsl-dynamic-packagearch.bbclass +2
-0if 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)):]Could use '
ARM_THUMB_SUFFIX' no?No.
This cuts of theTUNE_PKGARCHpart away so that we get the e.g. suffix="-mx6qdl" part.MACHINE_SOCARCH_mx6q= "${TUNE_PKGARCH}-mx6qdl"Quoted 4 lines
classes/fsl-dynamic-packagearch.bbclass python __anonymous () { · line 51
Quoted 2 lines
classes/fsl-dynamic-packagearch.bbclass +2
-0+ # 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":
ARMPKGSFX_THUMBwill be non-empty here, no?Yes. If this becomes true we have have
MACHINE_SOCARCHpointing to a thumb feed and get the arm feed name in extrasocarch.Quoted 14 lines
Quoted 14 lines
classes/fsl-dynamic-packagearch.bbclass +9
-0+ 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--- a/conf/machine/include/imx-base.incQuoted 9 lines
conf/machine/include/imx-base.inc MACHINE_SOCARCH_mx6sx = "${TUNE_PKGARCH}-mx6sx" · line 49
Quoted 6 lines
+++ b/conf/machine/include/imx-base.inc
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}"mxs-base.inc seems to require same change, no?
Ups, forgot about that.
Quoted 7 lines
Quoted 5 lines
Quoted 5 lines
conf/machine/include/imx-base.inc +0
-1MACHINE_ARCH_FILTER = "virtual/kernel" MACHINE_SOCARCH_FILTER = "libfslcodec libfslvpuwrap libfslparser gst-fsl-plugins" --1.9.3
Unless you disagree I will put together a v3 which only adds mxs-base.inc.
Please preare a v3 and I will play locally with it. How I can easily reproduce a failing case?
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