fsl-dynamic-packagearch.bbclass: Stop using ARM-specific architectures
PATCH v2 1/2 fsl-dynamic-packagearch.bbclass: Stop using ARM-specific architectures
The code to dynamically assign the architecture does take into account the default tune so we don't need to include the other architectures with the SoC suffix into the possible package architecture list.
This allow for the class to be used across different architectures (such as PowerPC) thus fixing issues while integrating it for QorIQ usage.
---
Changes in v2:
- New patch
classes/fsl-dynamic-packagearch.bbclass | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)
classes/fsl-dynamic-packagearch.bbclass +5 -12
@@ -23,7 +23,7 @@ # MACHINE_ARCH_FILTER = "virtual/kernel" # MACHINE_SOCARCH_FILTER_soc = "virtual/libgles1 ... virtual/libgl" # -# Copyright 2013-2015 (C) O.S. Systems Software LTDA. +# Copyright 2013-2016 (C) O.S. Systems Software LTDA. python __anonymous () { machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER", True) or "").split())
@@ -50,16 +50,9 @@ python __anonymous () { d.setVar("PACKAGE_ARCH", package_arch) cur_package_archs = (d.getVar("PACKAGE_ARCHS", True) or "").split() - arch_extra_socarch = (d.getVar("ARM_EXTRA_SOCARCH", True) or "") - thumb_extra_socarch = (d.getVar("THUMB_EXTRA_SOCARCH", True) or "") - if not arch_extra_socarch in cur_package_archs: - d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % arch_extra_socarch) - - if not thumb_extra_socarch in cur_package_archs: - d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % thumb_extra_socarch) + machine_socarch = (d.getVar("MACHINE_SOCARCH", True) or "") + if not machine_socarch in cur_package_archs: + d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % machine_socarch) } -ARM_EXTRA_SOCARCH = "${ARMPKGARCH}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}${MACHINE_SOCARCH_SUFFIX}" -THUMB_EXTRA_SOCARCH = "${ARMPKGARCH}${ARM_THUMB_SUFFIX}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}${MACHINE_SOCARCH_SUFFIX}" - -MACHINE_SOCARCH = "${@bb.utils.contains('ARM_INSTRUCTION_SET', 'thumb', '${THUMB_EXTRA_SOCARCH}', '${ARM_EXTRA_SOCARCH}', d)}" +MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}"
Signature · 1 line
2.9.3
PATCH v2 2/2 qoriq-base.inc: Use 'fsl-dynamic-packagearch' class
This ensures PACKAGE_ARCH has a better default.
- use MACHINE_ARCH for every package depending on virtual/kernel
- use MACHINE_SOCARCH for every package depending on cryptodev-qoriq-linux, cryptodev-qoriq-module, cryptodev-qoriq-test or openssl-qoriq;
---
Changes in v2: None
conf/machine/include/qoriq-base.inc | 9 +++++++++ 1 file changed, 9 insertions(+)
conf/machine/include/qoriq-base.inc +9 -0
@@ -17,3 +17,12 @@ MACHINE_EXTRA_RRECOMMENDS += "udev-extraconf udev-rules-qoriq kernel-modules" EXTRA_IMAGEDEPENDS += "u-boot cst-native" MACHINEOVERRIDES =. "qoriq:" + +# Sub-architecture support +MACHINE_SOCARCH_SUFFIX ?= "" +MACHINE_SOCARCH_SUFFIX_qoriq = "-qoriq" + +MACHINE_ARCH_FILTER = "virtual/kernel" +MACHINE_SOCARCH_FILTER_append_qoriq = " cryptodev-qoriq-linux cryptodev-qoriq-module cryptodev-qoriq-test openssl-qoriq" + +INHERIT += "fsl-dynamic-packagearch"
Signature · 1 line
2.9.3
Hi
2016-09-21 13:16 GMT+02:00 Otavio Salvador <[email protected]>:
Quoted 11 lines
The code to dynamically assign the architecture does take into account the default tune so we don't need to include the other architectures with the SoC suffix into the possible package architecture list.
This allow for the class to be used across different architectures (such as PowerPC) thus fixing issues while integrating it for QorIQ usage.
Signed-off-by Otavio Salvador <[email protected]>---
This does now break certain ARM configurations.
If one configures a build to use thumb by default then the all packages which don't explicitly override the instruction set are built for thumb and put into the THUMB-SOCARCH while the others are put into ARM-SOCARCH.
If not both archs are added to PACKAGE_EXTRA_ARCHS then image creation fails because all packages in ARM-SOCARCH are not found.
See also the original patch:
https://patchwork.openembedded.org/patch/91049/
How can I reproduce the PowerPC use case when preparing a patch? I guess just reverting the patch will make someone else unhappy.
Max
Quoted 48 lines
Changes in v2:
- New patchclasses/fsl-dynamic-packagearch.bbclass | 17 +++++------------ 1 file changed, 5 insertions(+), 12 deletions(-)classes/fsl-dynamic-packagearch.bbclass +5
-13@@ -23,7 +23,7 @@ # MACHINE_ARCH_FILTER = "virtual/kernel" # MACHINE_SOCARCH_FILTER_soc = "virtual/libgles1 ... virtual/libgl" # -# Copyright 2013-2015 (C) O.S. Systems Software LTDA. +# Copyright 2013-2016 (C) O.S. Systems Software LTDA. python __anonymous () { machine_arch_filter = set((d.getVar("MACHINE_ARCH_FILTER", True) or "").split())@@ -50,16 +50,9 @@ python __anonymous () { d.setVar("PACKAGE_ARCH", package_arch) cur_package_archs = (d.getVar("PACKAGE_ARCHS", True) or "").split() - arch_extra_socarch = (d.getVar("ARM_EXTRA_SOCARCH", True) or "") - thumb_extra_socarch = (d.getVar("THUMB_EXTRA_SOCARCH", True) or "") - if not arch_extra_socarch in cur_package_archs: - d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % arch_extra_socarch) - - if not thumb_extra_socarch in cur_package_archs: - d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % thumb_extra_socarch) + machine_socarch = (d.getVar("MACHINE_SOCARCH", True) or "") + if not machine_socarch in cur_package_archs: + d.appendVar("PACKAGE_EXTRA_ARCHS", " %s" % machine_socarch) } -ARM_EXTRA_SOCARCH = "${ARMPKGARCH}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}${MACHINE_SOCARCH_SUFFIX}" -THUMB_EXTRA_SOCARCH = "${ARMPKGARCH}${ARM_THUMB_SUFFIX}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}${MACHINE_SOCARCH_SUFFIX}" - -MACHINE_SOCARCH = "${@bb.utils.contains('ARM_INSTRUCTION_SET', 'thumb', '${THUMB_EXTRA_SOCARCH}', '${ARM_EXTRA_SOCARCH}', d)}" +MACHINE_SOCARCH = "${TUNE_PKGARCH}${MACHINE_SOCARCH_SUFFIX}" --2.9.3
--
_______________________________________________
meta-freescale mailing list
[email protected]
https://lists.yoctoproject.org/listinfo/meta-freescale
Quoted 20 lines · Max Krummenacher
2016-09-21 13:16 GMT+02:00 Otavio Salvador <[email protected]>:
Quoted 11 lines
The code to dynamically assign the architecture does take into account the default tune so we don't need to include the other architectures with the SoC suffix into the possible package architecture list.
This allow for the class to be used across different architectures (such as PowerPC) thus fixing issues while integrating it for QorIQ usage.
Signed-off-by Otavio Salvador <[email protected]>---
This does now break certain ARM configurations.
If one configures a build to use thumb by default then the all packages which don't explicitly override the instruction set are built for thumb and put into the THUMB-SOCARCH while the others are put into ARM-SOCARCH.
Quoted 5 lines
If not both archs are added to
PACKAGE_EXTRA_ARCHSthen image creation fails because all packages in ARM-SOCARCH are not found.See also the original patch:
https://patchwork.openembedded.org/patch/91049/
I see your point.
I think the code will need to have a special case from ARM and behave different for this architecture while using the simple case as fallback.
Quoted 2 lines
How can I reproduce the PowerPC use case when preparing a patch? I guess just reverting the patch will make someone else unhappy.
You can compare the current PACKAGE_EXTRA_ARCHS output; it cannot change.
The exceptional case for ARM is a bad side effect, indeed. As we don't use Thumb2 enabled by default it has not been catch in my test.
Please count on me to test and review preliminar patches ;-)
Best Regards,
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