diff options
author | Saul Wold <sgw@linux.intel.com> | 2017-07-25 13:59:05 -0700 |
---|---|---|
committer | Saul Wold <sgw@linux.intel.com> | 2017-07-31 09:00:58 -0700 |
commit | 867a8df51ed5abed44332e2edea72ad900b1dc4d (patch) | |
tree | af186352e07975ccfb9188fd21435d68aeecfb2a /common | |
parent | 1811a41d6f891784b2a5b65d60626add51f3d13e (diff) | |
download | meta-intel-867a8df51ed5abed44332e2edea72ad900b1dc4d.tar.gz |
iwlwifi: Clean-up and use module_install
Use the MODULES_INSTALL_TARGET to correctly set the make target for install,
also use AUTOLOAD for ensuring the modules get loaded correctly.
Let the module class to the correct packaging and install.
Install all the linux-firmware-iwlwifi blobs
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'common')
-rw-r--r-- | common/recipes-kernel/iwlwifi/iwlwifi_git.bb | 50 |
1 files changed, 9 insertions, 41 deletions
diff --git a/common/recipes-kernel/iwlwifi/iwlwifi_git.bb b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb index 2999af02..a88eabe7 100644 --- a/common/recipes-kernel/iwlwifi/iwlwifi_git.bb +++ b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb | |||
@@ -9,18 +9,6 @@ LIC_FILES_CHKSUM = "file://${S}/COPYING;md5=d7810fab7487fb0aad327b76f1be7cd7" | |||
9 | 9 | ||
10 | inherit module | 10 | inherit module |
11 | 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" | 12 | PV = "30" |
25 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}" | 13 | SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/iwlwifi/backport-iwlwifi;branch=release/LinuxCore${PV}" |
26 | SRC_URI += "file://iwlwifi.conf" | 14 | SRC_URI += "file://iwlwifi.conf" |
@@ -29,41 +17,14 @@ SRCREV = "${AUTOREV}" | |||
29 | 17 | ||
30 | S = "${WORKDIR}/git" | 18 | S = "${WORKDIR}/git" |
31 | 19 | ||
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}" | 20 | EXTRA_OEMAKE = "INSTALL_MOD_PATH=${D} KLIB_BUILD=${KBUILD_OUTPUT}" |
52 | 21 | ||
53 | do_configure() { | 22 | do_configure() { |
54 | CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} | 23 | CC=gcc CFLAGS= LDFLAGS= make defconfig-iwlwifi-public KLIB_BUILD=${KBUILD_OUTPUT} |
55 | } | 24 | } |
56 | 25 | ||
57 | do_install() { | 26 | MODULES_INSTALL_TARGET="install" |
58 | ## install kernel objects from driver tree into target fs | 27 | do_install_append() { |
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 | 28 | ## install configs and service scripts |
68 | install -d ${D}${sbindir} ${D}${sysconfdir}/modprobe.d | 29 | install -d ${D}${sbindir} ${D}${sysconfdir}/modprobe.d |
69 | install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d | 30 | install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d |
@@ -71,3 +32,10 @@ do_install() { | |||
71 | ## this gets generated for no good reason. delete it. | 32 | ## this gets generated for no good reason. delete it. |
72 | rm -rf ${D}/usr | 33 | rm -rf ${D}/usr |
73 | } | 34 | } |
35 | |||
36 | SYSTEMD_AUTO_ENABLE_${PN} = "enable" | ||
37 | |||
38 | RDEPENDS_${PN} = "linux-firmware-iwlwifi" | ||
39 | |||
40 | KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi" | ||
41 | KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi" | ||