WIP: feature-arm-thumb.inc: respect ARM_INSTRUCTION_SET when adding thumb suffix
RFC PATCH 1/1 WIP: feature-arm-thumb.inc: respect ARM_INSTRUCTION_SET when adding thumb suffix
* this means that recipes with ARM_INSTRUCTION_SET explicitly changed to arm will be built in feed without thumb suffix, the same does apply for workdir, e.g. after "bitbake glib-2.0" you can see:
tmp-glibc/work/armv5e-oe-linux-gnueabi:
glib-2.0 glibc glibc-initial
tmp-glibc/work/armv5te-oe-linux-gnueabi:
acl db gdk-pixbuf kmod ....
and
tmp-glibc/deploy/ipk:
all armv5e armv5te qemuarm
* feed config should be ok, because all default DEFAULTTUNEs always include "arm" variants of all supported PACKAGE_ARCHs
* for more details see
http://lists.openembedded.org/pipermail/openembedded-core/2014-April/091960.html
the toolchain path issues were resolved in 1.8
--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +2 -1
@@ -32,7 +32,8 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d)}" +# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb +ARMPKGSFX_THUMB .= "${@ d.getVar('ARM_THUMB_SUFFIX', True) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}" # Whether to compile with code to allow interworking between the two # instruction sets. This allows thumb code to be executed on a primarily
Signature · 1 line
2.2.1
While I haven't tested this. I'm fine with this change.
(It's more or less what I wanted from the beginning, but wasn't able to make everyone happy.)
--Mark
Quoted 42 lines · Martin Jansa
* this means that recipes with
ARM_INSTRUCTION_SETexplicitly changed to arm will be built in feed without thumb suffix, the same does apply for workdir, e.g. after "bitbake glib-2.0" you can see:tmp-glibc/work/armv5e-oe-linux-gnueabi:
glib-2.0 glibc glibc-initialtmp-glibc/work/armv5te-oe-linux-gnueabi:
acl db gdk-pixbuf kmod ....and
tmp-glibc/deploy/ipk:
all armv5e armv5te qemuarm* feed config should be ok, because all default DEFAULTTUNEs always include "arm" variants of all supported
PACKAGE_ARCHs* for more details see
http://lists.openembedded.org/pipermail/openembedded-core/2014-April/091960.html
the toolchain path issues were resolved in 1.8Signed-off-by Martin Jansa <[email protected]>--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/conf/machine/include/arm/feature-arm-thumb.inc +2
-1@@ -32,7 +32,8 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d)}" +# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb +ARMPKGSFX_THUMB .= "${@ d.getVar('ARM_THUMB_SUFFIX', True) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}" # Whether to compile with code to allow interworking between the two # instruction sets. This allows thumb code to be executed on a primarily
Quoted 15 lines · Martin Jansa
* this means that recipes with
ARM_INSTRUCTION_SETexplicitly changed to arm will be built in feed without thumb suffix, the same does apply for workdir, e.g. after "bitbake glib-2.0" you can see:tmp-glibc/work/armv5e-oe-linux-gnueabi:
glib-2.0 glibc glibc-initialtmp-glibc/work/armv5te-oe-linux-gnueabi:
acl db gdk-pixbuf kmod ....and
tmp-glibc/deploy/ipk:
all armv5e armv5te qemuarm
Quoted 6 lines
* feed config should be ok, because all default DEFAULTTUNEs always include "arm" variants of all supported
PACKAGE_ARCHs* for more details see
http://lists.openembedded.org/pipermail/openembedded-core/2014-April/091960.html
the toolchain path issues were resolved in 1.8
One more issue is left.
ERROR: Logfile of failure stored in: /OE/build/oe-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/glibc-locale/2.20-r0/temp/log.do_install.21696 Log data follows:
| DEBUG: Executing shell function do_install | ls: cannot access /OE/build/oe-core/tmp-glibc/sysroots/qemuarm/usr/include/glibc-locale-internal-armv5te-oe-linux-gnueabi//usr/bin: No such file or directory | ls: cannot access /OE/build/oe-core/tmp-glibc/sysroots/qemuarm/usr/include/glibc-locale-internal-armv5te-oe-linux-gnueabi//usr/lib/locale: No such file or directory | cp: cannot stat '/OE/build/oe-core/tmp-glibc/sysroots/qemuarm/usr/include/glibc-locale-internal-armv5te-oe-linux-gnueabi/SUPPORTED': No such file or directory | WARNING: /OE/build/oe-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/glibc-locale/2.20-r0/temp/run.do_install.21696:1 exit 1 from | cp -fpPR /OE/build/oe-core/tmp-glibc/sysroots/qemuarm/usr/include/glibc-locale-internal-armv5te-oe-linux-gnueabi/SUPPORTED /OE/build/oe-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/glibc-locale/2.20-r0 | ERROR: Function failed: do_install (log file is located at /OE/build/oe-core/tmp-glibc/work/armv5te-oe-linux-gnueabi/glibc-locale/2.20-r0/temp/log.do_install.21696)
ERROR: Task 297 (/OE/build/oe-core/openembedded-core/meta/recipes-core/glibc/glibc-locale_2.20.bb, do_install) failed with exit code '1'
glibc-locale and glibc-scripts have PKGARCH in path, but because glibc is "arm" it's actually installed in armv5e (not armv5te):
/OE/build/oe-core/tmp-glibc/sysroots/qemuarm/usr/include/glibc-locale-internal-armv5e-oe-linux-gnueabi/ /OE/build/oe-core/tmp-glibc/sysroots/qemuarm/usr/include/glibc-scripts-internal-armv5e-oe-linux-gnueabi/
Quoted 22 lines
Signed-off-by Martin Jansa <[email protected]>--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-)meta/conf/machine/include/arm/feature-arm-thumb.inc +2
-1@@ -32,7 +32,8 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d)}" +# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb +ARMPKGSFX_THUMB .= "${@ d.getVar('ARM_THUMB_SUFFIX', True) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}" # Whether to compile with code to allow interworking between the two # instruction sets. This allows thumb code to be executed on a primarilySignature · 1 line
2.2.1
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
PATCH v2 1/1 feature-arm-thumb.inc: respect ARM_INSTRUCTION_SET when adding thumb suffix
* this means that recipes with ARM_INSTRUCTION_SET explicitly changed to arm will be built in feed without thumb suffix, the same does apply for workdir, e.g. after "bitbake glib-2.0" you can see:
tmp-glibc/work/armv5e-oe-linux-gnueabi:
glib-2.0 glibc glibc-initial
tmp-glibc/work/armv5te-oe-linux-gnueabi:
acl db gdk-pixbuf kmod ....
and
tmp-glibc/deploy/ipk:
all armv5e armv5te qemuarm
* feed config should be ok, because all default DEFAULTTUNEs always include "arm" variants of all supported PACKAGE_ARCHs
* for more details see
http://lists.openembedded.org/pipermail/openembedded-core/2014-April/091960.html
the toolchain path issues were resolved in 1.8
* add ARM_INSTRUCTION_SET = "arm" to glibc-collateral.inc and comment in glibc.inc to fix glibc-locale and glibc-scripts build
--- meta/conf/machine/include/arm/feature-arm-thumb.inc | 3 ++- meta/recipes-core/glibc/glibc-collateral.inc | 5 +++++ meta/recipes-core/glibc/glibc.inc | 3 +++ 3 files changed, 10 insertions(+), 1 deletion(-)
meta/conf/machine/include/arm/feature-arm-thumb.inc +2 -1
@@ -32,7 +32,8 @@ python () { TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' -m${ARM_M_OPT}', '', d)}" OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ':thumb', '', d)}" -ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_SUFFIX}', '', d)}" +# Add suffix from ARM_THUMB_SUFFIX only if after all this we still set ARM_M_OPT to thumb +ARMPKGSFX_THUMB .= "${@ d.getVar('ARM_THUMB_SUFFIX', True) if d.getVar('ARM_M_OPT', True) == 'thumb' else ''}" # Whether to compile with code to allow interworking between the two # instruction sets. This allows thumb code to be executed on a primarily
meta/recipes-core/glibc/glibc-collateral.inc +5 -0
@@ -2,6 +2,11 @@ INHIBIT_DEFAULT_DEPS = "1" LICENSE = "GPLv2 & LGPLv2.1" HOMEPAGE = "http://www.gnu.org/software/libc/index.html" +# This needs to match with glibc.inc, otherwise glibc-scripts and glibc-locale +# will fail to find main glibc, for details see +# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html +ARM_INSTRUCTION_SET = "arm" + do_fetch[noexec] = "1" do_unpack[noexec] = "1" do_patch[noexec] = "1"
meta/recipes-core/glibc/glibc.inc +3 -0
@@ -61,6 +61,9 @@ GLIBC_EXTRA_OECONF ?= "" GLIBC_EXTRA_OECONF_class-nativesdk = "" INHIBIT_DEFAULT_DEPS = "1" +# This needs to match with glibc-collateral.inc, otherwise glibc-scripts and glibc-locale +# will fail to find main glibc, for details see +# http://lists.openembedded.org/pipermail/openembedded-core/2015-January/100679.html ARM_INSTRUCTION_SET = "arm" # glibc uses PARALLELMFLAGS variable to pass parallel build info so transfer
Signature · 1 line
2.3.0
PATCH 1/1 arch-armv7a.inc, tune-arm920t.inc: Fix PACKAGE_EXTRA_ARCHS
* each DEFAULTTUNE with thumb enabled should list it's arm variants in PACKAGE_EXTRA_ARCHS, otherwise packages which force arm ISA won't be found in do_rootfs
* armv7athf-neon-vfpv4 was missing its own PACKAGE_ARCH and also the arm variant
--- meta/conf/machine/include/arm/arch-armv7a.inc | 2 +- meta/conf/machine/include/tune-arm920t.inc | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-)
meta/conf/machine/include/arm/arch-armv7a.inc +1 -1
@@ -42,7 +42,7 @@ PACKAGE_EXTRA_ARCHS_tune-armv7athf = "${PACKAGE_EXTRA_ARCHS_tune-armv6thf} armv7 PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf} armv7ahf-vfp-neon" PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf} armv7ahf-vfp-neon armv7at2hf-vfp-neon" PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7ahf-neon} armv7ahf-vfp-neon-vfpv4" -PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} armv7athf-vfp-neon-vfpv4" +PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon-vfpv4 = "${PACKAGE_EXTRA_ARCHS_tune-armv7athf-neon} armv7ahf-vfp-neon-vfpv4 armv7at2hf-vfp-neon-vfpv4" # Big Endian AVAILTUNES += "armv7ab armv7atb armv7ab-neon armv7atb-neon"
meta/conf/machine/include/tune-arm920t.inc +1 -1
@@ -8,4 +8,4 @@ TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "arm920t", " -mtune=arm920 AVAILTUNES += "arm920t" ARMPKGARCH_tune-arm920t = "arm920t" TUNE_FEATURES_tune-arm920t = "${TUNE_FEATURES_tune-armv4t} arm920t" -PACKAGE_EXTRA_ARCHS_tune-arm920t = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} arm920tt" +PACKAGE_EXTRA_ARCHS_tune-arm920t = "${PACKAGE_EXTRA_ARCHS_tune-armv4t} arm920t arm920tt"
Signature · 1 line
2.3.0