[meta-intel] [RFC][PATCH] conf: add new machine intel-skylake-64

Naveen Saini naveen.kumar.saini at intel.com
Sun Jul 21 19:41:11 PDT 2019


Add 64-bit new machine (intel-skylake-64) with -march=skylake
and avx2 instruction-set set up.

We do see a qemu-usermode failure at build time, on setup of
avx2 instruction-set as QEMU does not support AVX instruction
set.

Ross already raised a bug#
https://bugs.launchpad.net/qemu/+bug/1818075

So to bypass this issue disabling qemu-usermode for intel-skylake-64
machine.

Due to above limitation and in order to not affecting existing
machines, this new machine is being proposed to add.

Signed-off-by: Naveen Saini <naveen.kumar.saini at intel.com>
---
 conf/machine/include/qemuboot-intel.inc       |  4 +++
 conf/machine/include/tune-skylake.inc         | 28 ++++++++++++++++
 conf/machine/intel-skylake-64.conf            | 33 +++++++++++++++++++
 .../linux/meta-intel-compat-kernel.inc        |  1 +
 4 files changed, 66 insertions(+)
 create mode 100644 conf/machine/include/tune-skylake.inc
 create mode 100644 conf/machine/intel-skylake-64.conf

diff --git a/conf/machine/include/qemuboot-intel.inc b/conf/machine/include/qemuboot-intel.inc
index 6586cf09..88e20a3e 100644
--- a/conf/machine/include/qemuboot-intel.inc
+++ b/conf/machine/include/qemuboot-intel.inc
@@ -8,6 +8,10 @@ QB_SYSTEM_NAME_intel-corei7-64 = "qemu-system-x86_64"
 QB_CPU_intel-corei7-64 = "-cpu Nehalem"
 QB_CPU_KVM_intel-corei7-64 = "-cpu kvm64"
 
+QB_SYSTEM_NAME_intel-skylake-64 = "qemu-system-x86_64"
+QB_CPU_intel-skylake-64 = "-cpu Skylake-Client"
+QB_CPU_KVM_intel-skylake-64 = "-cpu kvm64"
+
 QB_AUDIO_DRV = "alsa"
 QB_AUDIO_OPT = "-soundhw ac97,es1370"
 QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 uvesafb.task_timeout=-1"
diff --git a/conf/machine/include/tune-skylake.inc b/conf/machine/include/tune-skylake.inc
new file mode 100644
index 00000000..78645def
--- /dev/null
+++ b/conf/machine/include/tune-skylake.inc
@@ -0,0 +1,28 @@
+# Settings for the GCC(1) cpu-type "skylake":
+#
+#     Intel Skylake CPU with 64-bit extensions, MMX, SSE, SSE2, SSE3, SSSE3, SSE4.1,
+#     SSE4.2, AVX, AVX2 and POPCNT instruction set support.
+#
+# This tune is recommended for Intel Skylake CPU (and beyond).
+#
+DEFAULTTUNE ?= "skylake-64"
+
+# Include the previous tune to pull in PACKAGE_EXTRA_ARCHS
+require conf/machine/include/tune-core2.inc
+
+# Extra tune features
+TUNEVALID[skylake] = "Enable skylake specific processor optimizations"
+TUNE_CCARGS .= "${@bb.utils.contains('TUNE_FEATURES', 'skylake', ' -march=skylake -mtune=generic -mfpmath=sse -mavx2', '', d)}"
+
+# Extra tune selections
+
+AVAILTUNES += "skylake-64"
+TUNE_FEATURES_tune-skylake-64 = "${TUNE_FEATURES_tune-x86-64} skylake"
+BASE_LIB_tune-skylake-64 = "lib64"
+TUNE_PKGARCH_tune-skylake-64 = "skylake-64"
+PACKAGE_EXTRA_ARCHS_tune-skylake-64 = "${PACKAGE_EXTRA_ARCHS_tune-core2-64} skylake-64"
+QEMU_EXTRAOPTIONS_skylake-64 = " -cpu Skylake-Client"
+
+# Disable QEMU user
+MACHINE_FEATURES_remove = "qemu-usermode"
+
diff --git a/conf/machine/intel-skylake-64.conf b/conf/machine/intel-skylake-64.conf
new file mode 100644
index 00000000..51786ba7
--- /dev/null
+++ b/conf/machine/intel-skylake-64.conf
@@ -0,0 +1,33 @@
+#@TYPE: Machine
+#@NAME: intel-skylake-64
+
+#@DESCRIPTION: Machine configuration for 64 bit Intel Skylake CPU (and later) with MMX, SSE, SSE2, SSE3, SSE4.1, SSE4.2, AVX, and AVX2 instruction set support. Supports a moderately wide range of drivers that should boot and be usable on "typical" hardware.
+
+require conf/machine/include/meta-intel.inc
+require conf/machine/include/x86-base.inc
+require conf/machine/include/tune-skylake.inc
+require conf/machine/include/intel-common-pkgarch.inc
+
+MACHINE_FEATURES += "efi"
+MACHINE_FEATURES += "wifi 3g nfc"
+MACHINE_FEATURES += "intel-ucode"
+
+MACHINE_HWCODECS ?= "intel-vaapi-driver gstreamer1.0-vaapi"
+
+XSERVER ?= "${XSERVER_X86_BASE} \
+            ${XSERVER_X86_EXT} \
+            ${XSERVER_X86_FBDEV} \
+            ${XSERVER_X86_I915} \
+            ${XSERVER_X86_I965} \
+            ${XSERVER_X86_MODESETTING} \
+            ${XSERVER_X86_VESA} \
+            ${XSERVER_X86_ASPEED_AST} \
+           "
+
+SYSLINUX_OPTS = "serial 0 115200"
+SERIAL_CONSOLES = "115200;ttyS0 115200;ttyS1 115200;ttyS2"
+APPEND += "rootwait console=ttyS0,115200 console=tty0"
+
+IMAGE_FSTYPES += "wic"
+WKS_FILE ?= "${@bb.utils.contains_any("EFI_PROVIDER", "systemd-boot", "systemd-bootdisk-microcode.wks.in", "grub-bootdisk-microcode.wks.in", d)}"
+WKS_FILE_DEPENDS_append = " intel-microcode"
diff --git a/recipes-kernel/linux/meta-intel-compat-kernel.inc b/recipes-kernel/linux/meta-intel-compat-kernel.inc
index be5056c2..a985925f 100644
--- a/recipes-kernel/linux/meta-intel-compat-kernel.inc
+++ b/recipes-kernel/linux/meta-intel-compat-kernel.inc
@@ -8,6 +8,7 @@ KERNEL_FEATURES_intel-x86-common = "${KERNEL_FEATURES_INTEL_COMMON}"
 
 KMACHINE_corei7-64-intel-common = "intel-corei7-64"
 KMACHINE_core2-32-intel-common = "intel-core2-32"
+KMACHINE_skylake-64-intel-common = "intel-corei7-64"
 
 INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915"
 KERNEL_MODULE_AUTOLOAD_intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}"
-- 
2.17.1



More information about the meta-intel mailing list