diff options
Diffstat (limited to 'bsp/meta-intel/recipes-kernel')
31 files changed, 799 insertions, 0 deletions
diff --git a/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch b/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch new file mode 100644 index 00000000..353126fe --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module/0001-zc-Force-4.10-get_user_pages_remote-API.patch @@ -0,0 +1,26 @@ +From 3fcc81ad127c267018aed96a359bbf01db1bd8ee Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Sat, 1 Apr 2017 11:43:31 -0700 +Subject: [PATCH] zc: Force 4.10 get_user_pages_remote API + +This change forces the newer API, as the linux-intel 4.9-LTS kernel +backported the 4.10 API change in the page handling code. + +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + zc.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/zc.c b/zc.c +index ae464ff..b2759ce 100644 +--- a/zc.c ++++ b/zc.c +@@ -65,7 +65,7 @@ int __get_userbuf(uint8_t __user *addr, uint32_t len, int write, + #elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 9, 0)) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write, 0, pg, NULL); +-#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0)) ++#elif (LINUX_VERSION_CODE < KERNEL_VERSION(4, 10, 0) & 0) + ret = get_user_pages_remote(task, mm, + (unsigned long)addr, pgcount, write ? FOLL_WRITE : 0, + pg, NULL); diff --git a/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend b/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend new file mode 100644 index 00000000..c59ddb2f --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/cryptodev/cryptodev-module_%.bbappend @@ -0,0 +1,9 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +python() { + # When we add more kernels for linux-intel, we may have to add a Version check + if (d.getVar("PREFERRED_PROVIDER_virtual/kernel") == "linux-intel"): + src_uri = d.getVar("SRC_URI") + d.setVar("SRC_URI", src_uri + + " file://0001-zc-Force-4.10-get_user_pages_remote-API.patch") +} diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch new file mode 100644 index 00000000..0041af57 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe/0001-ixgbe-skip-host-depmod.patch @@ -0,0 +1,31 @@ +From 5f87ef7ed60bc9762467184ed0a6d000b80713d9 Mon Sep 17 00:00:00 2001 +From: sweeaun <swee.aun.khor@intel.com> +Date: Sun, 8 Apr 2018 17:21:52 +0800 +Subject: [PATCH] ixgbe: skip host depmod + +Upstream-Status: Inappropriate [Cross-Compile] + +Depmod during do_install is irrelevant when cross-compiling. +Remove the depmod steps during do_install. + +Signed-off-by: sweeaun <swee.aun.khor@intel.com> +--- + Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 545489a..07e422f 100644 +--- a/Makefile ++++ b/Makefile +@@ -141,8 +141,6 @@ install: default manfile + @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz + @echo "Installing modules..." + @+$(call devkernelbuild,modules_install) +- @echo "Running depmod..." +- @$(call cmd_depmod) + + uninstall: + rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko; +-- +2.7.4 + diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb new file mode 100644 index 00000000..28d5e980 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbe_5.5.2.bb @@ -0,0 +1,37 @@ +SUMMARY="ixgbe kernel driver for Intel Magnolia Park 10GbE" +DESCRIPTION="The ixgbe driver supports 82598- and 82599-based \ +PCI Express* 10 Gigabit Network Connections." + +HOMEPAGE = "https://sourceforge.net/projects/e1000/" +SECTION = "kernel/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=a216b4192dc6b777b6f0db560e9a8417" + +SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbe%20stable/${PV}/${BP}.tar.gz \ + file://0001-ixgbe-skip-host-depmod.patch \ + " + +SRC_URI[md5sum] = "678514cb0e24f1c11d53d156a9845e64" +SRC_URI[sha256sum] = "1c1386e4eb0b4526d2edeb04cac657e1d74c2e5cef3f2d00a26a23926744ef1a" + +S = "${WORKDIR}/${BP}/src" +MODULES_INSTALL_TARGET = "install" + +EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' + +KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbe" +KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbe" + +inherit module + +do_install_append () { + # Install scripts/set_irq_affinity + install -d ${D}${sysconfdir}/network + install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network + + rm -rf ${D}${prefix}/man +} + +PACKAGES += "${PN}-script" + +FILES_${PN}-script += "${sysconfdir}/network/set_irq_affinity" diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch new file mode 100644 index 00000000..49a59496 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch @@ -0,0 +1,27 @@ +From b1d7f46442e50458311573443a5c78637874f62b Mon Sep 17 00:00:00 2001 +From: Anuj Mittal <anuj.mittal@intel.com> +Date: Thu, 12 Apr 2018 11:46:15 +0800 +Subject: [PATCH] Makefile: check for CONFIG_IXGBEVF instead + +Check for the correct config, otherwise it won't build with kbuild. + +Upstream-Status: Pending + +Signed-off-by: Anuj Mittal <anuj.mittal@intel.com> +--- + src/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 968ef5e..e3cb81b 100644 +--- a/Makefile ++++ b/Makefile +@@ -28,7 +28,7 @@ ifneq ($(KERNELRELEASE),) + # Makefile for the Intel(R) 10GbE PCI Express Virtual Function Driver + # + +-obj-$(CONFIG_IXGBE) += ixgbevf.o ++obj-$(CONFIG_IXGBEVF) += ixgbevf.o + + define ixgbevf-y + ixgbevf_main.o diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch new file mode 100644 index 00000000..656a897d --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf/0001-ixgbevf-skip-host-depmod.patch @@ -0,0 +1,31 @@ +From 9677d09f5c3984997ac8e7d90b5d4b11fb9ce277 Mon Sep 17 00:00:00 2001 +From: sweeaun <swee.aun.khor@intel.com> +Date: Sat, 7 Oct 2017 20:56:35 -0700 +Subject: [PATCH] ixgbevf: skip host depmod + +Upstream-Status: Inappropriate [Cross-Compile] + +Depmod during do_install is irrelevant when cross-compiling. +Remove the depmod steps during do_install. + +Signed-off-by: sweeaun <swee.aun.khor@intel.com> +--- + Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/Makefile b/Makefile +index 91df705..1dcf350 100644 +--- a/Makefile ++++ b/Makefile +@@ -104,8 +104,6 @@ modules_install: default manfile + @install -D -m 644 ${DRIVER}.${MANSECTION}.gz ${INSTALL_MOD_PATH}${MANDIR}/man${MANSECTION}/${DRIVER}.${MANSECTION}.gz + @echo "Installing modules..." + @+$(call kernelbuild,modules_install) +- @echo "Running depmod..." +- @$(call cmd_depmod) + + uninstall: + rm -f ${INSTALL_MOD_PATH}/lib/modules/${KVER}/${INSTALL_MOD_DIR}/${DRIVER}.ko; +-- +2.7.4 + diff --git a/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb new file mode 100644 index 00000000..2a793508 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/intel-ethernet/ixgbevf_4.3.6.bb @@ -0,0 +1,41 @@ +SUMMARY="ixgbevf kernel driver for Intel Magnolia Park 10GbE" +DESCRIPTION="This virtual function driver supports kernel versions 2.6.x and newer \ +This driver supports 82599, X540, X550, and X552-based virtual function devices \ +that can only be activated on kernels that support SR-IOV. \ +SR-IOV requires the correct platform and OS support. \ +The guest OS loading this driver must support MSI-X interrupts." + +HOMEPAGE = "https://sourceforge.net/projects/e1000/" +SECTION = "kernel/network" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${WORKDIR}/${BP}/COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263" + +SRC_URI = "https://sourceforge.net/projects/e1000/files/ixgbevf%20stable/${PV}/${BP}.tar.gz \ + file://0001-ixgbevf-skip-host-depmod.patch \ + file://0001-Makefile-check-for-CONFIG_IXGBEVF-instead.patch \ + " + +SRC_URI[md5sum] = "fc53be00bf5e71939a9a39e9802d5b77" +SRC_URI[sha256sum] = "61ac4e93808fa4316b044bae40f2a1dc40e4d9ae9a1785a753cdfc79b515d695" + +S = "${WORKDIR}/${BP}/src" +MODULES_INSTALL_TARGET = "install" + +EXTRA_OEMAKE='KSRC="${STAGING_KERNEL_BUILDDIR}" KVER="${KERNEL_VERSION}" INSTALL_MOD_PATH="${D}"' + +KERNEL_MODULE_AUTOLOAD_append_intel-core2-32 = " ixgbevf" +KERNEL_MODULE_AUTOLOAD_append_intel-corei7-64 = " ixgbevf" + +inherit module + +do_install_append () { + # Install scripts/set_irq_affinity + install -d ${D}${sysconfdir}/network + install -m 0755 ${S}/../scripts/set_irq_affinity ${D}${sysconfdir}/network + + rm -rf ${D}${prefix}/man +} + +PACKAGES += "${PN}-script" + +FILES_${PN}-script += "${sysconfdir}/network/set_irq_affinity" diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch new file mode 100644 index 00000000..1d4137ba --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-Makefile.real-skip-host-install-scripts.patch @@ -0,0 +1,36 @@ +From f69ff2fd27903ee052309179271f708d720a2f94 Mon Sep 17 00:00:00 2001 +From: Mikko Ylinen <mikko.ylinen@linux.intel.com> +Date: Thu, 10 Aug 2017 21:12:51 +0300 +Subject: [PATCH] Makefile.real: skip host install scripts + +The scripts run in install target are relevant (and working) +only if the driver installation is run on the build host. + +Skip the scripts when cross-compiling. + +Upstream-Status: Inappropriate [Cross-Compile] + +Signed-off-by: Mikko Ylinen <mikko.ylinen@linux.intel.com> +--- + Makefile.real | 5 ----- + 1 file changed, 5 deletions(-) + +diff --git a/Makefile.real b/Makefile.real +index ba09f99..f5075de 100644 +--- a/Makefile.real ++++ b/Makefile.real +@@ -104,11 +104,6 @@ install: modules + @$(MAKE) -C $(KLIB_BUILD) M=$(BACKPORT_DIR) \ + INSTALL_MOD_DIR=$(KMODDIR) $(KMODPATH_ARG) \ + modules_install +- @./scripts/blacklist.sh $(KLIB)/ $(KLIB)/$(KMODDIR) +- @./scripts/compress_modules.sh $(KLIB)/$(KMODDIR) +- @./scripts/check_depmod.sh +- @/sbin/depmod -a +- @./scripts/update-initramfs.sh $(KLIB) + @echo + @echo Your backported driver modules should be installed now. + @echo Reboot. +-- +2.1.4 + diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch new file mode 100644 index 00000000..4fdc36f7 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/0001-hrtimer-fix-version-numbers-because-production-kerne.patch @@ -0,0 +1,87 @@ +From ecb29b78ce946c802058be0c46a0d20432f412e5 Mon Sep 17 00:00:00 2001 +From: Saul Wold <sgw@linux.intel.com> +Date: Thu, 28 Sep 2017 10:51:15 -0700 +Subject: [PATCH] hrtimer: fix version numbers because production kernel has + update + +Decrease the version check because the OTC production kernel which is +4.9 includes the HRTimer code that this is using. + +Upstream-Status: [Backport] It's been backported into the older kernel +Signed-off-by: Saul Wold <sgw@linux.intel.com> +--- + backport-include/linux/hrtimer.h | 2 +- + drivers/net/wireless/intel/iwlwifi/mvm/tx.c | 2 +- + drivers/net/wireless/intel/iwlwifi/pcie/tx.c | 2 +- + drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c | 2 +- + net/mac80211/tx.c | 2 +- + 5 files changed, 5 insertions(+), 5 deletions(-) + +diff --git a/backport-include/linux/hrtimer.h b/backport-include/linux/hrtimer.h +index bdcf106e1..ae128852d 100644 +--- a/backport-include/linux/hrtimer.h ++++ b/backport-include/linux/hrtimer.h +@@ -4,7 +4,7 @@ + #include_next <linux/hrtimer.h> + #include <linux/interrupt.h> + +-#if LINUX_VERSION_IS_LESS(4,10,0) ++#if LINUX_VERSION_IS_LESS(4,9,0) + static inline void backport_hrtimer_start(struct hrtimer *timer, s64 time, + const enum hrtimer_mode mode) + { +diff --git a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +index cf1f95a01..e6f1ff294 100644 +--- a/drivers/net/wireless/intel/iwlwifi/mvm/tx.c ++++ b/drivers/net/wireless/intel/iwlwifi/mvm/tx.c +@@ -1310,7 +1310,7 @@ static void iwl_mvm_tx_lat_add_ts_ack(struct sk_buff *skb) + s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32; + s64 diff = temp - ts_1; + +-#if LINUX_VERSION_IS_LESS(4,10,0) ++#if LINUX_VERSION_IS_LESS(4,9,0) + skb->tstamp.tv64 += diff; + #else + skb->tstamp += diff; +diff --git a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +index df81bce25..ad664bacd 100644 +--- a/drivers/net/wireless/intel/iwlwifi/pcie/tx.c ++++ b/drivers/net/wireless/intel/iwlwifi/pcie/tx.c +@@ -1955,7 +1955,7 @@ static void iwl_trans_pci_tx_lat_add_ts_write(struct sk_buff *skb) + s64 ts_1 = ktime_to_ns(skb->tstamp) >> 32; + s64 diff = temp - ts_1; + +-#if LINUX_VERSION_IS_LESS(4,10,0) ++#if LINUX_VERSION_IS_LESS(4,9,0) + skb->tstamp.tv64 += diff << 16; + #else + skb->tstamp += diff << 16; +diff --git a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c +index e4d45bcf7..cdd0ba9a2 100644 +--- a/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c ++++ b/drivers/net/wireless/intel/iwlwifi/trans_slave/shared.c +@@ -796,7 +796,7 @@ void iwl_slv_tx_lat_add_ts_write(struct iwl_trans_slv *trans_slv, + + ts_1 = ktime_to_ns(data_entry->skb->tstamp) >> 32; + diff = temp - ts_1; +-#if LINUX_VERSION_IS_LESS(4,10,0) ++#if LINUX_VERSION_IS_LESS(4,9,0) + data_entry->skb->tstamp.tv64 += diff << 16; + #else + data_entry->skb->tstamp += diff << 16; +diff --git a/net/mac80211/tx.c b/net/mac80211/tx.c +index 94a348688..0f226c413 100644 +--- a/net/mac80211/tx.c ++++ b/net/mac80211/tx.c +@@ -2278,7 +2278,7 @@ static void ieee80211_tx_latency_start_msrmnt(struct ieee80211_local *local, + if (!tx_latency && !tx_consec && !tx_thrshld) + return; + temp = ktime_to_ms(ktime_get()); +-#if LINUX_VERSION_IS_LESS(4,10,0) ++#if LINUX_VERSION_IS_LESS(4,9,0) + skb->tstamp.tv64 += temp << 32; + #else + skb->tstamp += temp << 32; +-- +2.13.5 + diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf new file mode 100644 index 00000000..a0e5f6ff --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi/iwlwifi.conf @@ -0,0 +1,12 @@ +# /etc/modprobe.d/iwlwifi.conf +# iwlwifi will dynamically load either iwldvm or iwlmvm depending on the +# microcode file installed on the system. When removing iwlwifi, first +# remove the iwl?vm module and then iwlwifi. +remove iwlwifi (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm16 -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) && /sbin/modprobe -r mac80211 + +#options iwlwifi lar_disable=1 +#options iwlwifi nvm_file="nvm-sfp-b2-open.bin" +options iwlmvm power_scheme=1 + +# PCI BUS + diff --git a/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb new file mode 100644 index 00000000..1453f519 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/iwlwifi/backport-iwlwifi_git.bb @@ -0,0 +1,56 @@ +SUMMARY = "Intel Wireless LinuxCore kernel driver" +DESCRIPTION = "Intel Wireless LinuxCore kernel driver" +SECTION = "kernel" +LICENSE = "GPLv2" + +REQUIRED_DISTRO_FEATURES = "wifi" + +LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" + +inherit module + +# For some iwfwifi LinuxCore supported wireless chips, the best/latest +# firmware blobs are found in the iwlwifi's linux-firmware.git fork. +# +# See: https://wireless.wiki.kernel.org/en/users/drivers/iwlwifi/core_release +# +# When updating this recipe, ensure that the proper firmware is included from +# either the linux-firmware or iwlwifi-firmware repos. + +PV = "30" +SRCREV = "b31221a99488021300e7f89d2ecf9bdd2bc52dd2" + +# Add a patch for Intel's Production Kernel as it's got a backport of HRTimers +PK_PATCH = "${@bb.utils.contains('PREFERRED_PROVIDER_virtual/kernel','linux-intel','file://0001-hrtimer-fix-version-numbers-because-production-kerne.patch','',d)}" + +SRC_URI = " \ + git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV} \ + file://0001-Makefile.real-skip-host-install-scripts.patch \ + ${PK_PATCH} \ + file://iwlwifi.conf \ + " + +S = "${WORKDIR}/git" + +EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}" + +do_configure() { + CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} +} + +MODULES_INSTALL_TARGET="install" + +do_install_append() { + ## install configs and service scripts + install -d ${D}${sysconfdir}/modprobe.d + install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d +} + +RDEPENDS_${PN} = "linux-firmware-iwlwifi" + +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" + +KERNEL_MODULE_PACKAGE_PREFIX = "backport-iwlwifi" + +EXCLUDE_FROM_WORLD = "1" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb new file mode 100644 index 00000000..0611304c --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.14.bb @@ -0,0 +1,24 @@ +require linux-intel.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") +} + +KBRANCH = "4.14/preempt-rt" +KMETA_BRANCH = "yocto-4.14" + +# Fix for 32-bit perf issue. Remove when patch is backported to 4.14. +SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch" + +DEPENDS += "elfutils-native openssl-native util-linux-native" + +LINUX_VERSION ?= "4.14.106" +SRCREV_machine ?= "5cfa4c85d15168b84e40bd38b7d31a62a01e40d3" +SRCREV_meta ?= "bc35d5bd224ab031440a69f9806d839db382f05c" + +LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb new file mode 100644 index 00000000..0fd47585 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.19.bb @@ -0,0 +1,24 @@ +require linux-intel.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") +} + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" +SRC_URI_append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch" + +KBRANCH = "4.19/preempt-rt" +KMETA_BRANCH = "yocto-4.19" + +DEPENDS += "elfutils-native openssl-native util-linux-native" + +LINUX_VERSION ?= "4.19.31" +SRCREV_machine ?= "8b4bc03e27be3bd3b23249205d11185b2ed21ec6" +SRCREV_meta ?= "d85f07e03c980eca5ffd5ba058985d6ed3a83801" + +LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb new file mode 100644 index 00000000..fd82cfa6 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel-rt_4.9.bb @@ -0,0 +1,20 @@ + +require linux-intel.inc + +# Skip processing of this recipe if it is not explicitly specified as the +# PREFERRED_PROVIDER for virtual/kernel. This avoids errors when trying +# to build multiple virtual/kernel providers, e.g. as dependency of +# core-image-rt-sdk, core-image-rt. +python () { + if d.getVar("PREFERRED_PROVIDER_virtual/kernel") != "linux-intel-rt": + raise bb.parse.SkipPackage("Set PREFERRED_PROVIDER_virtual/kernel to linux-intel-rt to enable it") +} + +KBRANCH = "4.9/yocto/base-rt" +KMETA_BRANCH = "yocto-4.9" + +LINUX_VERSION ?= "4.9.146" +SRCREV_machine ?= "bc2342621494c9c1b28ce29110fb95c80a17a1be" +SRCREV_meta ?= "bae5cc4e973f60baa35ed227ba0c3bdda4d16e87" + +LINUX_KERNEL_TYPE = "preempt-rt" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel.inc b/bsp/meta-intel/recipes-kernel/linux/linux-intel.inc new file mode 100644 index 00000000..f2ba0d13 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel.inc @@ -0,0 +1,25 @@ +require recipes-kernel/linux/linux-yocto.inc +require recipes-kernel/linux/meta-intel-compat-kernel.inc + +FILESEXTRAPATHS_prepend := "${THISDIR}/linux-intel:" + +KERNEL_CONFIG_URI ?= "git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=${KMETA_BRANCH};destsuffix=${KMETA}" + +SRC_URI = " \ + git://github.com/intel/linux-intel-lts.git;protocol=https;name=machine;branch=${KBRANCH}; \ + ${KERNEL_CONFIG_URI} \ + " + +SRC_URI_append_core2-32-intel-common = " file://disable_skylake_sound.cfg" + +LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +COMPATIBLE_MACHINE ?= "(intel-corei7-64|intel-core2-32)" + +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch new file mode 100644 index 00000000..a9e9213b --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch @@ -0,0 +1,62 @@ +From e6ebc8e654bba53f28af5229a1069fc74fa58b7b Mon Sep 17 00:00:00 2001 +From: Jason Wessel <jason.wessel@windriver.com> +Date: Thu, 25 Sep 2014 11:26:49 -0700 +Subject: [PATCH] menuconfig,check-lxdiaglog.sh: Allow specification of ncurses + location + +In some cross build environments such as the Yocto Project build +environment it provides an ncurses library that is compiled +differently than the host's version. This causes display corruption +problems when the host's curses includes are used instead of the +includes from the provided compiler are overridden. There is a second +case where there is no curses libraries at all on the host system and +menuconfig will just fail entirely. + +The solution is simply to allow an override variable in +check-lxdialog.sh for environments such as the Yocto Project. Adding +a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing +compiling and linking against the right headers and libraries. + +Upstream-Status: submitted [https://lkml.org/lkml/2013/3/3/103] + +Signed-off-by: Jason Wessel <jason.wessel@windriver.com> +cc: Michal Marek <mmarek@suse.cz> +cc: linux-kbuild@vger.kernel.org +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +Signed-off-by: California Sullivan <california.l.sullivan@intel.com> +--- + scripts/kconfig/lxdialog/check-lxdialog.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + mode change 100755 => 100644 scripts/kconfig/lxdialog/check-lxdialog.sh + +diff --git a/scripts/kconfig/lxdialog/check-lxdialog.sh b/scripts/kconfig/lxdialog/check-lxdialog.sh +old mode 100755 +new mode 100644 +index 5075ebf2d3b9..ba9242101190 +--- a/scripts/kconfig/lxdialog/check-lxdialog.sh ++++ b/scripts/kconfig/lxdialog/check-lxdialog.sh +@@ -4,6 +4,10 @@ + # What library to link + ldflags() + { ++ if [ "$CROSS_CURSES_LIB" != "" ]; then ++ echo "$CROSS_CURSES_LIB" ++ exit ++ fi + pkg-config --libs ncursesw 2>/dev/null && exit + pkg-config --libs ncurses 2>/dev/null && exit + for ext in so a dll.a dylib ; do +@@ -21,6 +25,10 @@ ldflags() + # Where is ncurses.h? + ccflags() + { ++ if [ x"$CROSS_CURSES_INC" != x ]; then ++ echo "$CROSS_CURSES_INC" ++ exit ++ fi + if pkg-config --cflags ncursesw 2>/dev/null; then + echo '-DCURSES_LOC="<ncurses.h>" -DNCURSES_WIDECHAR=1' + elif pkg-config --cflags ncurses 2>/dev/null; then +-- +2.14.3 + diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch new file mode 100644 index 00000000..3dc71ff2 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch @@ -0,0 +1,48 @@ +From bebd63730a433ba62549a80114a9851328aa8897 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Mon, 2 Jul 2018 23:10:28 -0400 +Subject: [PATCH] menuconfig,mconf-cfg: Allow specification of ncurses location + +In some cross build environments such as the Yocto Project build +environment it provides an ncurses library that is compiled +differently than the host's version. This causes display corruption +problems when the host's curses includes are used instead of the +includes from the provided compiler are overridden. There is a second +case where there is no curses libraries at all on the host system and +menuconfig will just fail entirely. + +The solution is simply to allow an override variable in +check-lxdialog.sh for environments such as the Yocto Project. Adding +a CROSS_CURSES_LIB and CROSS_CURSES_INC solves the issue and allowing +compiling and linking against the right headers and libraries. + +Signed-off-by: Jason Wessel <jason.wessel@windriver.com> +cc: Michal Marek <mmarek@suse.cz> +cc: linux-kbuild@vger.kernel.org +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +--- + scripts/kconfig/mconf-cfg.sh | 8 ++++++++ + 1 file changed, 8 insertions(+) + +diff --git a/scripts/kconfig/mconf-cfg.sh b/scripts/kconfig/mconf-cfg.sh +index c812872d7f9d..42d20819025c 100755 +--- a/scripts/kconfig/mconf-cfg.sh ++++ b/scripts/kconfig/mconf-cfg.sh +@@ -4,6 +4,14 @@ + PKG="ncursesw" + PKG2="ncurses" + ++if [ "$CROSS_CURSES_LIB" != "" ]; then ++ echo libs=\'$CROSS_CURSES_LIB\' ++ if [ x"$CROSS_CURSES_INC" != x ]; then ++ echo cflags=\'$CROSS_CURSES_INC\' ++ fi ++ exit 0 ++fi ++ + if [ -n "$(command -v pkg-config)" ]; then + if pkg-config --exists $PKG; then + echo cflags=\"$(pkg-config --cflags $PKG)\" +-- +2.17.1 + diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch new file mode 100644 index 00000000..5c8b27c7 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel/0001-perf-x86-32-explicitly-include-errno.h.patch @@ -0,0 +1,41 @@ +From 57af599929263e7bb6f2f369c9e4bc1e440528a9 Mon Sep 17 00:00:00 2001 +From: Bruce Ashfield <bruce.ashfield@windriver.com> +Date: Mon, 21 Aug 2017 13:52:53 -0400 +Subject: [PATCH 1/1] perf: x86-32: explicitly include <errno.h> + +Upstream-Status: submitted + +The 32bit x86 perf build does not find the system definitions of error +return values, hence we end up with: + +| In file included from util/libunwind/x86_32.c:32:0: +| util/libunwind/../../arch/x86/util/unwind-libunwind.c: In function 'libunwind__x86_reg_id': +| util/libunwind/../../arch/x86/util/unwind-libunwind.c:109:11: error: 'EINVAL' undeclared (first use in this function); did you mean 'UNW_EINVAL'? +| return -EINVAL; +| ^~~~~~ +| UNW_EINVAL + +By explicitly including errno.h, we can fix this build without impacting +other architectures. + +Signed-off-by: Bruce Ashfield <bruce.ashfield@windriver.com> +--- + + tools/perf/util/libunwind/x86_32.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/tools/perf/util/libunwind/x86_32.c b/tools/perf/util/libunwind/x86_32.c +index 957ffff72428..d781f7bdeb88 100644 +--- a/tools/perf/util/libunwind/x86_32.c ++++ b/tools/perf/util/libunwind/x86_32.c +@@ -20,6 +20,7 @@ + #define LIBUNWIND__ARCH_REG_IP PERF_REG_X86_IP + #define LIBUNWIND__ARCH_REG_SP PERF_REG_X86_SP + ++#include <errno.h> + #include "unwind.h" + #include "debug.h" + #include "libunwind-x86.h" +-- +2.14.3 + diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg b/bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg new file mode 100644 index 00000000..b38cf6c2 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel/disable_skylake_sound.cfg @@ -0,0 +1,12 @@ +# CONFIG_SND_SOC_INTEL_SKYLAKE is not set +# CONFIG_SND_SOC_INTEL_BXT_DA7219_MAX98357A_MACH is not set +# CONFIG_SND_SOC_INTEL_BXT_RT298_MACH is not set +# CONFIG_SND_SOC_INTEL_BXT_TDF8532_MACH is not set +# CONFIG_SND_SOC_INTEL_KBL_RT5663_MAX98927_MACH is not set +# CONFIG_SND_SOC_INTEL_SKL_RT286_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_RT274_MACH is not set +# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_SSM4567_MACH is not set +# CONFIG_SND_SOC_INTEL_SKL_NAU88L25_MAX98357A_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_CS42L42_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_RT700_MACH is not set +# CONFIG_SND_SOC_INTEL_CNL_SVFPGA_MACH is not set diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb new file mode 100644 index 00000000..cc100fe8 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.14.bb @@ -0,0 +1,22 @@ +require linux-intel.inc + +KBRANCH = "4.14/base" +KMETA_BRANCH = "yocto-4.14" + +# Fix for 32-bit perf issue. Remove when patch is backported to 4.14. +SRC_URI_append = " file://0001-perf-x86-32-explicitly-include-errno.h.patch \ + file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ + " + +DEPENDS += "elfutils-native openssl-native util-linux-native" + +LINUX_VERSION ?= "4.14.110" +SRCREV_machine ?= "f93147df5d96922347d0a4143ad06ae5d45d1caf" +SRCREV_meta ?= "bc35d5bd224ab031440a69f9806d839db382f05c" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb new file mode 100644 index 00000000..c3f1a9d1 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.19.bb @@ -0,0 +1,21 @@ +require linux-intel.inc + +KBRANCH = "4.19/base" +KMETA_BRANCH = "yocto-4.19" + +LIC_FILES_CHKSUM = "file://COPYING;md5=bbea815ee2795b2f4230826c0c6b8814" + +SRC_URI_append = " file://0001-menuconfig-mconf-cfg-Allow-specification-of-ncurses-.patch" + +DEPENDS += "elfutils-native openssl-native util-linux-native" + +LINUX_VERSION ?= "4.19.40" +SRCREV_machine ?= "106e1f78760b7e980a9598098ee45ec0a683c7ed" +SRCREV_meta ?= "6fface2df8bc35e72aaf3d79352413fd84175879" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc features/security/security.scc" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb new file mode 100644 index 00000000..d1ba3004 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-intel_4.9.bb @@ -0,0 +1,20 @@ + +require linux-intel.inc + +KBRANCH = "4.9/yocto/base" +KMETA_BRANCH = "yocto-4.9" + +SRC_URI_append = " \ + file://0001-menuconfig-check-lxdiaglog.sh-Allow-specification-of.patch \ + " + +LINUX_VERSION ?= "4.9.183" +SRCREV_machine ?= "107e98ee74a588750a5a80ffe11f52628295e461" +SRCREV_meta ?= "f9e90afd4e47920e990dacb73cd6508917ca5422" + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# Functionality flags +KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend new file mode 100644 index 00000000..6173148c --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-dev.bbappend @@ -0,0 +1,21 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + +COMPATIBLE_MACHINE_core2-32-intel-common = "${MACHINE}" +KMACHINE_core2-32-intel-common = "intel-core2-32" +KERNEL_FEATURES_append_core2-32-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +COMPATIBLE_MACHINE_corei7-64-intel-common = "${MACHINE}" +KMACHINE_corei7-64-intel-common = "intel-corei7-64" +KERNEL_FEATURES_append_corei7-64-intel-common = "${KERNEL_FEATURES_INTEL_COMMON}" + +# NOTE: We do not set SRCREVs here as -dev is intended to be built with AUTOREV +# and setting them here breaks the default mechanism to use AUTOREV if the +# default SRCREV is set and linux-yocto-dev is the preferred provider. + +# For Crystalforest and Romley +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " uio" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " uio" + +# For FRI2, NUC +KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" +KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend new file mode 100644 index 00000000..daa7dd6b --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.14.bbappend @@ -0,0 +1 @@ +require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend new file mode 100644 index 00000000..daa7dd6b --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-yocto-rt_4.18.bbappend @@ -0,0 +1 @@ +require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend new file mode 100644 index 00000000..7c29be14 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_%.bbappend @@ -0,0 +1,4 @@ +# The kernel build is 64-bit regardless, so include both common overrides. +# Without this, the kernel will be missing vars that make it buildable for the +# intel-corei7-64 machine. +MACHINEOVERRIDES_prepend_corei7-64-x32-intel-common = "corei7-64-intel-common:" diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend new file mode 100644 index 00000000..daa7dd6b --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.14.bbappend @@ -0,0 +1 @@ +require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend new file mode 100644 index 00000000..daa7dd6b --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/linux-yocto_4.18.bbappend @@ -0,0 +1 @@ +require meta-intel-compat-kernel.inc diff --git a/bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc b/bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc new file mode 100644 index 00000000..be5056c2 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/linux/meta-intel-compat-kernel.inc @@ -0,0 +1,13 @@ +# These are variables that should be added to any +# kernel compatible with meta-intel + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +COMPATIBLE_MACHINE_intel-x86-common = "${MACHINE}" +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" + +INTEL_COMMON_AUTOLOAD ?= " uio iwlwifi i915" +KERNEL_MODULE_AUTOLOAD_intel-x86-common = " ${INTEL_COMMON_AUTOLOAD}" diff --git a/bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch b/bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch new file mode 100644 index 00000000..32b49b8d --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/lttng/lttng-modules/0002-lttng-modules-PKT-4.9-yocto-build-failed.patch @@ -0,0 +1,38 @@ +From ebfdc8b8af17f9cf23c6878eb52476fde7b48e5c Mon Sep 17 00:00:00 2001 +From: Priyalee Kushwaha <priyalee.kushwaha@intel.com> +Date: Fri, 22 Sep 2017 14:40:57 -0700 +Subject: [PATCH] lttng-modules: PKT 4.9 yocto build failed + +PKT 4.9 yocto kernel backports a patch from upstream and that +changes header include/linux/ktimer.h. Since this backported +patch is only relevant for PKT kernel, we need to carry this +patch. + +Upstream-Status: Backport +Signed-off-by: Kushwaha, Priyalee <priyalee.kushwaha@intel.com> +--- + instrumentation/events/lttng-module/timer.h | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/instrumentation/events/lttng-module/timer.h b/instrumentation/events/lttng-module/timer.h +index d62fd25..59da988 100644 +--- a/instrumentation/events/lttng-module/timer.h ++++ b/instrumentation/events/lttng-module/timer.h +@@ -16,11 +16,11 @@ struct timer_list; + + #endif /* _TRACE_TIMER_DEF_ */ + +-#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) + #define lttng_ktime_get_tv64(kt) (kt) +-#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ ++#else /* #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ + #define lttng_ktime_get_tv64(kt) ((kt).tv64) +-#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,10,0)) */ ++#endif /* #else #if (LINUX_VERSION_CODE >= KERNEL_VERSION(4,9,0)) */ + + LTTNG_TRACEPOINT_EVENT_CLASS(timer_class, + +-- +2.7.4 + diff --git a/bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend b/bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend new file mode 100644 index 00000000..dc1c4a74 --- /dev/null +++ b/bsp/meta-intel/recipes-kernel/lttng/lttng-modules_%.bbappend @@ -0,0 +1,7 @@ +FILESEXTRAPATHS_prepend_intel-x86-common := "${THISDIR}/${PN}:" + + +LTTNG_PATCH = "${@bb.utils.contains_any('PREFERRED_PROVIDER_virtual/kernel','linux-intel linux-intel-rt','file://0002-lttng-modules-PKT-4.9-yocto-build-failed.patch','',d)}" + +SRC_URI_append_intel-x86-common = " ${LTTNG_PATCH}" + |