From d0ba6fc045dffda5aa1e6e015b926615febfbf9f Mon Sep 17 00:00:00 2001 From: Saul Wold Date: Tue, 25 Jul 2017 13:52:47 -0700 Subject: linux-intel: refactor and remove iwlwifi modules for out of tree enablement Create a linux-intel.inc that is shared between standard and rt kernel for the common bits. By removing these modules here, we can then build and install the out of tree modules from the backport-iwlwifi tree. Move the Autoloading to the kernel module also Signed-off-by: Saul Wold --- common/recipes-kernel/linux/linux-intel-rt_4.9.bb | 27 +--------------- common/recipes-kernel/linux/linux-intel.inc | 39 +++++++++++++++++++++++ common/recipes-kernel/linux/linux-intel_4.9.bb | 33 +------------------ 3 files changed, 41 insertions(+), 58 deletions(-) create mode 100644 common/recipes-kernel/linux/linux-intel.inc (limited to 'common/recipes-kernel') diff --git a/common/recipes-kernel/linux/linux-intel-rt_4.9.bb b/common/recipes-kernel/linux/linux-intel-rt_4.9.bb index 55015941..f34c6f54 100644 --- a/common/recipes-kernel/linux/linux-intel-rt_4.9.bb +++ b/common/recipes-kernel/linux/linux-intel-rt_4.9.bb @@ -1,5 +1,5 @@ -require recipes-kernel/linux/linux-yocto.inc +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 @@ -14,29 +14,4 @@ KBRANCH = "base-rt" SRCREV_machine ?= "cd65d037683c92be2c7dedc846f4bfd9ef84ecf4" SRCREV_meta ?= "299f12a06ca1d6fd90b24450dae3b9f257a536be" -SRC_URI = "git://github.com/01org/linux-intel-4.9.git;protocol=https;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.9.30" -LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}" - - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - LINUX_KERNEL_TYPE = "preempt-rt" -KERNEL_FEATURES_INTEL_COMMON ?= "" - -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}" - -COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" -KMACHINE_i586-nlp-32-intel-common = "intel-quark" -KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" diff --git a/common/recipes-kernel/linux/linux-intel.inc b/common/recipes-kernel/linux/linux-intel.inc new file mode 100644 index 00000000..f3fbd59a --- /dev/null +++ b/common/recipes-kernel/linux/linux-intel.inc @@ -0,0 +1,39 @@ +require recipes-kernel/linux/linux-yocto.inc + +SRC_URI = "git://github.com/01org/linux-intel-4.9.git;protocol=https;name=machine;branch=${KBRANCH}; \ + git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" + + +LINUX_VERSION ?= "4.9.30" +LINUX_VERSION_EXTENSION ?= "-intel-pk-${LINUX_KERNEL_TYPE}" + +PV = "${LINUX_VERSION}+git${SRCPV}" + +KMETA = "kernel-meta" +KCONF_BSP_AUDIT_LEVEL = "2" + +KERNEL_FEATURES_INTEL_COMMON ?= "" + +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}" + +COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" +KMACHINE_i586-nlp-32-intel-common = "intel-quark" +KERNEL_FEATURES_append_i586-nlp-32-intel-common = "features/qat/qat.scc" + +# Functionality flags +KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" +KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" + +do_compile_kernelmodules_append() { + rm -rf ${B}/drivers/net/wireless/intel/iwlwifi + rm -rf ${B}/net/mac80211 + rm -rf ${B}/net/wireless +} + +RDEPENDS_kernel-modules += "iwlwifi" diff --git a/common/recipes-kernel/linux/linux-intel_4.9.bb b/common/recipes-kernel/linux/linux-intel_4.9.bb index 51506555..9e017aaa 100644 --- a/common/recipes-kernel/linux/linux-intel_4.9.bb +++ b/common/recipes-kernel/linux/linux-intel_4.9.bb @@ -1,44 +1,13 @@ -require recipes-kernel/linux/linux-yocto.inc +require linux-intel.inc KBRANCH = "base" SRCREV_machine ?= "22a3e397584619839ec645c7378dc40bdd5ad2d1" SRCREV_meta ?= "299f12a06ca1d6fd90b24450dae3b9f257a536be" -SRC_URI = "git://github.com/01org/linux-intel-4.9.git;protocol=https;name=machine;branch=${KBRANCH}; \ - git://git.yoctoproject.org/yocto-kernel-cache;type=kmeta;name=meta;branch=yocto-4.9;destsuffix=${KMETA}" - -LINUX_VERSION ?= "4.9.30" -LINUX_VERSION_EXTENSION = "-intel-pk-${LINUX_KERNEL_TYPE}" - -PV = "${LINUX_VERSION}+git${SRCPV}" - -KMETA = "kernel-meta" -KCONF_BSP_AUDIT_LEVEL = "2" - -KERNEL_FEATURES_INTEL_COMMON ?= "" - -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}" - -COMPATIBLE_MACHINE_i586-nlp-32-intel-common = "${MACHINE}" -KMACHINE_i586-nlp-32-intel-common = "intel-quark" -KERNEL_FEATURES_append_i586-nlp-32-intel-common = "" - # 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" - # Functionality flags KERNEL_EXTRA_FEATURES ?= "features/netfilter/netfilter.scc" -KERNEL_FEATURES_append = " ${KERNEL_EXTRA_FEATURES}" -KERNEL_FEATURES_append = " ${@bb.utils.contains("TUNE_FEATURES", "mx32", " cfg/x32.scc", "" ,d)}" -- cgit v1.2.3-54-g00ecf