mirror of
https://git.yoctoproject.org/poky
synced 2026-04-29 00:32:14 +02:00
aarch-arm64: Update tune files
arch-arm64 is the base tune file for aarch64. Update this to allow the system to work with both aarch32 and aarch64 (multilib). arch-armv8 is for compatibility, it simply uses the base config for now. feature-arm-thumb was updated, since aarch64 mode does NOT have thumb support. We should only be processing warnings and additional arguments if thumb support is enabled on the processor core. (From OE-Core rev: 03d2f5646485b565cc14a0009b7d5224ab298f4c) Signed-off-by: Mark Hatle <mark.hatle@windriver.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
a1d75c2cf8
commit
eba9c1be73
36
meta/conf/machine/include/arm/arch-arm64.inc
Normal file
36
meta/conf/machine/include/arm/arch-arm64.inc
Normal file
@@ -0,0 +1,36 @@
|
||||
DEFAULTTUNE ?= "aarch64"
|
||||
|
||||
require conf/machine/include/arm/arch-armv7a.inc
|
||||
|
||||
TUNEVALID[aarch64] = "Enable instructions for aarch64"
|
||||
|
||||
MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}"
|
||||
|
||||
# Little Endian base configs
|
||||
AVAILTUNES += "aarch64 aarch64_be"
|
||||
ARMPKGARCH_tune-aarch64 ?= "aarch64"
|
||||
ARMPKGARCH_tune-aarch64_be ?= "aarch64_be"
|
||||
TUNE_FEATURES_tune-aarch64 ?= "aarch64"
|
||||
TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian"
|
||||
BASE_LIB_tune-aarch64 = "lib64"
|
||||
BASE_LIB_tune-aarch64_be = "lib64"
|
||||
|
||||
PACKAGE_EXTRA_ARCHS_tune-aarch64 = "aarch64"
|
||||
PACKAGE_EXTRA_ARCHS_tune-aarch64_be = "aarch64_be"
|
||||
|
||||
ARMPKGSFX_ENDIAN_64 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}"
|
||||
TUNE_ARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
|
||||
TUNE_PKGARCH_64 = "aarch64${ARMPKGSFX_ENDIAN_64}"
|
||||
ABIEXTENSION_64 = ""
|
||||
TARGET_FPU_64 = ""
|
||||
|
||||
# Duplicated from arch-arm.inc
|
||||
TUNE_ARCH_32 = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}"
|
||||
TUNE_PKGARCH_32 = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}"
|
||||
ABIEXTENSION_32 = "eabi"
|
||||
TARGET_FPU_32 = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}"
|
||||
|
||||
TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_ARCH_64}", "${TUNE_ARCH_32}" ,d)}"
|
||||
TUNE_PKGARCH = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TUNE_PKGARCH_64}", "${TUNE_PKGARCH_32}" ,d)}"
|
||||
ABIEXTENSION = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${ABIEXTENSION_64}", "${ABIEXTENSION_32}" ,d)}"
|
||||
TARGET_FPU = "${@bb.utils.contains("TUNE_FEATURES", "aarch64", "${TARGET_FPU_64}", "${TARGET_FPU_32}" ,d)}"
|
||||
@@ -1,20 +1 @@
|
||||
DEFAULTTUNE ?= "aarch64"
|
||||
|
||||
ARMPKGARCH ?= "aarch64"
|
||||
|
||||
TUNEVALID[aarch64] = "Enable instructions for aarch64"
|
||||
TUNEVALID[bigendian] = "Enable big-endian mode."
|
||||
TUNECONFLICTS[aarch64] = ""
|
||||
MACHINEOVERRIDES .= "${@bb.utils.contains("TUNE_FEATURES", "aarch64", ":aarch64", "" ,d)}"
|
||||
|
||||
# Little Endian base configs
|
||||
AVAILTUNES += "aarch64 aarch64_be"
|
||||
TUNE_FEATURES_tune-aarch64 ?= "aarch64"
|
||||
TUNE_FEATURES_tune-aarch64_be ?= "${TUNE_FEATURES_tune-aarch64} bigendian"
|
||||
|
||||
ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "_be", "", d)}"
|
||||
|
||||
TUNE_ARCH = "aarch64${ARMPKGSFX_ENDIAN}"
|
||||
TUNE_PKGARCH = "aarch64${ARMPKGSFX_ENDIAN}"
|
||||
|
||||
PACKAGE_EXTRA_ARCHS = "aarch64${ARMPKGSFX_ENDIAN}"
|
||||
require conf/machine/include/arm/arch-arm64.inc
|
||||
|
||||
@@ -18,6 +18,8 @@ ARM_THUMB_SUFFIX .= "${@bb.utils.contains('TUNE_FEATURES', 'armv7m', 't2', '', d
|
||||
# some recipe explicitly sets ARM_INSTRUCTION_SET to "arm"
|
||||
ARM_M_OPT = "${@bb.utils.contains('TUNE_FEATURES', 'arm', '${ARM_THUMB_OPT}', 'thumb', d)}"
|
||||
python () {
|
||||
if bb.utils.contains('TUNE_FEATURES', 'thumb', 'False', 'True', d):
|
||||
return
|
||||
selected = d.getVar('ARM_INSTRUCTION_SET', True)
|
||||
if selected == None:
|
||||
return
|
||||
@@ -37,8 +39,10 @@ ARMPKGSFX_THUMB .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '${ARM_THUMB_
|
||||
# arm system and vice versa. It is strongly recommended that DISTROs not
|
||||
# turn this off - the actual cost is very small.
|
||||
TUNEVALID[no-thumb-interwork] = "Disable mixing of thumb and ARM functions"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
|
||||
OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
|
||||
THUMB_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ' -mno-thumb-interwork', ' -mthumb-interwork', d)}"
|
||||
THUMB_OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'no-thumb-interwork', ':thumb-interwork', '', d)}"
|
||||
TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_TUNE_CCARGS}', '', d)}"
|
||||
OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'thumb', ' ${THUMB_OVERRIDES}', '', d)}"
|
||||
|
||||
# what about armv7m devices which don't support -marm (e.g. Cortex-M3)?
|
||||
TARGET_CC_KERNEL_ARCH += "-mno-thumb-interwork -marm"
|
||||
TARGET_CC_KERNEL_ARCH += "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '-mno-thumb-interwork -marm', '', d)}"
|
||||
|
||||
Reference in New Issue
Block a user