diff options
Diffstat (limited to 'common')
-rw-r--r-- | common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf | 12 | ||||
-rw-r--r-- | common/recipes-kernel/iwlwifi/iwlwifi_git.bb | 73 |
2 files changed, 85 insertions, 0 deletions
diff --git a/common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf b/common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf new file mode 100644 index 00000000..a0e5f6ff --- /dev/null +++ b/common/recipes-kernel/iwlwifi/iwlwifi/iwlwifi.conf | |||
@@ -0,0 +1,12 @@ | |||
1 | # /etc/modprobe.d/iwlwifi.conf | ||
2 | # iwlwifi will dynamically load either iwldvm or iwlmvm depending on the | ||
3 | # microcode file installed on the system. When removing iwlwifi, first | ||
4 | # remove the iwl?vm module and then iwlwifi. | ||
5 | remove iwlwifi (/sbin/lsmod | grep -o -e ^iwlmvm -e ^iwldvm16 -e ^iwldvm -e ^iwlwifi | xargs /sbin/rmmod) && /sbin/modprobe -r mac80211 | ||
6 | |||
7 | #options iwlwifi lar_disable=1 | ||
8 | #options iwlwifi nvm_file="nvm-sfp-b2-open.bin" | ||
9 | options iwlmvm power_scheme=1 | ||
10 | |||
11 | # PCI BUS | ||
12 | |||
diff --git a/common/recipes-kernel/iwlwifi/iwlwifi_git.bb b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb new file mode 100644 index 00000000..2999af02 --- /dev/null +++ b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb | |||
@@ -0,0 +1,73 @@ | |||
1 | SUMMARY = "Intel Wireless LinuxCore 24 kernel driver" | ||
2 | DESCRIPTION = "Intel Wireless LinuxCore 24 kernel driver" | ||
3 | SECTION = "kernel" | ||
4 | LICENSE = "GPLv2" | ||
5 | |||
6 | REQUIRED_DISTRO_FEATURES = "wifi" | ||
7 | |||
8 | LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | ||
9 | |||
10 | inherit module | ||
11 | |||
12 | PROVIDES = "kernel-module-cfg80211-${KERNEL_VERSION} \ | ||
13 | kernel-module-mac80211-${KERNEL_VERSION} \ | ||
14 | kernel-module-iwlmvm-${KERNEL_VERSION} \ | ||
15 | kernel-module-iwlwifi-${KERNEL_VERSION} \ | ||
16 | kernel-module-compat-${KERNEL_VERSION}" | ||
17 | |||
18 | RPROVIDES_${PN} = "kernel-module-cfg80211-${KERNEL_VERSION} \ | ||
19 | kernel-module-mac80211-${KERNEL_VERSION} \ | ||
20 | kernel-module-iwlmvm-${KERNEL_VERSION} \ | ||
21 | kernel-module-iwlwifi-${KERNEL_VERSION} \ | ||
22 | kernel-module-compat-${KERNEL_VERSION}" | ||
23 | |||
24 | PV = "30" | ||
25 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}" | ||
26 | SRC_URI += "file://iwlwifi.conf" | ||
27 | |||
28 | SRCREV = "${AUTOREV}" | ||
29 | |||
30 | S = "${WORKDIR}/git" | ||
31 | |||
32 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | ||
33 | |||
34 | CONFFILES_${PN} += "${sysconfdir}/modprobe.d/iwlwifi.conf" | ||
35 | |||
36 | PACKAGES = "${PN}" | ||
37 | |||
38 | RDEPENDS_${PN}="linux-firmware-iwlwifi-8000c" | ||
39 | |||
40 | DEPENDS="virtual/kernel" | ||
41 | KERNVER="${KERNEL_VERSION}" | ||
42 | |||
43 | ## modules actual | ||
44 | FILES_${PN} = "/lib/modules/${KERNVER}/updates/cfg80211.ko \ | ||
45 | /lib/modules/${KERNVER}/updates/compat.ko \ | ||
46 | /lib/modules/${KERNVER}/updates/iwlwifi.ko \ | ||
47 | /lib/modules/${KERNVER}/updates/iwlmvm.ko \ | ||
48 | /lib/modules/${KERNVER}/updates/mac80211.ko \ | ||
49 | ${sysconfdir}/modprobe.d/iwlwifi.conf" | ||
50 | |||
51 | EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}" | ||
52 | |||
53 | do_configure() { | ||
54 | CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} | ||
55 | } | ||
56 | |||
57 | do_install() { | ||
58 | ## install kernel objects from driver tree into target fs | ||
59 | install -m 0755 -d ${D}${base_libdir}/modules/${KERNVER}/updates/ | ||
60 | |||
61 | install -m 0644 $(find ${S} -name "iwlwifi.ko") ${D}${base_libdir}/modules/${KERNVER}/updates | ||
62 | install -m 0644 $(find ${S} -name "iwlmvm.ko") ${D}${base_libdir}/modules/${KERNVER}/updates | ||
63 | install -m 0644 $(find ${S} -name "cfg80211.ko") ${D}${base_libdir}/modules/${KERNVER}/updates | ||
64 | install -m 0644 $(find ${S} -name "mac80211.ko") ${D}${base_libdir}/modules/${KERNVER}/updates | ||
65 | install -m 0644 $(find ${S} -name "compat.ko") ${D}${base_libdir}/modules/${KERNVER}/updates | ||
66 | |||
67 | ## install configs and service scripts | ||
68 | install -d ${D}${sbindir} ${D}${sysconfdir}/modprobe.d | ||
69 | install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d | ||
70 | |||
71 | ## this gets generated for no good reason. delete it. | ||
72 | rm -rf ${D}/usr | ||
73 | } | ||