[meta-intel] [PATCH 2/5] iwlwifi: Clean-up and use module_install

Saul Wold sgw at linux.intel.com
Thu Jul 27 14:56:49 PDT 2017


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 at linux.intel.com>
---
 common/recipes-kernel/iwlwifi/iwlwifi_git.bb | 50 +++++-----------------------
 1 file changed, 9 insertions(+), 41 deletions(-)

diff --git a/common/recipes-kernel/iwlwifi/iwlwifi_git.bb b/common/recipes-kernel/iwlwifi/iwlwifi_git.bb
index 2999af0..a88eabe 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"
 
 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"
@@ -29,41 +17,14 @@ 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
-
+MODULES_INSTALL_TARGET="install"
+do_install_append() {
 	## install configs and service scripts
 	install -d ${D}${sbindir} ${D}${sysconfdir}/modprobe.d
 	install -m 0644 ${WORKDIR}/iwlwifi.conf ${D}${sysconfdir}/modprobe.d
@@ -71,3 +32,10 @@ do_install() {
 	## this gets generated for no good reason. delete it.
 	rm -rf ${D}/usr
 }
+
+SYSTEMD_AUTO_ENABLE_${PN} = "enable"
+
+RDEPENDS_${PN} = "linux-firmware-iwlwifi"
+
+KERNEL_MODULE_AUTOLOAD_append_core2-32-intel-common = " iwlwifi"
+KERNEL_MODULE_AUTOLOAD_append_corei7-64-intel-common = " iwlwifi"
-- 
2.7.5



More information about the meta-intel mailing list