Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 1 | DEFAULTTUNE ?= "armv4" |
| 2 | |
| 3 | TUNEVALID[arm] = "Enable ARM instruction set" |
| 4 | TUNEVALID[armv4] = "Enable instructions for ARMv4" |
Brad Bishop | 1932369 | 2019-04-05 15:28:33 -0400 | [diff] [blame] | 5 | TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4t', '', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 6 | # enable --fix-v4bx when we have armv4 in TUNE_FEATURES, but then disable it when we have also armv5 or thumb |
| 7 | # maybe we should extend bb.utils.contains to support check for any checkvalues in value, now it does |
| 8 | # checkvalues.issubset(val) which cannot be used for negative test of foo neither bar in value |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 9 | FIX_V4BX_ARMV4 = "${@bb.utils.contains('TUNE_FEATURES', 'armv4', '--fix-v4bx', '', d)}" |
| 10 | FIX_V4BX_ARMV5 = "${@bb.utils.contains('TUNE_FEATURES', 'armv5', '', '${FIX_V4BX_ARMV4}', d)}" |
| 11 | FIX_V4BX = "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '', '${FIX_V4BX_ARMV5}', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 12 | TARGET_LD_KERNEL_ARCH += "${FIX_V4BX}" |
Andrew Geissler | c3d88e4 | 2020-10-02 09:45:00 -0500 | [diff] [blame] | 13 | MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 'armv4:', '', d)}" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 14 | |
| 15 | require conf/machine/include/arm/arch-arm.inc |
| 16 | require conf/machine/include/arm/feature-arm-thumb.inc |
| 17 | |
| 18 | # Little Endian |
| 19 | AVAILTUNES += "armv4 armv4t" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 20 | ARMPKGARCH_tune-armv4 ?= "armv4" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 21 | ARMPKGARCH_tune-armv4t ?= "armv4" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 22 | TUNE_FEATURES_tune-armv4 = "arm armv4" |
| 23 | TUNE_FEATURES_tune-armv4t = "${TUNE_FEATURES_tune-armv4} thumb" |
| 24 | PACKAGE_EXTRA_ARCHS_tune-armv4 = "arm armv4" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 25 | PACKAGE_EXTRA_ARCHS_tune-armv4t = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv4t" |
| 26 | |
| 27 | # Big Endian |
| 28 | AVAILTUNES += "armv4b armv4tb" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 29 | ARMPKGARCH_tune-armv4b ?= "armv4" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 30 | ARMPKGARCH_tune-armv4tb ?= "armv4" |
Patrick Williams | d8c66bc | 2016-06-20 12:57:21 -0500 | [diff] [blame] | 31 | TUNE_FEATURES_tune-armv4b = "${TUNE_FEATURES_tune-armv4} bigendian" |
| 32 | TUNE_FEATURES_tune-armv4tb = "${TUNE_FEATURES_tune-armv4t} bigendian" |
| 33 | PACKAGE_EXTRA_ARCHS_tune-armv4b = "armeb armv4b" |
Patrick Williams | c124f4f | 2015-09-15 14:41:29 -0500 | [diff] [blame] | 34 | PACKAGE_EXTRA_ARCHS_tune-armv4tb = "${PACKAGE_EXTRA_ARCHS_tune-armv4b} armv4tb" |