summaryrefslogtreecommitdiffstats
path: root/common/recipes-kernel/iwlwifi/iwlwifi_git.bb
blob: 2999af029f76ae3d5edf29537902ca344c5d4a7e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
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
}