diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/conf/machine/include/mips | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/conf/machine/include/mips')
-rw-r--r-- | poky/meta/conf/machine/include/mips/README | 56 | ||||
-rw-r--r-- | poky/meta/conf/machine/include/mips/arch-mips.inc | 151 | ||||
-rw-r--r-- | poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc | 17 | ||||
-rw-r--r-- | poky/meta/conf/machine/include/mips/tune-mips-24k.inc | 51 |
4 files changed, 275 insertions, 0 deletions
diff --git a/poky/meta/conf/machine/include/mips/README b/poky/meta/conf/machine/include/mips/README new file mode 100644 index 000000000..f36e87b45 --- /dev/null +++ b/poky/meta/conf/machine/include/mips/README @@ -0,0 +1,56 @@ +2016/09/30 - Zubair Lutfullah Kakakhel <Zubair.Kakakhel@imgtec.com> + - Add Release 6 support + +2012/03/30 - Mark Hatle <mark.hatle@windriver.com> + - Initial Version + +MIPS currently defines 12 ABIs. Combinations of: + *) Big/Little Endian + *) Hardware/Software Floating Point + *) o32, n32, n64 ABI + +Release 6 of the ISA is a major revision and doesn't build up on previous +releases of the ISA. + +For more details about tuples, check https://wiki.debian.org/Multiarch/Tuples + +TUNE_ARCH, the GNU canonical arch, is defined as: + +"mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}" + +The package arch is defined in such a way to generated a standard naming +scheme. The scheme is: <mips variant>[-nf][-n32] + +TUNE_PKGARCH is defined as: + +${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI} + +The following is a list of MIPS specific variables: + +MIPSPKGSFX_BYTE - This is defined as either blank and "64" for MIPS64 CPUs. + +MIPSPKGSFX_ENDIAN - For bigendian hardware this is blank, otherwise it's +defined as "el". + +MIPSPKGSFX_ENDIAN2 - For bigendian hardware this is "eb", otherwise it's +defined as "el". + +MIPSPKGSFX_VARIANT_tune-<tune> - In the default tunings it is set to the +same value as TUNE_ARCH. In custom, optimized tunings, the value should +be modified to more precisely describe the tuning. + +MIPSPKGSFX_FPU - The value is set to "" or "-nf", where "-nf" indicates +that the tune is using a non-floating point ABI. + +MIPSPKGSFX_ABI - This is used to specify an alternative ABI when the previous +values are not enough to distringuish the package. "-n32" is added when +building for N32 ABI. + +MIPSPKGSFX_R6 - This is used to specify the presence of release 6. +"r6" is added in the tuple for release 6 of the isa. + +MIPSPKGSFX_64R6 - This is used to specify "isa" in the tuple. +Release 6 onwards we use "mipsisa64" instead of just "mips64". + +MIPSPKGSFX_32R6 - This is used to specify "isa32" in the tuple. +Release 6 onwards we use "mipsisa32" instead of just "mips". diff --git a/poky/meta/conf/machine/include/mips/arch-mips.inc b/poky/meta/conf/machine/include/mips/arch-mips.inc new file mode 100644 index 000000000..2f625119c --- /dev/null +++ b/poky/meta/conf/machine/include/mips/arch-mips.inc @@ -0,0 +1,151 @@ +# MIPS Architecture definition +# 12 defined ABIs, all combinations of: +# *) Big/Little Endian +# *) Hardware/Software Floating Point +# *) o32, n32, n64 ABI + +DEFAULTTUNE ?= "mips" + +# Endianess +TUNEVALID[bigendian] = "Enable big-endian mode" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', ' -meb', ' -mel', d)}" + +# ABI flags +TUNEVALID[o32] = "MIPS o32 ABI" +TUNECONFLICTS[o32] = "n32 n64" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'o32', ' -mabi=32', '', d)}" + +TUNEVALID[n32] = "MIPS64 n32 ABI" +TUNECONFLICTS[n32] = "o32 n64" +ABIEXTENSION .= "${@bb.utils.filter('TUNE_FEATURES', 'n32' ,d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n32', ' -mabi=n32', '', d)}" + +# user mode qemu doesn't support mips64 n32: "Invalid ELF image for this architecture" +MACHINE_FEATURES_BACKFILL_CONSIDERED_append = " ${@bb.utils.contains('TUNE_FEATURES', 'n32', 'qemu-usermode', '', d)}" + +TUNEVALID[n64] = "MIPS64 n64 ABI" +TUNECONFLICTS[n64] = "o32 n32" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'n64', ' -mabi=64', '', d)}" + +# Floating point +TUNEVALID[fpu-hard] = "Use hardware FPU" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', ' -mhard-float', ' -msoft-float', d)}" +TARGET_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '', 'soft', d)}" + +# MIPS r6 ABI +TUNEVALID[r6] = "Use r6" +TUNEVALID[mipsisa64r6] = "Use 64r6" +TUNEVALID[mipsisa32r6] = "Use 32r6" + +# Package naming +MIPSPKGSFX_ENDIAN = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', '', 'el', d)}" +MIPSPKGSFX_ENDIAN2 = "${@bb.utils.contains('TUNE_FEATURES', 'bigendian', 'eb', 'el', d)}" +MIPSPKGSFX_BYTE = "${@bb.utils.contains('TUNE_FEATURES', 'n64' , '64', '', d)}" +MIPSPKGSFX_BYTE .= "${@bb.utils.contains('TUNE_FEATURES', 'n32' , '64', '', d)}" +MIPSPKGSFX_FPU = "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard' , '', '-nf', d)}" +MIPSPKGSFX_ABI = "${@bb.utils.contains('TUNE_FEATURES', 'n32', '-n32', '', d)}" +MIPSPKGSFX_R6 = "${@bb.utils.filter('TUNE_FEATURES', 'r6', d)}" +MIPSPKGSFX_64R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa64r6', 'isa', '', d)}" +MIPSPKGSFX_32R6 = "${@bb.utils.contains('TUNE_FEATURES', 'mipsisa32r6', 'isa32', '', d)}" + +TUNE_ARCH = "mips${MIPSPKGSFX_32R6}${MIPSPKGSFX_64R6}${MIPSPKGSFX_BYTE}${MIPSPKGSFX_R6}${MIPSPKGSFX_ENDIAN}" +TUNE_PKGARCH = "${MIPSPKGSFX_VARIANT_tune-${DEFAULTTUNE}}${MIPSPKGSFX_FPU}${MIPSPKGSFX_ABI}" + +# Various Global Machine Overrides +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 'mipsarchn64${MIPSPKGSFX_ENDIAN2}:', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 'mipsarcho32${MIPSPKGSFX_ENDIAN2}:', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'mipsarchn32${MIPSPKGSFX_ENDIAN2}:', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n64', 'mipsarchn64:', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'o32', 'mipsarcho32:', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'n32', 'mipsarchn32:', '' ,d)}" +MACHINEOVERRIDES =. "${@bb.utils.contains('TUNE_FEATURES', 'r6', 'mipsarchr6:', '' ,d)}" +MACHINEOVERRIDES =. "mipsarch${MIPSPKGSFX_ENDIAN2}:" +MACHINEOVERRIDES =. "mipsarch:" + +# Base tunes +AVAILTUNES += "mips mips64-n32 mips64 mipsel mips64el-n32 mips64el mips-nf mips64-nf-n32 mips64-nf mipsel-nf mips64el-nf-n32 mips64el-nf" +TUNE_FEATURES_tune-mips = "o32 bigendian fpu-hard" +BASE_LIB_tune-mips = "lib" +MIPSPKGSFX_VARIANT_tune-mips = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips = "mips" + +TUNE_FEATURES_tune-mips64-n32 = "n32 bigendian fpu-hard" +BASE_LIB_tune-mips64-n32 = "lib32" +MIPSPKGSFX_VARIANT_tune-mips64-n32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64-n32 = "mips64-n32" + +TUNE_FEATURES_tune-mips64 = "n64 bigendian fpu-hard" +BASE_LIB_tune-mips64 = "lib64" +MIPSPKGSFX_VARIANT_tune-mips64 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64 = "mips64" + +TUNE_FEATURES_tune-mipsel = "o32 fpu-hard" +BASE_LIB_tune-mipsel = "lib" +MIPSPKGSFX_VARIANT_tune-mipsel = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mipsel = "mipsel" + +TUNE_FEATURES_tune-mips64el-n32 = "n32 fpu-hard" +BASE_LIB_tune-mips64el-n32 = "lib32" +MIPSPKGSFX_VARIANT_tune-mips64el-n32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64el-n32 = "mips64el-n32" + +TUNE_FEATURES_tune-mips64el = "n64 fpu-hard" +BASE_LIB_tune-mips64el = "lib64" +MIPSPKGSFX_VARIANT_tune-mips64el = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64el = "mips64el" + +TUNE_FEATURES_tune-mips-nf = "o32 bigendian" +BASE_LIB_tune-mips-nf = "lib" +MIPSPKGSFX_VARIANT_tune-mips-nf = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips-nf = "mips-nf" + +TUNE_FEATURES_tune-mips64-nf-n32 = "n32 bigendian" +BASE_LIB_tune-mips64-nf-n32 = "lib32" +MIPSPKGSFX_VARIANT_tune-mips64-nf-n32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64-nf-n32 = "mips64-nf-n32" + +TUNE_FEATURES_tune-mips64-nf = "n64 bigendian" +BASE_LIB_tune-mips64-nf = "lib64" +MIPSPKGSFX_VARIANT_tune-mips64-nf = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64-nf = "mips64-nf" + +TUNE_FEATURES_tune-mipsel-nf = "o32" +BASE_LIB_tune-mipsel-nf = "lib" +MIPSPKGSFX_VARIANT_tune-mipsel-nf = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mipsel-nf = "mipsel-nf" + +TUNE_FEATURES_tune-mips64el-nf-n32 = "n32" +BASE_LIB_tune-mips64el-nf-n32 = "lib32" +MIPSPKGSFX_VARIANT_tune-mips64el-nf-n32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-n32 = "mips64el-nf-n32" + +TUNE_FEATURES_tune-mips64el-nf = "n64" +BASE_LIB_tune-mips64el-nf = "lib64" +MIPSPKGSFX_VARIANT_tune-mips64el-nf = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64el-nf = "mips64el-nf" + +# MIPS 64 + o32 +AVAILTUNES += "mips64-o32 mips64el-o32" + +TUNE_FEATURES_tune-mips64-o32 = "o32 bigendian fpu-hard" +BASE_LIB_tune-mips64-o32 = "lib" +MIPSPKGSFX_VARIANT_tune-mips64-o32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64-o32 = "mips mips64-o32" + +TUNE_FEATURES_tune-mips64el-o32 = "o32 fpu-hard" +BASE_LIB_tune-mips64el-o32 = "lib" +MIPSPKGSFX_VARIANT_tune-mips64el-o32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64el-o32 = "mipsel mips64el-o32 mips64el-o32" + +# MIPS 64 o32 and Soft Float +AVAILTUNES += "mips64-nf-o32 mips64el-nf-o32" + +TUNE_FEATURES_tune-mips64-nf-o32 = "o32 bigendian" +BASE_LIB_tune-mips64-nf-o32 = "lib" +MIPSPKGSFX_VARIANT_tune-mips64-nf-o32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64-nf-o32 = "mips-nf mips64-nf-o32" + +TUNE_FEATURES_tune-mips64el-nf-o32 = "o32" +BASE_LIB_tune-mips64el-nf-o32 = "lib" +MIPSPKGSFX_VARIANT_tune-mips64el-nf-o32 = "${TUNE_ARCH}" +PACKAGE_EXTRA_ARCHS_tune-mips64el-nf-o32 = "mipsel-nf mips64el-nf-o32" diff --git a/poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc b/poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc new file mode 100644 index 000000000..101d5331b --- /dev/null +++ b/poky/meta/conf/machine/include/mips/feature-mips-mips16e.inc @@ -0,0 +1,17 @@ +TUNEVALID[mips16e] = "Build target packages with MIPS16e ASE instructions" +MIPS_MIPS16E_OPT = "${@['mno-mips16', 'mips16'][d.getVar('MIPS_INSTRUCTION_SET') == 'mips16e']}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' -${MIPS_MIPS16E_OPT}', '', d)}" + +MIPSPKGSFX_MIPS16E .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', '-m16', '', d) if d.getVar('MIPS_MIPS16E_OPT') == 'mips16' else ''}" + +# Whether to compile with code to allow interworking between the two +# instruction sets. This allows mips16e code to be executed on a primarily +# mips32/64 system and vice versa. It is strongly recommended that DISTROs not +# turn this off - the actual cost is very small. +TUNEVALID[no-interlink-compressed] = "Disable mixing of standard and MIPS16e code" +MIPS16_TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'no-interlink-compressed', ' -mno-interlink-compressed', ' -minterlink-compressed', d)}" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ' ${MIPS16_TUNE_CCARGS}', '', d)}" +OVERRIDES .= "${@bb.utils.contains('TUNE_FEATURES', 'mips16e', ':mips16e', '', d)}" + +# show status (if compiling in MIPS16e mode) +BUILDCFG_VARS += "${@['', 'MIPS_INSTRUCTION_SET'][d.getVar('MIPS_INSTRUCTION_SET') == 'mips16e']}" diff --git a/poky/meta/conf/machine/include/mips/tune-mips-24k.inc b/poky/meta/conf/machine/include/mips/tune-mips-24k.inc new file mode 100644 index 000000000..828acd42e --- /dev/null +++ b/poky/meta/conf/machine/include/mips/tune-mips-24k.inc @@ -0,0 +1,51 @@ +DEFAULTTUNE ?= "mips32r2-24kc" + +MIPSPKGSFX_MIPS16E ??= "" + +require conf/machine/include/tune-mips32r2.inc +require conf/machine/include/mips/feature-mips-mips16e.inc + + +TUNEVALID[24kc] = "Enable MIPS 24Kc processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "24kc", " -mtune=24kc", "", d)}" +TUNEVALID[24kec] = "Enable MIPS 24KEc processor optimizations, including DSP" +TUNE_CCARGS .= "${@bb.utils.contains("TUNE_FEATURES", "24kec", " -mtune=24kec -mdsp", "", d)}" + + +AVAILTUNES += "mips32r2-24kc mips32r2-24kec mips32r2-24kec-m16" +AVAILTUNES += "mips32r2el-24kc mips32r2el-24kec mips32r2el-24kec-m16" + +# big endian: kc, kc+dsp=kec, kc+dsp+mips16e=kec-m16 +TUNE_FEATURES_tune-mips32r2-24kc = "${TUNE_FEATURES_tune-mips32r2-nf} 24kc" +TUNE_FEATURES_tune-mips32r2-24kec = "${TUNE_FEATURES_tune-mips32r2-nf} 24kec" +TUNE_FEATURES_tune-mips32r2-24kec-m16 = "${TUNE_FEATURES_tune-mips32r2-24kec} mips16e" + +MIPSPKGSFX_VARIANT_tune-mips32r2-24kc = "mips32r2-24kc" +PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-nf} mips32r2-24kc-nf" +QEMU_EXTRAOPTIONS_mips32r2-24kc-nf = " -cpu 24Kc" + +MIPSPKGSFX_VARIANT_tune-mips32r2-24kec = "mips32r2-24kec" +PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kec = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kc} mips32r2-24kec-nf" +QEMU_EXTRAOPTIONS_mips32r2-24kec-nf = " -cpu 24KEc" + +MIPSPKGSFX_VARIANT_tune-mips32r2-24kec-m16 = "mips32r2-24kec${MIPSPKGSFX_MIPS16E}" +PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kec-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2-24kec} mips32r2-24kec-m16-nf" +QEMU_EXTRAOPTIONS_mips32r2-24kec-m16-nf = " -cpu 24KEc" + + +# little endian: kc, kc+dsp=kec, kc+dsp+mips16e=kec-m16 +TUNE_FEATURES_tune-mips32r2el-24kc = "${TUNE_FEATURES_tune-mips32r2el-nf} 24kc" +TUNE_FEATURES_tune-mips32r2el-24kec = "${TUNE_FEATURES_tune-mips32r2el-nf} 24kec" +TUNE_FEATURES_tune-mips32r2el-24kec-m16 = "${TUNE_FEATURES_tune-mips32r2el-24kec} mips16e" + +MIPSPKGSFX_VARIANT_tune-mips32r2el-24kc = "mips32r2el-24kc" +PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kc = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-nf} mips32r2el-24kc-nf" +QEMU_EXTRAOPTIONS_mips32r2el-24kc-nf = " -cpu 24Kc" + +MIPSPKGSFX_VARIANT_tune-mips32r2el-24kec = "mips32r2el-24kec" +PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kec = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kc} mips32r2el-24kec-nf" +QEMU_EXTRAOPTIONS_mips32r2el-24kec-nf = " -cpu 24KEc" + +MIPSPKGSFX_VARIANT_tune-mips32r2el-24kec-m16 = "mips32r2el-24kec${MIPSPKGSFX_MIPS16E}" +PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kec-m16 = "${PACKAGE_EXTRA_ARCHS_tune-mips32r2el-24kec} mips32r2el-24kec-m16-nf" +QEMU_EXTRAOPTIONS_mips32r2el-24kec-m16-nf = " -cpu 24KEc" |