blob: be5761fb20b6ed549ea4a079aed36ffc553ce60e [file] [log] [blame]
Patrick Williamsc124f4f2015-09-15 14:41:29 -05001DEFAULTTUNE ?= "armv4"
2
3TUNEVALID[arm] = "Enable ARM instruction set"
4TUNEVALID[armv4] = "Enable instructions for ARMv4"
Andrew Geisslerd159c7f2021-09-02 21:05:58 -05005TUNE_CCARGS_MARCH .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -05006# 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 Williamsd8c66bc2016-06-20 12:57:21 -05009FIX_V4BX_ARMV4 = "${@bb.utils.contains('TUNE_FEATURES', 'armv4', '--fix-v4bx', '', d)}"
10FIX_V4BX_ARMV5 = "${@bb.utils.contains('TUNE_FEATURES', 'armv5', '', '${FIX_V4BX_ARMV4}', d)}"
11FIX_V4BX = "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '', '${FIX_V4BX_ARMV5}', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050012TARGET_LD_KERNEL_ARCH += "${FIX_V4BX}"
Andrew Geisslerc3d88e42020-10-02 09:45:00 -050013MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 'armv4:', '', d)}"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050014
15require conf/machine/include/arm/arch-arm.inc
16require conf/machine/include/arm/feature-arm-thumb.inc
17
18# Little Endian
19AVAILTUNES += "armv4 armv4t"
Patrick Williams213cb262021-08-07 19:21:33 -050020ARMPKGARCH:tune-armv4 ?= "armv4"
21ARMPKGARCH:tune-armv4t ?= "armv4"
22TUNE_FEATURES:tune-armv4 = "arm armv4"
23TUNE_FEATURES:tune-armv4t = "${TUNE_FEATURES:tune-armv4} thumb"
24PACKAGE_EXTRA_ARCHS:tune-armv4 = "arm armv4"
25PACKAGE_EXTRA_ARCHS:tune-armv4t = "${PACKAGE_EXTRA_ARCHS:tune-armv4} armv4t"
Patrick Williamsc124f4f2015-09-15 14:41:29 -050026
27# Big Endian
28AVAILTUNES += "armv4b armv4tb"
Patrick Williams213cb262021-08-07 19:21:33 -050029ARMPKGARCH:tune-armv4b ?= "armv4"
30ARMPKGARCH:tune-armv4tb ?= "armv4"
31TUNE_FEATURES:tune-armv4b = "${TUNE_FEATURES:tune-armv4} bigendian"
32TUNE_FEATURES:tune-armv4tb = "${TUNE_FEATURES:tune-armv4t} bigendian"
33PACKAGE_EXTRA_ARCHS:tune-armv4b = "armeb armv4b"
34PACKAGE_EXTRA_ARCHS:tune-armv4tb = "${PACKAGE_EXTRA_ARCHS:tune-armv4b} armv4tb"