diff options
Diffstat (limited to 'meta/conf/machine/include')
76 files changed, 1554 insertions, 628 deletions
diff --git a/meta/conf/machine/include/README b/meta/conf/machine/include/README index e4b59c9566..d66130acbc 100644 --- a/meta/conf/machine/include/README +++ b/meta/conf/machine/include/README @@ -1,27 +1,30 @@ 2012/03/30 - Mark Hatle <mark.hatle@windriver.com> - Initial Revision -The individual CPU, and ABI tunings are contained in this directory. A -number of local and global variables are used to control the way the -tunings are setup and how they work together to specify an optimized + +Introduction +============ +The individual CPU, and ABI tunings are contained in this directory. A +number of local and global variables are used to control the way the +tunings are setup and how they work together to specify an optimized configuration. -The following is brief summary of the generic components that are used +The following is brief summary of the generic components that are used in these tunings. -AVAILTUNES - This is a list of all of the tuning definitions currently -available in the system. Not all tunes in this list may be compatible -with the machine configuration, or each other in a multilib -configuration. Each tuning file can add to this list using "+=", but +AVAILTUNES - This is a list of all of the tuning definitions currently +available in the system. Not all tunes in this list may be compatible +with the machine configuration, or each other in a multilib +configuration. Each tuning file can add to this list using "+=", but should never replace the list using "=". -DEFAULTTUNE - This specifies the tune to use for a particular build. -Each tune should specify a reasonable default, which can be overriden by -a machine or multilib configuration. The specified tune must be listed +DEFAULTTUNE - This specifies the tune to use for a particular build. +Each tune should specify a reasonable default, which can be overriden by +a machine or multilib configuration. The specified tune must be listed in the AVAILTUNES. -TUNEVALID[feature] - The <feature> is defined with a human readable -explanation for what it does. All architectural, cpu, abi, etc tuning +TUNEVALID[feature] - The <feature> is defined with a human readable +explanation for what it does. All architectural, cpu, abi, etc tuning features must be defined using TUNEVALID. TUNECONFLICTS[feature] - A list of features which conflict with <feature>. @@ -31,51 +34,67 @@ tuning ends up with features which conflict with each other. TUNE_FEATURES - This is automatically defined as TUNE_FEATURES_tune-<tune>. See TUNE_FEATURES_tune-<tune> for more information. -TUNE_FEATURES_tune-<tune> - Specify the features used to describe a -specific tune. This is a list of features that a tune support, each -feature must be in the TUNEVALID list. Note: the tune and a given -feature name may be the same, but they have different purposes. Only -features may be used to change behavior, while tunes are used to +TUNE_FEATURES_tune-<tune> - Specify the features used to describe a +specific tune. This is a list of features that a tune support, each +feature must be in the TUNEVALID list. Note: the tune and a given +feature name may be the same, but they have different purposes. Only +features may be used to change behavior, while tunes are used to describe an overall set of features. -ABIEXTENSION - An ABI extension may be specified by a specific feature -or other tuning setting, such as TARGET_FPU. Any ABI extensions either -need to be defined in the architectures base arch file, i.e. -ABIEXTENSION = "eabi" in the arm case, or appended to in specific tune +ABIEXTENSION - An ABI extension may be specified by a specific feature +or other tuning setting, such as TARGET_FPU. Any ABI extensions either +need to be defined in the architectures base arch file, i.e. +ABIEXTENSION = "eabi" in the arm case, or appended to in specific tune files with a ".=". Spaces are not allowed in this variable. -TUNE_CCARGS - Setup the cflags based on the TUNE_FEATURES settings. -These should be additive when defined using "+=". All items in this -list should be dynamic! i.e. +TUNE_CCARGS - Setup the cflags based on the TUNE_FEATURES settings. +These should be additive when defined using "+=". All items in this +list should be dynamic! i.e. ${@bb.utils.contains("TUNE_FEATURES", "feature", "cflag", "!cflag", d)} -TUNE_ARCH - The GNU canonical arch for a specific architecture. i.e. -arm, armeb, mips, mips64, etc. This value is by bitbake to setup -configure. TUNE_ARCH definitions are specific to a given architecture. -They may be a single static definitions, or may be dynamically adjusted. -See each architectures README for details for that CPU family. +TUNE_ARCH - The GNU canonical arch for a specific architecture. i.e. +arm, armeb, mips, mips64, etc. This value is used by bitbake to setup +configure. TUNE_ARCH definitions are specific to a given architecture. +They may be a single static definition, or may be dynamically adjusted. +See each architecture's README for details for that CPU family. -TUNE_PKGARCH - The package architecture used by the packaging systems to -define the architecture, abi and tuning of a particular package. -Similarly to TUNE_ARCH, the definition of TUNE_PKGARCH is specific to -each architecture. See each architectures README for details for that +TUNE_PKGARCH - The package architecture used by the packaging systems to +define the architecture, abi and tuning of a particular package. +Similarly to TUNE_ARCH, the definition of TUNE_PKGARCH is specific to +each architecture. See each architectures README for details for that CPU family. -PACKAGE_EXTRA_ARCHS - Lists all runtime compatible package -architectures. By default this is equal to -PACKAGE_EXTRA_ARCHS_tune-<tune>. If an architecture deviates from the +PACKAGE_EXTRA_ARCHS - Lists all runtime compatible package +architectures. By default this is equal to +PACKAGE_EXTRA_ARCHS_tune-<tune>. If an architecture deviates from the default it will be listed in the architecture README. -PACKAGE_EXTRA_ARCHS_tune-<tune> - List all of the package architectures -that are compatible with this specific tune. The package arch of this +PACKAGE_EXTRA_ARCHS_tune-<tune> - List all of the package architectures +that are compatible with this specific tune. The package arch of this tune must be in the list. -TARGET_FPU - The FPU setting for a given tune, hard (generate floating -point instructions), soft (generate internal gcc calls), "other" -architecture specific floating point. This is synchronized with the -compiler and other toolchain items. This should be dynamically +TARGET_FPU - The FPU setting for a given tune, hard (generate floating +point instructions), soft (generate internal gcc calls), "other" +architecture specific floating point. This is synchronized with the +compiler and other toolchain items. This should be dynamically configured in the same way that TUNE_CCARGS is. -BASE_LIB_tune-<tune> - The "/lib" location for a specific ABI. This is -used in a multilib configuration to place the libraries in the correct, +BASE_LIB_tune-<tune> - The "/lib" location for a specific ABI. This is +used in a multilib configuration to place the libraries in the correct, non-conflicting locations. + + +Best Practice +============= +The tune infrastructure is designed to be hierarchical. When writing a +new tune file for a "fast-forward" CPU architecture (one that supports +everything from a previous generation), it is recommended to require the +previous generation tune file and specify PACKAGE_EXTRA_ARCHS using the +previous generation's override and appending the new tune. Note that +only one previous tune file should be included to avoid mutiple includes +of the base arch which could lead to a broken configuration due to +multiple prepend and append assignments. + +For example, for x86, there is a common x86/arch-x86.inc which is +included in the base i586 tune file. The core2 tune builds +on that, and corei7 builds on core2. diff --git a/meta/conf/machine/include/arm/arch-arm.inc b/meta/conf/machine/include/arm/arch-arm.inc index 90b80c4c36..99625d8417 100644 --- a/meta/conf/machine/include/arm/arch-arm.inc +++ b/meta/conf/machine/include/arm/arch-arm.inc @@ -2,16 +2,15 @@ TUNEVALID[bigendian] = "Enable big-endian mode." ARMPKGARCH = "${ARMPKGARCH_tune-${DEFAULTTUNE}}" -ARMPKGSFX_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "b", "", d)}" +ARMPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'b', '', d)}" ARMPKGSFX_FPU ??= "" ARMPKGSFX_DSP ??= "" ARMPKGSFX_EABI ??= "" ARMPKGSFX_THUMB ??= "" -TUNE_ARCH = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "armeb", "arm", d)}" +TUNE_ARCH = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'armeb', 'arm', d)}" TUNE_PKGARCH = "${ARMPKGARCH}${ARMPKGSFX_THUMB}${ARMPKGSFX_DSP}${ARMPKGSFX_EABI}${ARMPKGSFX_ENDIAN}${ARMPKGSFX_FPU}" ABIEXTENSION = "eabi" -TARGET_FPU = "${@d.getVar('ARMPKGSFX_FPU', True).strip('-') or 'soft'}" - +TARGET_FPU = "${@d.getVar('TUNE_CCARGS_MFLOAT') or 'soft'}" diff --git a/meta/conf/machine/include/arm/arch-arm64.inc b/meta/conf/machine/include/arm/arch-arm64.inc new file mode 100644 index 0000000000..5f90763f7f --- /dev/null +++ b/meta/conf/machine/include/arm/arch-arm64.inc @@ -0,0 +1,36 @@ +DEFAULTTUNE ?= "aarch64" + +require conf/machine/include/arm/arch-armv7ve.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('TUNE_CCARGS_MFLOAT') 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)}" diff --git a/meta/conf/machine/include/arm/arch-armv4.inc b/meta/conf/machine/include/arm/arch-armv4.inc index 5940467ae5..813ed159dc 100644 --- a/meta/conf/machine/include/arm/arch-armv4.inc +++ b/meta/conf/machine/include/arm/arch-armv4.inc @@ -1,33 +1,34 @@ DEFAULTTUNE ?= "armv4" +TUNEVALID[arm] = "Enable ARM instruction set" TUNEVALID[armv4] = "Enable instructions for ARMv4" -TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "armv4", "-march=armv4${ARMPKGSFX_THUMB}", "", d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'armv4', ' -march=armv4${ARMPKGSFX_THUMB}', '', d)}" # enable --fix-v4bx when we have armv4 in TUNE_FEATURES, but then disable it when we have also armv5 or thumb # maybe we should extend bb.utils.contains to support check for any checkvalues in value, now it does # checkvalues.issubset(val) which cannot be used for negative test of foo neither bar in value -FIX_V4BX_ARMV4 = "${@bb.utils.contains("TUNE_FEATURES", "armv4", "--fix-v4bx", "", d)}" -FIX_V4BX_ARMV5 = "${@bb.utils.contains("TUNE_FEATURES", "armv5", "", "${FIX_V4BX_ARMV4}", d)}" -FIX_V4BX = "${@bb.utils.contains("TUNE_FEATURES", "thumb", "", "${FIX_V4BX_ARMV5}", d)}" +FIX_V4BX_ARMV4 = "${@bb.utils.contains('TUNE_FEATURES', 'armv4', '--fix-v4bx', '', d)}" +FIX_V4BX_ARMV5 = "${@bb.utils.contains('TUNE_FEATURES', 'armv5', '', '${FIX_V4BX_ARMV4}', d)}" +FIX_V4BX = "${@bb.utils.contains('TUNE_FEATURES', 'thumb', '', '${FIX_V4BX_ARMV5}', d)}" TARGET_LD_KERNEL_ARCH += "${FIX_V4BX}" -MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "armv4", "armv4:", "" ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'armv4', 'armv4:', '' ,d)}" require conf/machine/include/arm/arch-arm.inc require conf/machine/include/arm/feature-arm-thumb.inc # Little Endian AVAILTUNES += "armv4 armv4t" -ARMPKGARCH_tune-armv4 ?= "armv4" +ARMPKGARCH_tune-armv4 ?= "armv4" ARMPKGARCH_tune-armv4t ?= "armv4" -TUNE_FEATURES_tune-armv4 ?= "armv4" -TUNE_FEATURES_tune-armv4t ?= "${TUNE_FEATURES_tune-armv4} thumb" -PACKAGE_EXTRA_ARCHS_tune-armv4 = "arm armv4" +TUNE_FEATURES_tune-armv4 = "arm armv4" +TUNE_FEATURES_tune-armv4t = "${TUNE_FEATURES_tune-armv4} thumb" +PACKAGE_EXTRA_ARCHS_tune-armv4 = "arm armv4" PACKAGE_EXTRA_ARCHS_tune-armv4t = "${PACKAGE_EXTRA_ARCHS_tune-armv4} armv4t" # Big Endian AVAILTUNES += "armv4b armv4tb" -ARMPKGARCH_tune-armv4b ?= "armv4" +ARMPKGARCH_tune-armv4b ?= "armv4" ARMPKGARCH_tune-armv4tb ?= "armv4" -TUNE_FEATURES_tune-armv4b ?= "${TUNE_FEATURES_tune-armv4} bigendian" -TUNE_FEATURES_tune-armv4tb ?= "${TUNE_FEATURES_tune-armv4t} bigendian" -PACKAGE_EXTRA_ARCHS_tune-armv4b = "armeb armv4b" +TUNE_FEATURES_tune-armv4b = "${TUNE_FEATURES_tune-armv4} bigendian" +TUNE_FEATURES_tune-armv4tb = "${TUNE_FEATURES_tune-armv4t} bigendian" +PACKAGE_EXTRA_ARCHS_tune-armv4b = "armeb armv4b" PACKAGE_EXTRA_ARCHS_tune-armv4tb = "${PACKAGE_EXTRA_ARCHS_tune-armv4b} armv4tb" diff --git a/meta/conf/machine/include/arm/arch-armv5-dsp.inc b/meta/conf/machine/include/arm/arch-armv5-dsp.inc index 524a62aec9..1f16085fcd 100644 --- a/meta/conf/machine/include/arm/arch-armv5-dsp.inc +++ b/meta/conf/machine/include/arm/arch-armv5-dsp.inc @@ -1,52 +1,52 @@ -ARMPKGSFX_DSP = "${@bb.utils.contains("TUNE_FEATURES", [ "armv5", "dsp" ], "e", "", d)}" +ARMPKGSFX_DSP = "${@bb.utils.contains('TUNE_FEATURES', [ 'armv5', 'dsp' ], 'e', '', d)}" TUNEVALID[dsp] = "ARM DSP functionality" require conf/machine/include/arm/arch-armv5.inc # Little Endian AVAILTUNES += "armv5e armv5te" -ARMPKGARCH_tune-armv5e ?= "armv5" +ARMPKGARCH_tune-armv5e ?= "armv5" ARMPKGARCH_tune-armv5te ?= "armv5" -TUNE_FEATURES_tune-armv5e ?= "${TUNE_FEATURES_tune-armv5} dsp" -TUNE_FEATURES_tune-armv5te ?= "${TUNE_FEATURES_tune-armv5t} dsp" -PACKAGE_EXTRA_ARCHS_tune-armv5e = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5e" +TUNE_FEATURES_tune-armv5e = "${TUNE_FEATURES_tune-armv5} dsp" +TUNE_FEATURES_tune-armv5te = "${TUNE_FEATURES_tune-armv5t} dsp" +PACKAGE_EXTRA_ARCHS_tune-armv5e = "${PACKAGE_EXTRA_ARCHS_tune-armv5} armv5e" PACKAGE_EXTRA_ARCHS_tune-armv5te = "${PACKAGE_EXTRA_ARCHS_tune-armv5t} armv5e armv5te" # Little Endian + VFP/DSP AVAILTUNES += "armv5e-vfp armv5te-vfp armv5ehf-vfp armv5tehf-vfp" -ARMPKGARCH_tune-armv5e-vfp ?= "armv5" -ARMPKGARCH_tune-armv5te-vfp ?= "armv5" -ARMPKGARCH_tune-armv5ehf-vfp ?= "armv5" +ARMPKGARCH_tune-armv5e-vfp ?= "armv5" +ARMPKGARCH_tune-armv5te-vfp ?= "armv5" +ARMPKGARCH_tune-armv5ehf-vfp ?= "armv5" ARMPKGARCH_tune-armv5tehf-vfp ?= "armv5" -TUNE_FEATURES_tune-armv5e-vfp ?= "${TUNE_FEATURES_tune-armv5e} vfp" -TUNE_FEATURES_tune-armv5te-vfp ?= "${TUNE_FEATURES_tune-armv5te} vfp" -TUNE_FEATURES_tune-armv5ehf-vfp ?= "${TUNE_FEATURES_tune-armv5e-vfp} callconvention-hard" -TUNE_FEATURES_tune-armv5tehf-vfp ?= "${TUNE_FEATURES_tune-armv5te-vfp} callconvention-hard" -PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5-vfp} armv5e armv5e-vfp" -PACKAGE_EXTRA_ARCHS_tune-armv5te-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5t-vfp} armv5e armv5te armv5e-vfp armv5te-vfp" -PACKAGE_EXTRA_ARCHS_tune-armv5ehf-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5hf-vfp} armv5ehf-vfp" +TUNE_FEATURES_tune-armv5e-vfp = "${TUNE_FEATURES_tune-armv5e} vfp" +TUNE_FEATURES_tune-armv5te-vfp = "${TUNE_FEATURES_tune-armv5te} vfp" +TUNE_FEATURES_tune-armv5ehf-vfp = "${TUNE_FEATURES_tune-armv5e-vfp} callconvention-hard" +TUNE_FEATURES_tune-armv5tehf-vfp = "${TUNE_FEATURES_tune-armv5te-vfp} callconvention-hard" +PACKAGE_EXTRA_ARCHS_tune-armv5e-vfp = "${PACKAGE_EXTRA_ARCHS_tune-armv5-vfp} armv5e armv5e-vfp" +PACKAGE_EXTRA_ARCHS_t |
