From: Priyalee Kushwaha <priyalee.kushw...@intel.com>

iwlwifi driver is built as OOT driver and replaces driver
built in kernel.

Signed-off-by: Kushwaha, Priyalee <priyalee.kushw...@intel.com>
Signed-off-by: Saul Wold <s...@linux.intel.com>
---
 common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf | 12 ++++
 common/recipes-kernel/iwlwifi/iwlwifi_git.bb       | 73 ++++++++++++++++++++++
 2 files changed, 85 insertions(+)
 create mode 100644 common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf
 create mode 100644 common/recipes-kernel/iwlwifi/iwlwifi_git.bb

diff --git a/common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf 
b/common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf
new file mode 100644
index 0000000..a0e5f6f
--- /dev/null
+++ b/common/recipes-kernel/iwlwifi/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/common/recipes-kernel/iwlwifi/iwlwifi_git.bb 
b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb
new file mode 100644
index 0000000..2999af0
--- /dev/null
+++ b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb
@@ -0,0 +1,73 @@
+SUMMARY = "Intel Wireless LinuxCore 24 kernel driver"
+DESCRIPTION = "Intel Wireless LinuxCore 24 kernel driver"
+SECTION = "kernel"
+LICENSE = "GPLv2"
+
+REQUIRED_DISTRO_FEATURES = "wifi"
+
+LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7"
+
+inherit module
+
+PROVIDES = "kernel-module-cfg80211-${KERNEL_VERSION} \
+            kernel-module-mac80211-${KERNEL_VERSION} \
+            kernel-module-iwlmvm-${KERNEL_VERSION}   \
+            kernel-module-iwlwifi-${KERNEL_VERSION}  \
+            kernel-module-compat-${KERNEL_VERSION}"
+
+RPROVIDES_${PN} = "kernel-module-cfg80211-${KERNEL_VERSION} \
+                   kernel-module-mac80211-${KERNEL_VERSION} \
+                   kernel-module-iwlmvm-${KERNEL_VERSION}   \
+                   kernel-module-iwlwifi-${KERNEL_VERSION}  \
+                   kernel-module-compat-${KERNEL_VERSION}"
+
+PV = "30"
+SRC_URI = 
"git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}"
+SRC_URI += "file://iwlwifi.conf"
+
+SRCREV = "${AUTOREV}"
+
+S = "${WORKDIR}/git"
+
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+CONFFILES_${PN} += "${sysconfdir}/modprobe.d/iwlwifi.conf"
+
+PACKAGES = "${PN}"
+
+RDEPENDS_${PN}="linux-firmware-iwlwifi-8000c"
+
+DEPENDS="virtual/kernel"
+KERNVER="${KERNEL_VERSION}"
+
+## modules actual
+FILES_${PN} = "/lib/modules/${KERNVER}/updates/cfg80211.ko \
+               /lib/modules/${KERNVER}/updates/compat.ko \
+               /lib/modules/${KERNVER}/updates/iwlwifi.ko \
+               /lib/modules/${KERNVER}/updates/iwlmvm.ko \
+               /lib/modules/${KERNVER}/updates/mac80211.ko \
+               ${sysconfdir}/modprobe.d/iwlwifi.conf"
+
+EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}"
+
+do_configure() {
+       CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public 
KLIB_BUILD=${KBUILD_OUTPUT}
+}
+
+do_install() {
+       ## install kernel objects from driver tree into target fs
+       install -m 0755 -d ${D}${base_libdir}/modules/${KERNVER}/updates/
+
+       install -m 0644 $(find ${S} -name "iwlwifi.ko")  
${D}${base_libdir}/modules/${KERNVER}/updates
+       install -m 0644 $(find ${S} -name "iwlmvm.ko")   
${D}${base_libdir}/modules/${KERNVER}/updates
+       install -m 0644 $(find ${S} -name "cfg80211.ko") 
${D}${base_libdir}/modules/${KERNVER}/updates
+       install -m 0644 $(find ${S} -name "mac80211.ko") 
${D}${base_libdir}/modules/${KERNVER}/updates
+       install -m 0644 $(find ${S} -name "compat.ko")   
${D}${base_libdir}/modules/${KERNVER}/updates
+
+       ## install configs and service scripts
+       install -d ${D}${sbindir} ${D}${sysconfdir}/modprobe.d
+       install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d
+
+       ## this gets generated for no good reason. delete it.
+       rm -rf ${D}/usr
+}
-- 
2.7.5

-- 
_______________________________________________
meta-intel mailing list
meta-intel@yoctoproject.org
https://lists.yoctoproject.org/listinfo/meta-intel

Reply via email to