diff options
author | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-25 19:45:53 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-06-27 21:38:15 +0300 |
commit | 316dfdd917bec6a218f431211d28bf8df6b6fb0f (patch) | |
tree | 5541073f9851f44c2bd67b4959dc776ee3c3810f /import-layers/yocto-poky/meta/conf/machine/include | |
parent | 36acd3e888044dea2ac0b2946f15616f968388c9 (diff) | |
download | openbmc-316dfdd917bec6a218f431211d28bf8df6b6fb0f.tar.xz |
Yocto 2.5
Move OpenBMC to Yocto 2.5(sumo)
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Change-Id: I5c5ad6904a16e14c1c397f0baf10c9d465594a78
Diffstat (limited to 'import-layers/yocto-poky/meta/conf/machine/include')
8 files changed, 195 insertions, 9 deletions
diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc new file mode 100644 index 000000000..eab7171cb --- /dev/null +++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/arch-microblaze.inc @@ -0,0 +1,53 @@ +# MicroBlaze architecture tune feature configuration + +# Architecture feature and override +TUNEVALID[microblaze] = "MicroBlaze" +MACHINEOVERRIDES =. "${@bb.utils.contains("TUNE_FEATURES", "microblaze", "microblaze:", "", d)}" + +# Endian +TUNEVALID[bigendian] = "Use Microblaze Big Endian" +TUNECONFLICTS[bigendian] += "v10.0" + +MBPKGARCH_ENDIAN = "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" + +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "bigendian", "-mbig-endian", "-mlittle-endian", d)}" + +# General features +TUNEVALID[barrel-shift] = "Enable Hardware Barrel Shifter" +TUNEVALID[pattern-compare] = "Enable Pattern Compare Instructions" +TUNEVALID[reorder] = "Enable Reorder Instructions" +TUNECONFLICTS[reorder] += "v8.00 v8.10 v8.20" + +# Core configuration tune optimizations +TUNEVALID[frequency-optimized] = "Enabling tuning for frequency optimized core (AREA_OPTIMIZED_2)" +TUNECONFLICTS[frequency-optimized] += "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6" + +# Feature compiler args +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-mxl-barrel-shift", "-mno-xl-barrel-shift", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-mxl-pattern-compare", "-mno-xl-pattern-compare", d)}" +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-mxl-frequency", "", d)}" + +# Disable reorder for v8.30 if pattern-compare is not enabled +TUNE_CCARGS += "${@bb.utils.contains("TUNE_FEATURES", "reorder", \ + bb.utils.contains("TUNE_FEATURES", "v8.30", \ + bb.utils.contains("TUNE_FEATURES", "pattern-compare", \ + "-mxl-reorder", "-mno-xl-reorder", d), \ + "-mxl-reorder", d), "-mno-xl-reorder", d)}" + +# Feature package architecture formatting +MBPKGARCH_TUNE = "" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "barrel-shift", "-bs", "", d)}" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "pattern-compare", "-cmp", "", d)}" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "reorder", "-re", "", d)}" +MBPKGARCH_TUNE .= "${@bb.utils.contains("TUNE_FEATURES", "frequency-optimized", "-fo", "", d)}" + +# Additional features +require conf/machine/include/microblaze/feature-microblaze-versions.inc +require conf/machine/include/microblaze/feature-microblaze-math.inc + +# Architecture name, either 'microblazeeb' or 'microblazeel' depending on endianess +TUNE_ARCH = "microblaze${@bb.utils.contains("TUNE_FEATURES", "bigendian", "eb", "el", d)}" + +# Package Architecture formatting +TUNE_PKGARCH = "microblaze${MBPKGARCH_ENDIAN}${MBPKGARCH_VERSION}${MBPKGARCH_TUNE}${MBPKGARCH_MATH}" + diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc new file mode 100644 index 000000000..a31516659 --- /dev/null +++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-math.inc @@ -0,0 +1,33 @@ +# This include describes the math features (integer and floating point) that +# are available for the MicroBlaze ISA + +TUNEVALID[multiply-low] = "Hardware multipler with 32 bit result" +TUNEVALID[multiply-high] = "Hardware multipler with 64 bit result" +TUNEVALID[divide-hard] = "Hardware divider" +TUNEVALID[fpu-soft] = "Software FPU" +TUNEVALID[fpu-hard] = "Hardware FPU in basic mode" +TUNEVALID[fpu-hard-extended] = "Hardware FPU in extended mode (conversion and square root instructions)" + +TUNECONFLICTS[fpu-soft] = "fpu-hard fpu-hard-extended" +TUNECONFLICTS[fpu-hard] = "fpu-soft" +TUNECONFLICTS[fpu-hard-extended] = "fpu-soft" + +# Compiler args +TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['multiply-low', 'multiply-high'], '-mno-xl-soft-mul', '-mxl-soft-mul', d)}" +TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mxl-multiply-high', '', d)}" + +TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-mno-xl-soft-div', '-mxl-soft-div', d)}" + +TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-soft', '', '', d)}" +TUNE_CCARGS += "${@bb.utils.contains_any('TUNE_FEATURES', ['fpu-hard', 'fpu-hard-extended'], '-mhard-float', '', d)}" +TUNE_CCARGS += "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-mxl-float-convert -mxl-float-sqrt', '', d)}" + +# Set target fpu (bitbake known target) to soft or hard (basic or extended) +TARGET_FPU = "${@bb.utils.contains_any('TUNE_FEATURES', 'fpu-hard fpu-hard-extended', 'fpu-hard', 'fpu-soft', d)}" + +# Package Architecture formatting +MBPKGARCH_MATH = "" +MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'multiply-high', '-mh', bb.utils.contains('TUNE_FEATURES', 'multiply-low', '-ml', '', d), d)}" +MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'divide-hard', '-div', '', d)}" +MBPKGARCH_MATH .= "${@bb.utils.contains('TUNE_FEATURES', 'fpu-hard-extended', '-fe', bb.utils.contains('TUNE_FEATURES', 'fpu-hard', '-fb', '', d), d)}" + diff --git a/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc new file mode 100644 index 000000000..955674fff --- /dev/null +++ b/import-layers/yocto-poky/meta/conf/machine/include/microblaze/feature-microblaze-versions.inc @@ -0,0 +1,67 @@ +# MicroBlaze versions are defined as features, the features are setup to +# conflict with other versions as well as unavailable features for particular +# versions. +# +# Versions before v9.0 of MicroBlaze use a versioning scheme of "vX.YY.Z" +# (where Z = [abc]). For v8.* versions of MicroBlaze the revision (Z) changes +# did not affect ABI and are ignored by this tune configuration. Though this +# format is expected by GCC including the revision, but this is defaulted to +# ".a". +# +# Since v9.0 of MicroBlaze the revision (Z) part of versions was entirely +# dropped and the version scheme was changed to "vX.Y". + +def microblaze_current_version(d, gcc = False): + import re + # find the current version, and convert it to major/minor integers + version = None + for t in (d.getVar("TUNE_FEATURES") or "").split(): + m = re.search("^v(\d+)\.(\d+)", t) + if m: + version = int(m.group(1)), int(m.group(2)) + break + + # format the version string in generic or GCC specific formats + if version: + if version[0] <= 8: + return ("v%d.%02d" % version[0:2]) + (".a" if gcc else "") + else: + return "v%d.%d" % version[0:2] + return "" + +# MicroBlaze versions +TUNEVALID[v8.00] = "MicroBlaze version 8.00" +TUNEVALID[v8.10] = "MicroBlaze version 8.10" +TUNEVALID[v8.20] = "MicroBlaze version 8.20" +TUNEVALID[v8.30] = "MicroBlaze version 8.30" +TUNEVALID[v8.40] = "MicroBlaze version 8.40" +TUNEVALID[v8.50] = "MicroBlaze version 8.50" +TUNEVALID[v9.0] = "MicroBlaze version 9.0" +TUNEVALID[v9.1] = "MicroBlaze version 9.1" +TUNEVALID[v9.2] = "MicroBlaze version 9.2" +TUNEVALID[v9.3] = "MicroBlaze version 9.3" +TUNEVALID[v9.4] = "MicroBlaze version 9.4" +TUNEVALID[v9.5] = "MicroBlaze version 9.5" +TUNEVALID[v9.6] = "MicroBlaze version 9.6" +TUNEVALID[v10.0] = "MicroBlaze version 10.0" + +# Version conflict matrix +TUNECONFLICTS[v8.00] = "" +TUNECONFLICTS[v8.10] = "v8.00" +TUNECONFLICTS[v8.20] = "v8.00 v8.10" +TUNECONFLICTS[v8.30] = "v8.00 v8.10 v8.20" +TUNECONFLICTS[v8.40] = "v8.00 v8.10 v8.20 v8.30" +TUNECONFLICTS[v8.50] = "v8.00 v8.10 v8.20 v8.30 v8.40" +TUNECONFLICTS[v9.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50" +TUNECONFLICTS[v9.1] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0" +TUNECONFLICTS[v9.2] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1" +TUNECONFLICTS[v9.3] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2" +TUNECONFLICTS[v9.4] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3" +TUNECONFLICTS[v9.5] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4" +TUNECONFLICTS[v9.6] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5" +TUNECONFLICTS[v10.0] = "v8.00 v8.10 v8.20 v8.30 v8.40 v8.50 v9.0 v9.1 v9.2 v9.3 v9.4 v9.5 v9.6" + +# Version flags +TUNE_CCARGS += "-mcpu=${@microblaze_current_version(d, True)}" +MBPKGARCH_VERSION = "-${@microblaze_current_version(d)}" + diff --git a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc index e64b0c831..aa332fecc 100644 --- a/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc +++ b/import-layers/yocto-poky/meta/conf/machine/include/qemu.inc @@ -16,7 +16,7 @@ MACHINEOVERRIDES =. "qemuall:" IMAGE_FSTYPES += "tar.bz2 ext4" # Don't include kernels in standard images -RDEPENDS_kernel-base = "" +RDEPENDS_${KERNEL_PACKAGE_NAME}-base = "" # Use a common kernel recipe for all QEMU machines PREFERRED_PROVIDER_virtual/kernel ?= "linux-yocto" @@ -27,6 +27,4 @@ EXTRA_IMAGEDEPENDS += "qemu-native qemu-helper-native" KERNEL_FEATURES_append_pn-linux-yocto = " features/nfsd/nfsd-enable.scc" KERNEL_FEATURES_append_pn-linux-yocto-rt = " features/nfsd/nfsd-enable.scc" -MACHINE_EXTRA_RRECOMMENDS += "rng-tools" - IMAGE_CLASSES += "qemuboot" diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc index f4ba43fbf..c686bb468 100644 --- a/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc +++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-core2.inc @@ -8,11 +8,8 @@ # DEFAULTTUNE ?= "core2-32" -# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc. -X86ARCH32 ?= "i686" - # Include the previous tune to pull in PACKAGE_EXTRA_ARCHS -require conf/machine/include/tune-i586.inc +require conf/machine/include/tune-i686.inc # Extra tune features TUNEVALID[core2] = "Enable core2 specific processor optimizations" @@ -23,16 +20,19 @@ AVAILTUNES += "core2-32" TUNE_FEATURES_tune-core2-32 = "${TUNE_FEATURES_tune-x86} core2" BASE_LIB_tune-core2-32 = "lib" TUNE_PKGARCH_tune-core2-32 = "core2-32" -PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i586} core2-32" +PACKAGE_EXTRA_ARCHS_tune-core2-32 = "${PACKAGE_EXTRA_ARCHS_tune-i686} core2-32" +QEMU_EXTRAOPTIONS_core2-32 = " -cpu core2duo" AVAILTUNES += "core2-64" TUNE_FEATURES_tune-core2-64 = "${TUNE_FEATURES_tune-x86-64} core2" BASE_LIB_tune-core2-64 = "lib64" TUNE_PKGARCH_tune-core2-64 = "core2-64" PACKAGE_EXTRA_ARCHS_tune-core2-64 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64} core2-64" +QEMU_EXTRAOPTIONS_core2-64 = " -cpu core2duo" AVAILTUNES += "core2-64-x32" TUNE_FEATURES_tune-core2-64-x32 = "${TUNE_FEATURES_tune-x86-64-x32} core2" BASE_LIB_tune-core2-64-x32 = "libx32" TUNE_PKGARCH_tune-core2-64-x32 = "core2-64-x32" PACKAGE_EXTRA_ARCHS_tune-core2-64-x32 = "${PACKAGE_EXTRA_ARCHS_tune-x86-64-x32} core2-64-x32" +QEMU_EXTRAOPTIONS_core2-64-x32 = " -cpu core2duo" diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc new file mode 100644 index 000000000..bdb479920 --- /dev/null +++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-i686.inc @@ -0,0 +1,27 @@ +# +# The i686 CPU family was introduced with the Intel Pentium Pro in 1995. +# It has as required feature flags: fpu tsc cx8 cmov. +# +# It is the minimum CPU required by the Debian i386 port. +# https://lists.debian.org/debian-devel-announce/2016/05/msg00001.html +# +# + +DEFAULTTUNE ?= "i686" + +# Set x86 target arch to i686, so that glibc enables SSE optimised memcpy, etc. +X86ARCH32 ?= "i686" + +# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS +require conf/machine/include/tune-i586.inc + +# Extra tune features +TUNEVALID[i686] = "Enable i686 specific processor optimizations" +TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'i686', ' -march=i686', '', d)}" + +# Extra tune selections +AVAILTUNES += "i686" +TUNE_FEATURES_tune-i686 = "${TUNE_FEATURES_tune-x86} i686" +BASE_LIB_tune-i686 = "lib" +TUNE_PKGARCH_tune-i686 = "i686" +PACKAGE_EXTRA_ARCHS_tune-i686 = "${PACKAGE_EXTRA_ARCHS_tune-i586} i686" diff --git a/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc b/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc new file mode 100644 index 000000000..41f0afe66 --- /dev/null +++ b/import-layers/yocto-poky/meta/conf/machine/include/tune-microblaze.inc @@ -0,0 +1,8 @@ +DEFAULTTUNE ?= "microblaze" + +require conf/machine/include/microblaze/arch-microblaze.inc + +AVAILTUNES += "microblaze" +TUNE_FEATURES_tune-microblaze = "microblaze" +PACKAGE_EXTRA_ARCHS_tune-microblaze = "${TUNE_PKGARCH}" + diff --git a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc index 023eb5ecc..f8aacea64 100644 --- a/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc +++ b/import-layers/yocto-poky/meta/conf/machine/include/x86-base.inc @@ -21,7 +21,7 @@ SERIAL_CONSOLE ?= "115200 ttyS0" # kernel-related variables # PREFERRED_PROVIDER_virtual/kernel ??= "linux-yocto" -PREFERRED_VERSION_linux-yocto ??= "4.12%" +PREFERRED_VERSION_linux-yocto ??= "4.15%" # # XSERVER subcomponents, used to build the XSERVER variable |