summaryrefslogtreecommitdiff
path: root/recipes/wlags-modules/wlags-modules_718.inc
blob: 0bc20d1c41ff7263c6f4b5e789fbf9aaee60a6ba (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
DESCRIPTION = "A driver from Agera (a card manufacturer) for wireless LAN cards based on Hermes cards."
HOMEPAGE = "http://www.agere.com/mobility/wireless_lan_drivers.html"
SECTION = "kernel/modules"
PRIORITY = "optional"
DEPENDS = "virtual/kernel"
LICENSE = "BSD"
PR = "r1"

TARFILE = "wl_lkm_${PV}_release.tar.gz"


#
# The original wlags tar file is a bit messy:
# * it doesn't contain it's own subdirectory
# * the files are formatted for Windows/DOS (with CR/LF)
# * they assume that the pcmcia-cs source code is there
# * they don't use the kernel makefile approach
#
# Because of this, I create the IPK in a little unusual way:
# * I "flatten" the structure to be able to use the kernel makefile concept
# * the patches I have are for the flattened structure
# * then I do the usual compile/install/package dance
#

SRC_URI = "ftp://ftp.elmeg.de/artem/ClientCards/11b/linux/${TARFILE} \
	file://Makefile \
	file://includes.patch;apply=no \
	file://kernel-pcmcia.patch;apply=no \
	file://bugs.patch;apply=no \
	file://fixes.patch;apply=no \
	file://wlags_h${COMPILE_HERMES}.conf"
S = "${WORKDIR}/${PN}"

do_configure() {
	cp ../{hcf,firmware,include/hcf,include/wireless}/*.h .
	cp ../{hcf,firmware,wireless}/*.c .
	cp ../etc/wlags49.conf .
	perl -pi -e 'r:\r::g' *.h *.c

	patch -p1 <${WORKDIR}/includes.patch
	patch -p1 <${WORKDIR}/kernel-pcmcia.patch
	patch -p1 <${WORKDIR}/bugs.patch
	patch -p1 <${WORKDIR}/fixes.patch
	cp ${WORKDIR}/Makefile .
}


do_compile() {
	unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
	make -C ${STAGING_KERNEL_DIR} \
		modules \
		SUBDIRS="${S}" \
		CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
		COMPILE_HERMES=${COMPILE_HERMES}
}


do_install() {
        install -d ${D}${sysconfdir}/pcmcia
        install -m 0644 ${WORKDIR}/wlags_h${COMPILE_HERMES}.conf ${D}${sysconfdir}/pcmcia/

        install -d ${D}${base_libdir}/modules/${KERNEL_VERSION}/net/wireless
	ls
        install -m 0644 wlags49_h${COMPILE_HERMES}_cs${KERNEL_OBJECT_SUFFIX} ${D}${base_libdir}/modules/${KERNEL_VERSION}/net/wireless
}

FILES = "/lib/modules/${KERNEL_VERSION}/net/wireless/*${KERNEL_OBJECT_SUFFIX} /${sysconfdir}"