distro: Move thumb into distro features
RFC PATCH 1/1 distro: Move thumb into distro features
* Currenlty we define the thumb specific overrides in machine tune files and as machine conf files are included before the distro conf files the overrides dont get right values and set incorrectly.
* This patch moves the tune-thumb.inc from machine/include into distro/include and lets distro decide on thumb and thumb-interworking features based on the machine selected. If a machine which does not support thumb like all armv4 based machines is selected then distro makes correct decision now to disable thumb and thumb-interworking based upon the machine seletected.
--- conf/distro/angstrom-2008.1.conf | 1 + conf/distro/gmustix.conf | 2 + conf/distro/include/arm-thumb.inc | 32 +++++++++++++++++++++++++++ conf/distro/kaeilos-2010.conf | 1 + conf/distro/kaeilos.conf | 1 + conf/distro/micro.conf | 1 + conf/distro/minimal.conf | 3 +- conf/distro/shr.conf | 1 + conf/distro/slugos.conf | 2 + conf/machine/include/ixp4xx.inc | 1 - conf/machine/include/tune-arm1136-novfp.inc | 3 -- conf/machine/include/tune-arm1136jf-s.inc | 3 -- conf/machine/include/tune-arm1176jzf-s.inc | 3 -- conf/machine/include/tune-arm920t.inc | 4 --- conf/machine/include/tune-arm926ejs.inc | 3 -- conf/machine/include/tune-arm9tdmi.inc | 4 --- conf/machine/include/tune-armv7.inc | 4 --- conf/machine/include/tune-ep9312.inc | 3 -- conf/machine/include/tune-thumb.inc | 32 --------------------------- conf/machine/include/tune-xscale.inc | 4 --- conf/machine/palmz31.conf | 3 -- conf/machine/palmz72.conf | 3 -- 22 files changed, 43 insertions(+), 71 deletions(-) create mode 100644 conf/distro/include/arm-thumb.inc delete mode 100644 conf/machine/include/tune-thumb.inc
conf/distro/angstrom-2008.1.conf +1 -0
@@ -136,6 +136,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals: require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev"
conf/distro/gmustix.conf +2 -0
@@ -5,6 +5,8 @@ INHERIT += "package_tar package_ipk" LIBC = "uclibc" require conf/distro/include/${LIBC}.inc +require conf/distro/include/arm-thumb.inc + TARGET_OS = "linux-uclibc" TARGET_FPU = "soft" IMAGE_FSTYPES = "jffs2"
conf/distro/include/arm-thumb.inc new file +32 -0
@@ -0,0 +1,32 @@ +#tune file for thumb instructions + +ARM_INSTRUCTION_SET ?= "arm" +# "arm" "thumb" +# The instruction set the compiler should use when generating application +# code. The kernel is always compiled with arm code at present. arm code +# is the original 32 bit ARM instruction set, thumb code is the 16 bit +# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) +# but requires more instructions (140% for 70% smaller code) so may be +# slower. + +THUMB_INTERWORK ?= "no" +# "yes" "no" +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows thumb code to be executed on a primarily +# arm system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. + +OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" + +# Compiler and linker options for application code and kernel code. These +# options ensure that the compiler has the correct settings for the selected +# instruction set and interworking. +ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" + +# +TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" +
conf/distro/kaeilos-2010.conf +1 -0
@@ -96,6 +96,7 @@ PREFERRED_VERSION_gcc-cross-intermediate ?= "${KAEILOS_GCC_VERSION}" PREFERRED_ARM_INSTRUCTION_SET ?= "thumb" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev"
conf/distro/kaeilos.conf +1 -0
@@ -124,6 +124,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals: require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev"
conf/distro/micro.conf +1 -0
@@ -66,6 +66,7 @@ PREFERRED_VERSION_glibc ?= "2.10.1" PREFERRED_VERSION_glibc-initial ?= "2.10.1" PREFERRED_ARM_INSTRUCTION_SET ?= "thumb" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc ############################################################################# # OVERRIDES adjusted from bitbake.conf to feature the MACHINE_CLASS
conf/distro/minimal.conf +2 -1
@@ -16,7 +16,7 @@ DISTRO_VERSION = "dev-snapshot-${SRCDATE}" DISTRO_TYPE ?= "debug" # Ensure some form of release config, so error out if someone thinks he knows better -DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION") +DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION')}" ############################################################################# # FEATURE SELECTION
@@ -86,6 +86,7 @@ MACHINE_KERNEL_VERSION = "2.6" ############################################################################# LIBC ?= "eglibc" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc ############################################################################# # PREFERRED VERSIONS
conf/distro/shr.conf +1 -0
@@ -159,6 +159,7 @@ PREFERRED_VERSION_eglibc ?= "2.12" PREFERRED_VERSION_eglibc-initial ?= "2.12" PREFERRED_GCC_VERSION ?= "4.5" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc # Set some java bits require conf/distro/include/sane-toolchain-java.inc
conf/distro/slugos.conf +2 -0
@@ -22,3 +22,5 @@ require conf/distro/include/slugos.inc # Can be either glibc or eglibc (or perhaps even uclibc) LIBC ?= "eglibc" require conf/distro/include/${LIBC}.inc +require conf/distro/include/arm-thumb.inc +
conf/machine/include/ixp4xx.inc +0 -1
@@ -22,7 +22,6 @@ IMAGE_FSTYPES ?= "jffs2 tar.gz" EXTRA_IMAGECMD_jffs2 = "--pad --eraseblock=0x20000 -n" require conf/machine/include/tune-xscale.inc -require conf/machine/include/tune-thumb.inc #------------------------------------------------------------------------------- # Board defaults
conf/machine/include/tune-arm1136-novfp.inc +0 -3
@@ -5,6 +5,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s" FEED_ARCH = "armv6-novfp" BASE_PACKAGE_ARCH = "armv6-novfp" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6-novfp" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc
conf/machine/include/tune-arm1136jf-s.inc +0 -3
@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" FEED_ARCH = "armv6" BASE_PACKAGE_ARCH = "armv6" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc
conf/machine/include/tune-arm1176jzf-s.inc +0 -3
@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp FEED_ARCH = "armv6" BASE_PACKAGE_ARCH = "armv6" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc
conf/machine/include/tune-arm920t.inc +0 -4
@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t" BASE_PACKAGE_ARCH = "armv4t" TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t" PACKAGE_EXTRA_ARCHS += "armv4 armv4t" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -
conf/machine/include/tune-arm926ejs.inc +0 -3
@@ -5,6 +5,3 @@ PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te" # For gcc 4.x you need: TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s" BASE_PACKAGE_ARCH = "armv5te" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc
conf/machine/include/tune-arm9tdmi.inc +0 -4
@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t" BASE_PACKAGE_ARCH = "armv4t" PACKAGE_EXTRA_ARCHS += "armv4 armv4t" TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -
conf/machine/include/tune-armv7.inc +0 -4
@@ -5,7 +5,3 @@ TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp" FEED_ARCH = "armv7" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7" BASE_PACKAGE_ARCH = "armv7" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -
conf/machine/include/tune-ep9312.inc +0 -3
@@ -5,9 +5,6 @@ PACKAGE_EXTRA_ARCHS += "armv4t ep9312" BASE_PACKAGE_ARCH = "ep9312" FEED_ARCH = "ep9312" -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc - FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros" DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g" SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"
conf/machine/include/tune-thumb.inc deleted +0 -32
@@ -1,32 +0,0 @@ -#tune file for thumb instructions - -ARM_INSTRUCTION_SET ?= "arm" -# "arm" "thumb" -# The instruction set the compiler should use when generating application -# code. The kernel is always compiled with arm code at present. arm code -# is the original 32 bit ARM instruction set, thumb code is the 16 bit -# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) -# but requires more instructions (140% for 70% smaller code) so may be -# slower. - -THUMB_INTERWORK ?= "no" -# "yes" "no" -# Whether to compile with code to allow interworking between the two -# instruction sets. This allows thumb code to be executed on a primarily -# arm system and vice versa. It is strongly recommended that DISTROs not -# turn this off - the actual cost is very small. - -OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" -OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" - -# Compiler and linker options for application code and kernel code. These -# options ensure that the compiler has the correct settings for the selected -# instruction set and interworking. -ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" - -# -TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" -
conf/machine/include/tune-xscale.inc +0 -4
@@ -7,7 +7,3 @@ TARGET_CC_ARCH = "-march=armv5te -mtune=xscale" TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale" PACKAGE_EXTRA_ARCHS += "${@['armv4b armv4tb armv5teb', 'armv4 armv4t armv5te'][ bb.data.getVar('TARGET_ARCH', d, 1) == 'arm']}" BASE_PACKAGE_ARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('TARGET_ARCH', d, 1) == 'arm']}" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -
conf/machine/palmz31.conf +0 -3
@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "160" SERIAL_CONSOLE = "115200 ttyS0" -# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc - MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \ kernel-module-i2c-algo-pxa \ kernel-module-i2c-dev \
conf/machine/palmz72.conf +0 -3
@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "320" SERIAL_CONSOLE = "115200 ttyS0" -# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc - MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \ kernel-module-i2c-algo-pxa \ kernel-module-i2c-dev \
Signature · 1 line
1.7.0.4
Quoted 10 lines · Khem Raj
* Currenlty we define the thumb specific overrides in machine tune files and as machine conf files are included before the distro conf files the overrides dont get right values and set incorrectly.
* This patch moves the tune-thumb.inc from machine/include into distro/include and lets distro decide on thumb and thumb-interworking features based on the machine selected. If a machine which does not support thumb like all armv4 based machines is selected then distro makes correct decision now to disable thumb and thumb-interworking based upon the machine seletected.
I accidentally hit push button in wrong branch and this commit got pushed I will revert it once I get home later today if someone gets bitten before feel free to revert it.
Quoted 359 lines
Signed-off-by Khem Raj <[email protected]>---
conf/distro/angstrom-2008.1.conf | 1 +conf/distro/gmustix.conf| 2 + conf/distro/include/arm-thumb.inc | 32 +++++++++++++++++++++++++++conf/distro/kaeilos-2010.conf| 1 +conf/distro/kaeilos.conf| 1 +conf/distro/micro.conf| 1 +conf/distro/minimal.conf| 3 +-conf/distro/shr.conf| 1 +conf/distro/slugos.conf| 2 + conf/machine/include/ixp4xx.inc | 1 - conf/machine/include/tune-arm1136-novfp.inc | 3 -- conf/machine/include/tune-arm1136jf-s.inc | 3 -- conf/machine/include/tune-arm1176jzf-s.inc | 3 -- conf/machine/include/tune-arm920t.inc | 4 --- conf/machine/include/tune-arm926ejs.inc | 3 -- conf/machine/include/tune-arm9tdmi.inc | 4 ---conf/machine/include/tune-armv7.inc | 4 --- conf/machine/include/tune-ep9312.inc | 3 -- conf/machine/include/tune-thumb.inc | 32 --------------------------- conf/machine/include/tune-xscale.inc | 4 --- conf/machine/palmz31.conf | 3 -- conf/machine/palmz72.conf | 3 -- 22 files changed, 43 insertions(+), 71 deletions(-)create mode 100644 conf/distro/include/arm-thumb.inc delete mode 100644 conf/machine/include/tune-thumb.inc
conf/distro/angstrom-2008.1.conf +0
-0@@ -136,6 +136,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals:require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc
PREFERRED_PROVIDER_dbus-glib = "dbus-glib"
PREFERRED_PROVIDER_hotplug= "udev"conf/distro/gmustix.conf +0
-0@@ -5,6 +5,8 @@INHERIT += "
package_tarpackage_ipk"
LIBC = "uclibc"
require conf/distro/include/${LIBC}.incconf/distro/gmustix.conf +2
-0+require conf/distro/include/arm-thumb.inc +TARGET_OS = "linux-uclibc"
TARGET_FPU = "soft"
IMAGE_FSTYPES = "jffs2"conf/distro/include/arm-thumb.inc new file +32
-0@@ -0,0 +1,32 @@ +#tune file for thumb instructions + +ARM_INSTRUCTION_SET ?= "arm" +# "arm" "thumb" +# The instruction set the compiler should use when generating application +# code. The kernel is always compiled with arm code at present. arm code +# is the original 32 bit ARM instruction set, thumb code is the 16 bit +# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) +# but requires more instructions (140% for 70% smaller code) so may be +# slower. + +THUMB_INTERWORK ?= "no" +# "yes" "no" +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows thumb code to be executed on a primarily +# arm system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. + +OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" + +# Compiler and linker options for application code and kernel code. These +# options ensure that the compiler has the correct settings for the selected +# instruction set and interworking. +ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" + +# +TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" +conf/distro/kaeilos-2010.conf +0
-0@@ -96,6 +96,7 @@ PREFERRED_VERSION_gcc-cross-intermediate ?= "${KAEILOS_GCC_VERSION}"PREFERRED_ARM_INSTRUCTION_SET ?= "thumb"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.incPREFERRED_PROVIDER_dbus-glib = "dbus-glib"
PREFERRED_PROVIDER_hotplug= "udev"conf/distro/kaeilos.conf +0
-0@@ -124,6 +124,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals:require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc
PREFERRED_PROVIDER_dbus-glib = "dbus-glib"
PREFERRED_PROVIDER_hotplug= "udev"conf/distro/micro.conf +0
-0@@ -66,6 +66,7 @@ PREFERRED_VERSION_glibc ?= "2.10.1"PREFERRED_VERSION_glibc-initial ?= "2.10.1"
PREFERRED_ARM_INSTRUCTION_SET ?= "thumb"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.inc#############################################################################
# OVERRIDES adjusted from bitbake.conf to feature theMACHINE_CLASSconf/distro/minimal.conf +0
-0@@ -16,7 +16,7 @@ DISTRO_VERSION = "dev-snapshot-${SRCDATE}"DISTRO_TYPE ?= "debug"
# Ensure some form of release config, so error out if someone thinks he knows better
conf/distro/minimal.conf +1
-1-DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION") +DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION')}"#############################################################################
# FEATURE SELECTIONconf/distro/minimal.conf +0
-0@@ -86,6 +86,7 @@ MACHINE_KERNEL_VERSION = "2.6" #############################################################################LIBC ?= "eglibc"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.inc#############################################################################
# PREFERRED VERSIONSconf/distro/shr.conf +0
-0@@ -159,6 +159,7 @@ PREFERRED_VERSION_eglibc ?= "2.12"PREFERRED_VERSION_eglibc-initial ?= "2.12"
PREFERRED_GCC_VERSION ?= "4.5"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.inc# Set some java bits
require conf/distro/include/sane-toolchain-java.incconf/distro/slugos.conf +0
-0@@ -22,3 +22,5 @@ require conf/distro/include/slugos.inc # Can be either glibc or eglibc (or perhaps even uclibc)LIBC ?= "eglibc"
require conf/distro/include/${LIBC}.incconf/distro/slugos.conf +2
-0+require conf/distro/include/arm-thumb.inc +conf/machine/include/ixp4xx.inc +0
-0@@ -22,7 +22,6 @@ IMAGE_FSTYPES ?= "jffs2 tar.gz"EXTRA_IMAGECMD_jffs2 = "--pad --eraseblock=0x20000 -n"
require conf/machine/include/tune-xscale.inc
-require conf/machine/include/tune-thumb.inc#-------------------------------------------------------------------------------
# Board defaultsconf/machine/include/tune-arm1136-novfp.inc +0
-0@@ -5,6 +5,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s"FEED_ARCH = "armv6-novfp"
BASE_PACKAGE_ARCH = "armv6-novfp"PACKAGE_EXTRA_ARCHS+= "armv4 armv4t armv5te armv6-novfp"conf/machine/include/tune-arm1136-novfp.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm1136jf-s.inc +0
-0@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp"FEED_ARCH = "armv6"
BASE_PACKAGE_ARCH = "armv6"PACKAGE_EXTRA_ARCHS+= "armv4 armv4t armv5te armv6"conf/machine/include/tune-arm1136jf-s.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm1176jzf-s.inc +0
-0@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfpFEED_ARCH = "armv6"
BASE_PACKAGE_ARCH = "armv6"PACKAGE_EXTRA_ARCHS+= "armv4 armv4t armv5te armv6"conf/machine/include/tune-arm1176jzf-s.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm920t.inc +0
-0@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t"BASE_PACKAGE_ARCH = "armv4t"
TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
PACKAGE_EXTRA_ARCHS += "armv4 armv4t"conf/machine/include/tune-arm920t.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-arm926ejs.inc +0
-0@@ -5,6 +5,3 @@ PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te" # For gcc 4.x you need:TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s"
BASE_PACKAGE_ARCH= "armv5te"conf/machine/include/tune-arm926ejs.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm9tdmi.inc +0
-0@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t"BASE_PACKAGE_ARCH = "armv4t"
PACKAGE_EXTRA_ARCHS+= "armv4 armv4t"TARGET_CC_ARCH= "-mcpu=arm9tdmi -mtune=arm9tdmi"conf/machine/include/tune-arm9tdmi.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-armv7.inc +0
-0@@ -5,7 +5,3 @@ TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"FEED_ARCH = "armv7"
PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7"BASE_PACKAGE_ARCH= "armv7"conf/machine/include/tune-armv7.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-ep9312.inc +0
-0@@ -5,9 +5,6 @@ PACKAGE_EXTRA_ARCHS += "armv4t ep9312"BASE_PACKAGE_ARCH = "ep9312"
FEED_ARCH = "ep9312"conf/machine/include/tune-ep9312.inc +0
-3-# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
DEBUG_OPTIMIZATION= "-O -fno-omit-frame-pointer -g"
SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"conf/machine/include/tune-thumb.inc deleted +0
-32@@ -1,32 +0,0 @@ -#tune file for thumb instructions - -ARM_INSTRUCTION_SET ?= "arm" -# "arm" "thumb" -# The instruction set the compiler should use when generating application -# code. The kernel is always compiled with arm code at present. arm code -# is the original 32 bit ARM instruction set, thumb code is the 16 bit -# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) -# but requires more instructions (140% for 70% smaller code) so may be -# slower. - -THUMB_INTERWORK ?= "no" -# "yes" "no" -# Whether to compile with code to allow interworking between the two -# instruction sets. This allows thumb code to be executed on a primarily -# arm system and vice versa. It is strongly recommended that DISTROs not -# turn this off - the actual cost is very small. - -OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" -OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" - -# Compiler and linker options for application code and kernel code. These -# options ensure that the compiler has the correct settings for the selected -# instruction set and interworking. -ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" - -# -TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" -conf/machine/include/tune-xscale.inc +0
-0@@ -7,7 +7,3 @@ TARGET_CC_ARCH = "-march=armv5te -mtune=xscale"TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale"
PACKAGE_EXTRA_ARCHS += "${@['armv4b armv4tb armv5teb', 'armv4 armv4t armv5te'][bb.data.getVar('TARGET_ARCH', d, 1)== 'arm']}"BASE_PACKAGE_ARCH= "${@['armv5teb', 'armv5te'][bb.data.getVar('TARGET_ARCH', d, 1) == 'arm']}"conf/machine/include/tune-xscale.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/palmz31.conf +0
-0@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "160"SERIAL_CONSOLE = "115200 ttyS0"
conf/machine/palmz31.conf +0
-3-# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc -MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \
kernel-module-i2c-algo-pxa \
kernel-module-i2c-dev \conf/machine/palmz72.conf +0
-0@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "320"SERIAL_CONSOLE = "115200 ttyS0"
conf/machine/palmz72.conf +0
-3-# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc -MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \
kernel-module-i2c-algo-pxa \
kernel-module-i2c-dev \
--
1.7.0.4
Quoted 12 lines · Khem Raj
Quoted 10 lines · Khem Raj
* Currenlty we define the thumb specific overrides in machine tune files and as machine conf files are included before the distro conf files the overrides dont get right values and set incorrectly.
* This patch moves the tune-thumb.inc from machine/include into distro/include and lets distro decide on thumb and thumb-interworking features based on the machine selected. If a machine which does not support thumb like all armv4 based machines is selected then distro makes correct decision now to disable thumb and thumb-interworking based upon the machine seletected.
Quoted 3 lines
I accidentally hit push button in wrong branch and this commit got pushed I will revert it once I get home later today if someone gets bitten before feel free to revert it.
Done. Meanwhile, Does this patch look ok for .dev ? I would like some ACKs
Thanks
-Khem
Quoted 361 lines
Quoted 360 lines
Signed-off-by Khem Raj <[email protected]>---
conf/distro/angstrom-2008.1.conf | 1 +conf/distro/gmustix.conf| 2 + conf/distro/include/arm-thumb.inc | 32 +++++++++++++++++++++++++++conf/distro/kaeilos-2010.conf| 1 +conf/distro/kaeilos.conf| 1 +conf/distro/micro.conf| 1 +conf/distro/minimal.conf| 3 +-conf/distro/shr.conf| 1 +conf/distro/slugos.conf| 2 + conf/machine/include/ixp4xx.inc | 1 - conf/machine/include/tune-arm1136-novfp.inc | 3 -- conf/machine/include/tune-arm1136jf-s.inc | 3 -- conf/machine/include/tune-arm1176jzf-s.inc | 3 -- conf/machine/include/tune-arm920t.inc | 4 --- conf/machine/include/tune-arm926ejs.inc | 3 -- conf/machine/include/tune-arm9tdmi.inc | 4 ---conf/machine/include/tune-armv7.inc | 4 --- conf/machine/include/tune-ep9312.inc | 3 -- conf/machine/include/tune-thumb.inc | 32 --------------------------- conf/machine/include/tune-xscale.inc | 4 --- conf/machine/palmz31.conf | 3 -- conf/machine/palmz72.conf | 3 -- 22 files changed, 43 insertions(+), 71 deletions(-)create mode 100644 conf/distro/include/arm-thumb.inc delete mode 100644 conf/machine/include/tune-thumb.inc
conf/distro/angstrom-2008.1.conf +0
-0@@ -136,6 +136,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals:require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc
PREFERRED_PROVIDER_dbus-glib = "dbus-glib"
PREFERRED_PROVIDER_hotplug= "udev"conf/distro/gmustix.conf +0
-0@@ -5,6 +5,8 @@INHERIT += "
package_tarpackage_ipk"
LIBC = "uclibc"
require conf/distro/include/${LIBC}.incconf/distro/gmustix.conf +2
-0+require conf/distro/include/arm-thumb.inc +TARGET_OS = "linux-uclibc"
TARGET_FPU = "soft"
IMAGE_FSTYPES = "jffs2"conf/distro/include/arm-thumb.inc new file +32
-0@@ -0,0 +1,32 @@ +#tune file for thumb instructions + +ARM_INSTRUCTION_SET ?= "arm" +# "arm" "thumb" +# The instruction set the compiler should use when generating application +# code. The kernel is always compiled with arm code at present. arm code +# is the original 32 bit ARM instruction set, thumb code is the 16 bit +# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) +# but requires more instructions (140% for 70% smaller code) so may be +# slower. + +THUMB_INTERWORK ?= "no" +# "yes" "no" +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows thumb code to be executed on a primarily +# arm system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. + +OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" + +# Compiler and linker options for application code and kernel code. These +# options ensure that the compiler has the correct settings for the selected +# instruction set and interworking. +ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" + +# +TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" +conf/distro/kaeilos-2010.conf +0
-0@@ -96,6 +96,7 @@ PREFERRED_VERSION_gcc-cross-intermediate ?= "${KAEILOS_GCC_VERSION}"PREFERRED_ARM_INSTRUCTION_SET ?= "thumb"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.incPREFERRED_PROVIDER_dbus-glib = "dbus-glib"
PREFERRED_PROVIDER_hotplug= "udev"conf/distro/kaeilos.conf +0
-0@@ -124,6 +124,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals:require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc
PREFERRED_PROVIDER_dbus-glib = "dbus-glib"
PREFERRED_PROVIDER_hotplug= "udev"conf/distro/micro.conf +0
-0@@ -66,6 +66,7 @@ PREFERRED_VERSION_glibc ?= "2.10.1"PREFERRED_VERSION_glibc-initial ?= "2.10.1"
PREFERRED_ARM_INSTRUCTION_SET ?= "thumb"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.inc#############################################################################
# OVERRIDES adjusted from bitbake.conf to feature theMACHINE_CLASSconf/distro/minimal.conf +0
-0@@ -16,7 +16,7 @@ DISTRO_VERSION = "dev-snapshot-${SRCDATE}"DISTRO_TYPE ?= "debug"
# Ensure some form of release config, so error out if someone thinks he knows better
conf/distro/minimal.conf +1
-1-DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION") +DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION')}"#############################################################################
# FEATURE SELECTIONconf/distro/minimal.conf +0
-0@@ -86,6 +86,7 @@ MACHINE_KERNEL_VERSION = "2.6" #############################################################################LIBC ?= "eglibc"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.inc#############################################################################
# PREFERRED VERSIONSconf/distro/shr.conf +0
-0@@ -159,6 +159,7 @@ PREFERRED_VERSION_eglibc ?= "2.12"PREFERRED_VERSION_eglibc-initial ?= "2.12"
PREFERRED_GCC_VERSION ?= "4.5"
require conf/distro/include/sane-toolchain.inc
+require conf/distro/include/arm-thumb.inc# Set some java bits
require conf/distro/include/sane-toolchain-java.incconf/distro/slugos.conf +0
-0@@ -22,3 +22,5 @@ require conf/distro/include/slugos.inc # Can be either glibc or eglibc (or perhaps even uclibc)LIBC ?= "eglibc"
require conf/distro/include/${LIBC}.incconf/distro/slugos.conf +2
-0+require conf/distro/include/arm-thumb.inc +conf/machine/include/ixp4xx.inc +0
-0@@ -22,7 +22,6 @@ IMAGE_FSTYPES ?= "jffs2 tar.gz"EXTRA_IMAGECMD_jffs2 = "--pad --eraseblock=0x20000 -n"
require conf/machine/include/tune-xscale.inc
-require conf/machine/include/tune-thumb.inc#-------------------------------------------------------------------------------
# Board defaultsconf/machine/include/tune-arm1136-novfp.inc +0
-0@@ -5,6 +5,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s"FEED_ARCH = "armv6-novfp"
BASE_PACKAGE_ARCH = "armv6-novfp"PACKAGE_EXTRA_ARCHS+= "armv4 armv4t armv5te armv6-novfp"conf/machine/include/tune-arm1136-novfp.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm1136jf-s.inc +0
-0@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp"FEED_ARCH = "armv6"
BASE_PACKAGE_ARCH = "armv6"PACKAGE_EXTRA_ARCHS+= "armv4 armv4t armv5te armv6"conf/machine/include/tune-arm1136jf-s.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm1176jzf-s.inc +0
-0@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfpFEED_ARCH = "armv6"
BASE_PACKAGE_ARCH = "armv6"PACKAGE_EXTRA_ARCHS+= "armv4 armv4t armv5te armv6"conf/machine/include/tune-arm1176jzf-s.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm920t.inc +0
-0@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t"BASE_PACKAGE_ARCH = "armv4t"
TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t"
PACKAGE_EXTRA_ARCHS += "armv4 armv4t"conf/machine/include/tune-arm920t.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-arm926ejs.inc +0
-0@@ -5,6 +5,3 @@ PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te" # For gcc 4.x you need:TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s"
BASE_PACKAGE_ARCH= "armv5te"conf/machine/include/tune-arm926ejs.inc +0
-3- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm9tdmi.inc +0
-0@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t"BASE_PACKAGE_ARCH = "armv4t"
PACKAGE_EXTRA_ARCHS+= "armv4 armv4t"TARGET_CC_ARCH= "-mcpu=arm9tdmi -mtune=arm9tdmi"conf/machine/include/tune-arm9tdmi.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-armv7.inc +0
-0@@ -5,7 +5,3 @@ TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp"FEED_ARCH = "armv7"
PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7"BASE_PACKAGE_ARCH= "armv7"conf/machine/include/tune-armv7.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-ep9312.inc +0
-0@@ -5,9 +5,6 @@ PACKAGE_EXTRA_ARCHS += "armv4t ep9312"BASE_PACKAGE_ARCH = "ep9312"
FEED_ARCH = "ep9312"conf/machine/include/tune-ep9312.inc +0
-3-# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros"
DEBUG_OPTIMIZATION= "-O -fno-omit-frame-pointer -g"
SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"conf/machine/include/tune-thumb.inc deleted +0
-32@@ -1,32 +0,0 @@ -#tune file for thumb instructions - -ARM_INSTRUCTION_SET ?= "arm" -# "arm" "thumb" -# The instruction set the compiler should use when generating application -# code. The kernel is always compiled with arm code at present. arm code -# is the original 32 bit ARM instruction set, thumb code is the 16 bit -# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) -# but requires more instructions (140% for 70% smaller code) so may be -# slower. - -THUMB_INTERWORK ?= "no" -# "yes" "no" -# Whether to compile with code to allow interworking between the two -# instruction sets. This allows thumb code to be executed on a primarily -# arm system and vice versa. It is strongly recommended that DISTROs not -# turn this off - the actual cost is very small. - -OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" -OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" - -# Compiler and linker options for application code and kernel code. These -# options ensure that the compiler has the correct settings for the selected -# instruction set and interworking. -ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" - -# -TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" -conf/machine/include/tune-xscale.inc +0
-0@@ -7,7 +7,3 @@ TARGET_CC_ARCH = "-march=armv5te -mtune=xscale"TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale"
PACKAGE_EXTRA_ARCHS += "${@['armv4b armv4tb armv5teb', 'armv4 armv4t armv5te'][bb.data.getVar('TARGET_ARCH', d, 1)== 'arm']}"BASE_PACKAGE_ARCH= "${@['armv5teb', 'armv5te'][bb.data.getVar('TARGET_ARCH', d, 1) == 'arm']}"conf/machine/include/tune-xscale.inc +0
-4- -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/palmz31.conf +0
-0@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "160"SERIAL_CONSOLE = "115200 ttyS0"
conf/machine/palmz31.conf +0
-3-# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc -MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \
kernel-module-i2c-algo-pxa \
kernel-module-i2c-dev \conf/machine/palmz72.conf +0
-0@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "320"SERIAL_CONSOLE = "115200 ttyS0"
conf/machine/palmz72.conf +0
-3-# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc -MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \
kernel-module-i2c-algo-pxa \
kernel-module-i2c-dev \
--
1.7.0.4
Martin Jansa
Acked-byQuoted 13 lines · Khem Raj
Quoted 12 lines · Khem Raj
Quoted 10 lines · Khem Raj
* Currenlty we define the thumb specific overrides in machine tune files and as machine conf files are included before the distro conf files the overrides dont get right values and set incorrectly.
* This patch moves the tune-thumb.inc from machine/include into distro/include and lets distro decide on thumb and thumb-interworking features based on the machine selected. If a machine which does not support thumb like all armv4 based machines is selected then distro makes correct decision now to disable thumb and thumb-interworking based upon the machine seletected.
Quoted 5 lines
Quoted 3 lines
I accidentally hit push button in wrong branch and this commit got pushed I will revert it once I get home later today if someone gets bitten before feel free to revert it.
Done. Meanwhile, Does this patch look ok for .dev ? I would like some ACKs
Looks fine for SHR
Signature · 1 line
Martin 'JaMa' Jansa jabber: [email protected]
Koen Kooi
Acked-by-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Quoted 13 lines · Khem Raj
Quoted 12 lines · Khem Raj
Quoted 10 lines · Khem Raj
* Currenlty we define the thumb specific overrides in machine tune files and as machine conf files are included before the distro conf files the overrides dont get right values and set incorrectly.
* This patch moves the tune-thumb.inc from machine/include into distro/include and lets distro decide on thumb and thumb-interworking features based on the machine selected. If a machine which does not support thumb like all armv4 based machines is selected then distro makes correct decision now to disable thumb and thumb-interworking based upon the machine seletected.
Quoted 5 lines
Quoted 3 lines
I accidentally hit push button in wrong branch and this commit got pushed I will revert it once I get home later today if someone gets bitten before feel free to revert it.
Done. Meanwhile, Does this patch look ok for .dev ? I would like some ACKs
Looks fine for angstrom:
Quoted 365 lines
Thanks
-KhemQuoted 361 lines
Quoted 360 lines
Signed-off-by Khem Raj <[email protected]>--- conf/distro/angstrom-2008.1.conf | 1 + conf/distro/gmustix.conf | 2 + conf/distro/include/arm-thumb.inc | 32 +++++++++++++++++++++++++++ conf/distro/kaeilos-2010.conf | 1 + conf/distro/kaeilos.conf | 1 + conf/distro/micro.conf | 1 + conf/distro/minimal.conf | 3 +- conf/distro/shr.conf | 1 + conf/distro/slugos.conf | 2 + conf/machine/include/ixp4xx.inc | 1 - conf/machine/include/tune-arm1136-novfp.inc | 3 -- conf/machine/include/tune-arm1136jf-s.inc | 3 -- conf/machine/include/tune-arm1176jzf-s.inc | 3 -- conf/machine/include/tune-arm920t.inc | 4 --- conf/machine/include/tune-arm926ejs.inc | 3 -- conf/machine/include/tune-arm9tdmi.inc | 4 --- conf/machine/include/tune-armv7.inc | 4 --- conf/machine/include/tune-ep9312.inc | 3 -- conf/machine/include/tune-thumb.inc | 32 --------------------------- conf/machine/include/tune-xscale.inc | 4 --- conf/machine/palmz31.conf | 3 -- conf/machine/palmz72.conf | 3 -- 22 files changed, 43 insertions(+), 71 deletions(-) create mode 100644 conf/distro/include/arm-thumb.inc delete mode 100644 conf/machine/include/tune-thumb.incconf/distro/angstrom-2008.1.conf +1
-0@@ -136,6 +136,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals: require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev"conf/distro/gmustix.conf +2
-0@@ -5,6 +5,8 @@ INHERIT += "package_tar package_ipk" LIBC = "uclibc" require conf/distro/include/${LIBC}.inc +require conf/distro/include/arm-thumb.inc + TARGET_OS = "linux-uclibc" TARGET_FPU = "soft" IMAGE_FSTYPES = "jffs2"conf/distro/include/arm-thumb.inc new file +32
-0@@ -0,0 +1,32 @@ +#tune file for thumb instructions + +ARM_INSTRUCTION_SET ?= "arm" +# "arm" "thumb" +# The instruction set the compiler should use when generating application +# code. The kernel is always compiled with arm code at present. arm code +# is the original 32 bit ARM instruction set, thumb code is the 16 bit +# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) +# but requires more instructions (140% for 70% smaller code) so may be +# slower. + +THUMB_INTERWORK ?= "no" +# "yes" "no" +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows thumb code to be executed on a primarily +# arm system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. + +OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" +OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" + +# Compiler and linker options for application code and kernel code. These +# options ensure that the compiler has the correct settings for the selected +# instruction set and interworking. +ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" +ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" + +# +TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" +TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" +conf/distro/kaeilos-2010.conf +1
-0@@ -96,6 +96,7 @@ PREFERRED_VERSION_gcc-cross-intermediate ?= "${KAEILOS_GCC_VERSION}" PREFERRED_ARM_INSTRUCTION_SET ?= "thumb" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev"conf/distro/kaeilos.conf +1
-0@@ -124,6 +124,7 @@ PREFERRED_VERSION_binutils-cross-sdk_avr32 = "2.17" # Toolchain virtuals: require conf/distro/include/toolchain-${TOOLCHAIN_TYPE}.inc +require conf/distro/include/arm-thumb.inc PREFERRED_PROVIDER_dbus-glib = "dbus-glib" PREFERRED_PROVIDER_hotplug = "udev"conf/distro/micro.conf +1
-0@@ -66,6 +66,7 @@ PREFERRED_VERSION_glibc ?= "2.10.1" PREFERRED_VERSION_glibc-initial ?= "2.10.1" PREFERRED_ARM_INSTRUCTION_SET ?= "thumb" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc ############################################################################# # OVERRIDES adjusted from bitbake.conf to feature the MACHINE_CLASSconf/distro/minimal.conf +2
-1@@ -16,7 +16,7 @@ DISTRO_VERSION = "dev-snapshot-${SRCDATE}" DISTRO_TYPE ?= "debug" # Ensure some form of release config, so error out if someone thinks he knows better -DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION") +DISTRO_CHECK := "${@bb.data.getVar('DISTRO_VERSION',d,1) or bb.fatal('Remove this line or set a dummy DISTRO_VERSION')}" ############################################################################# # FEATURE SELECTION@@ -86,6 +86,7 @@ MACHINE_KERNEL_VERSION = "2.6" ############################################################################# LIBC ?= "eglibc" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc ############################################################################# # PREFERRED VERSIONSconf/distro/shr.conf +1
-0@@ -159,6 +159,7 @@ PREFERRED_VERSION_eglibc ?= "2.12" PREFERRED_VERSION_eglibc-initial ?= "2.12" PREFERRED_GCC_VERSION ?= "4.5" require conf/distro/include/sane-toolchain.inc +require conf/distro/include/arm-thumb.inc # Set some java bits require conf/distro/include/sane-toolchain-java.incconf/distro/slugos.conf +2
-0@@ -22,3 +22,5 @@ require conf/distro/include/slugos.inc # Can be either glibc or eglibc (or perhaps even uclibc) LIBC ?= "eglibc" require conf/distro/include/${LIBC}.inc +require conf/distro/include/arm-thumb.inc +conf/machine/include/ixp4xx.inc +0
-1@@ -22,7 +22,6 @@ IMAGE_FSTYPES ?= "jffs2 tar.gz" EXTRA_IMAGECMD_jffs2 = "--pad --eraseblock=0x20000 -n" require conf/machine/include/tune-xscale.inc -require conf/machine/include/tune-thumb.inc #------------------------------------------------------------------------------- # Board defaultsconf/machine/include/tune-arm1136-novfp.inc +0
-3@@ -5,6 +5,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s" FEED_ARCH = "armv6-novfp" BASE_PACKAGE_ARCH = "armv6-novfp" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6-novfp" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm1136jf-s.inc +0
-3@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1136jf-s -mfpu=vfp -mfloat-abi=softfp" FEED_ARCH = "armv6" BASE_PACKAGE_ARCH = "armv6" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm1176jzf-s.inc +0
-3@@ -2,6 +2,3 @@ TARGET_CC_ARCH = "-march=armv6j -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=softfp FEED_ARCH = "armv6" BASE_PACKAGE_ARCH = "armv6" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm920t.inc +0
-4@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t" BASE_PACKAGE_ARCH = "armv4t" TARGET_CC_ARCH = "-march=armv4t -mtune=arm920t" PACKAGE_EXTRA_ARCHS += "armv4 armv4t" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-arm926ejs.inc +0
-3@@ -5,6 +5,3 @@ PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te" # For gcc 4.x you need: TARGET_CC_ARCH = "-march=armv5te -mtune=arm926ej-s" BASE_PACKAGE_ARCH = "armv5te" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.incconf/machine/include/tune-arm9tdmi.inc +0
-4@@ -2,7 +2,3 @@ FEED_ARCH = "armv4t" BASE_PACKAGE_ARCH = "armv4t" PACKAGE_EXTRA_ARCHS += "armv4 armv4t" TARGET_CC_ARCH = "-mcpu=arm9tdmi -mtune=arm9tdmi" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-armv7.inc +0
-4@@ -5,7 +5,3 @@ TARGET_CC_ARCH = "-march=armv7 -mfpu=vfp -mfloat-abi=softfp" FEED_ARCH = "armv7" PACKAGE_EXTRA_ARCHS += "armv4 armv4t armv5te armv6 armv7" BASE_PACKAGE_ARCH = "armv7" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/include/tune-ep9312.inc +0
-3@@ -5,9 +5,6 @@ PACKAGE_EXTRA_ARCHS += "armv4t ep9312" BASE_PACKAGE_ARCH = "ep9312" FEED_ARCH = "ep9312" -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc - FULL_OPTIMIZATION = "-fexpensive-optimizations -fomit-frame-pointer -frename-registers -O -fno-signed-zeros" DEBUG_OPTIMIZATION = "-O -fno-omit-frame-pointer -g" SELECTED_OPTIMIZATION = "${@bb.data.getVar(['FULL_OPTIMIZATION', 'DEBUG_OPTIMIZATION'][bb.data.getVar('DEBUG_BUILD', d, 1) == '1'], d, 1)}"conf/machine/include/tune-thumb.inc deleted +0
-32@@ -1,32 +0,0 @@ -#tune file for thumb instructions - -ARM_INSTRUCTION_SET ?= "arm" -# "arm" "thumb" -# The instruction set the compiler should use when generating application -# code. The kernel is always compiled with arm code at present. arm code -# is the original 32 bit ARM instruction set, thumb code is the 16 bit -# encoded RISC sub-set. Thumb code is smaller (maybe 70% of the ARM size) -# but requires more instructions (140% for 70% smaller code) so may be -# slower. - -THUMB_INTERWORK ?= "no" -# "yes" "no" -# Whether to compile with code to allow interworking between the two -# instruction sets. This allows thumb code to be executed on a primarily -# arm system and vice versa. It is strongly recommended that DISTROs not -# turn this off - the actual cost is very small. - -OVERRIDE_THUMB = "${@['', ':thumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" -OVERRIDE_INTERWORK = "${@['', ':thumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -OVERRIDES .= "${OVERRIDE_THUMB}${OVERRIDE_INTERWORK}" - -# Compiler and linker options for application code and kernel code. These -# options ensure that the compiler has the correct settings for the selected -# instruction set and interworking. -ARM_INTERWORK_M_OPT = "${@['-mno-thumb-interwork', '-mthumb-interwork'][bb.data.getVar('THUMB_INTERWORK', d, 1) == 'yes']}" -ARM_THUMB_M_OPT = "${@['-mno-thumb', '-mthumb'][bb.data.getVar('ARM_INSTRUCTION_SET', d, 1) == 'thumb']}" - -# -TARGET_CC_ARCH += "${ARM_INTERWORK_M_OPT} ${ARM_THUMB_M_OPT}" -TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -mno-thumb" -conf/machine/include/tune-xscale.inc +0
-4@@ -7,7 +7,3 @@ TARGET_CC_ARCH = "-march=armv5te -mtune=xscale" TARGET_CC_KERNEL_ARCH = "-march=armv5te -mtune=xscale" PACKAGE_EXTRA_ARCHS += "${@['armv4b armv4tb armv5teb', 'armv4 armv4t armv5te'][ bb.data.getVar('TARGET_ARCH', d, 1) == 'arm']}" BASE_PACKAGE_ARCH = "${@['armv5teb', 'armv5te'][bb.data.getVar('TARGET_ARCH', d, 1) == 'arm']}" - -# Include tune file for thumb support, it defaults to off so DISTROs can turn it on if they wish -require conf/machine/include/tune-thumb.inc -conf/machine/palmz31.conf +0
-3@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "160" SERIAL_CONSOLE = "115200 ttyS0" -# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc - MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \ kernel-module-i2c-algo-pxa \ kernel-module-i2c-dev \conf/machine/palmz72.conf +0
-4@@ -11,9 +11,6 @@ MACHINE_DISPLAY_HEIGHT_PIXELS = "320" SERIAL_CONSOLE = "115200 ttyS0" -# Use tune-xscale per default. Machine independent feeds should be built with tune-strongarm. -require conf/machine/include/tune-thumb.inc - MACHINE_EXTRA_RRECOMMENDS += "kernel-module-i2c-pxa \ kernel-module-i2c-algo-pxa \ kernel-module-i2c-dev \ --1.7.0.4
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.5 (Darwin)
iD8DBQFMRq4AMkyGM64RGpERAogkAKCEPf6FWvOreFYMwyZ0+ChRWAoXYQCeI+a4 mzG9x4FFqiWX/AlMgvIwZtY=
=LD4G
-----END PGP SIGNATURE-----