05754fee8d592554524ea3afce20a03b51967680
[openpandora.oe.git] / recipes / pandora-system / wl1251-modules.bb
1 DESCRIPTION = "Kernel drivers for the TI WL1251 WiFi chip found on the Pandora - Connected via SDIO"
2 LICENSE = "GPLv2"
3
4 SRCREV = "aad4586f9b61efc92725b5ebd233c67505d631df"
5
6 SRC_URI = " \
7            git://git.openpandora.org/pandora-wifi.git;protocol=git;branch=compat-wireless \
8 "
9
10 SRC_URI += " \
11         file://rc.wl1251 \
12         file://50-compat_firmware.rules \
13         file://compat_firmware.sh \
14 "
15
16 RDEPENDS = "udev"
17
18 inherit update-rc.d
19
20 INITSCRIPT_NAME = "wl1251-init"
21 INITSCRIPT_PARAMS = "start 30 5 2 . stop 40 0 1 6 ."
22
23 S = "${WORKDIR}/git"
24
25 inherit module
26
27 PARALLEL_MAKE = ""
28
29 EXTRA_OEMAKE = " \
30           'KLIB=${STAGING_KERNEL_DIR}' \
31           'KLIB_BUILD=${STAGING_KERNEL_DIR}' \
32           "
33           
34 do_compile_prepend() {
35           cd ${S}
36           chmod +x ${S}/scripts/*
37 }
38
39 do_install() {
40           install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/compat
41           install -m 0644 ${S}/compat/*.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/compat
42           install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/net/mac80211
43           install -m 0644 ${S}/net/mac80211/*.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/net/mac80211
44           install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/net/wireless
45           install -m 0644 ${S}/net/wireless/*.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/net/wireless
46           install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/net/rfkill
47           install -m 0644 ${S}/net/rfkill/*.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/net/rfkill
48           install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/drivers/net/wireless/wl12xx      
49           install -m 0644 ${S}/drivers/net/wireless/wl12xx/wl1251.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/drivers/net/wireless/wl12xx
50           install -m 0644 ${S}/drivers/net/wireless/wl12xx/wl1251_sdio.ko ${D}${base_libdir}/modules/${KERNEL_VERSION}/updates/kernel/drivers/net/wireless/wl12xx
51           
52           install -d ${D}${sysconfdir}/init.d/
53           install -m 0755 ${WORKDIR}/rc.wl1251 ${D}${sysconfdir}/init.d/wl1251-init
54
55           # Install UDEV rules to /lib/udev/rules.d not /etc/udev/rules.d as they are system rules.
56           install -d ${D}${base_libdir}/udev/rules.d/
57           install -m 0644 ${WORKDIR}/50-compat_firmware.rules ${D}${base_libdir}/udev/rules.d/
58           install -m 0755 ${WORKDIR}/compat_firmware.sh ${D}${base_libdir}/udev/rules.d/          
59 }
60
61 FILES_${PN} += "/lib/udev/rules.d/*"
62 FILES_${PN} += "/lib/modules/${KERNEL_VERSION}/updates/compat/*.ko.*"
63 FILES_${PN} += "/lib/modules/${KERNEL_VERSION}/updates/kernel/net/mac80211/*.ko.*"
64 FILES_${PN} += "/lib/modules/${KERNEL_VERSION}/updates/kernel/net/wireless/*.ko.*"
65 FILES_${PN} += "/lib/modules/${KERNEL_VERSION}/updates/kernel/net/rfkill/*.ko.*"
66 FILES_${PN} += "/lib/modules/${KERNEL_VERSION}/updates/kernel/drivers/net/wireless/wl12xx/*.ko.*"