rt2500 wireless module build issue
Hi everyone, I've been trying to install the rt2500 wireless driver for my new linksys wireless card, but I've been having issues building the source. I've been using Debian on my desktop for 3 years, but I'm still kind of a noob when it comes to builds and modules. Here's some quick info:
Dell 600Mhz Pentium III Debian etch kernel 2.6.21 rt2500-source v. 1.1.0 module-assistant v. 0.10.11 and the wireless card: from hwinfo: 20: PCI 10.0: 0280 Network controller [Created at pci.296] UDI: /org/freedesktop/Hal/devices/pci_1814_301 Unique ID: 37TO.9t8cPPpjVB1 SysFS ID: /devices/pci0000:00/0000:00:10.0 SysFS BusID: 0000:00:10.0 Hardware Class: network Model: "Linksys RT2561/RT61 802.11g PCI" Vendor: pci 0x1814 "RaLink" Device: pci 0x0301 "RT2561/RT61 802.11g PCI" SubVendor: pci 0x1737 "Linksys" SubDevice: pci 0x0055 Memory Range: 0xf0008000-0xf000ffff (rw,non-prefetchable,disabled) IRQ: 9 (17806 events) Module Alias: "pci:v00001814d00000301sv00001737sd00000055bc02sc80i00" Config Status: cfg=new, avail=yes, need=no, active=unknown from lshw: *-network:1 UNCLAIMED description: Network controller product: RT2561/RT61 802.11g PCI vendor: RaLink physical id: 10 bus info: pci@0000:00:10.0 version: 00 width: 32 bits clock: 33MHz capabilities: pm bus_master cap_list configuration: latency=64 So I downloaded the rt2500-source package and installed it with dpkg -i /var/cache/apt/archives/rt2500-source_1.1.0+cvs20060620-3_all.deb. I unpacked the rt2500 tarball in /usr/src and read the debain documentation. Then, consistent with the documentation and other forum threads I did: module-assistant prepare module-assistant get rt2500 module-assistant auto-install rt2500 Then I started to get all sorts of build errors. Here's the output from the first build: rayden:/usr/src# m-a -t a-i rt2500 . Updated infos about 1 packages Getting source for kernel version: 2.6.21-2-686 Kernel headers available in /lib/modules/2.6.21-2-686/build apt-get install build-essential Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Done! unpack Extracting the package tarball, /usr/src/rt2500.tar.gz, please wait... "/usr/share/modass/overrides/rt2500-source" build KVERS=2.6.21-2-686 KSRC=/lib/modules/2.6.21-2-686/build KDREV=2.6.21-6 kdist_image touch config.mk \ && /usr/bin/make clean make[1]: Entering directory `/usr/src/modules/rt2500' make[1]: Leaving directory `/usr/src/modules/rt2500' dh_clean dh_clean: cannot read debian/control: No such file or directory make: [kdist_clean] Error 1 (ignored) /usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules make[1]: Entering directory `/usr/src/modules/rt2500' touch config.mk \ && /usr/bin/make clean make[2]: Entering directory `/usr/src/modules/rt2500' make[2]: Leaving directory `/usr/src/modules/rt2500' dh_clean dh_clean: cannot read debian/control: No such file or directory make[1]: [kdist_clean] Error 1 (ignored) for templ in ; do \ cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.21-2-686/g'` ; \ done for templ in `ls debian/*.modules.in` ; do \ test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \ sed -e 's/##KVERS##/2.6.21-2-686/g ;s/#KVERS#/2.6.21-2-686/g ; s/_KVERS_/2.6.21-2-686/g ; s/##KDREV##/2.6.21-6/g ; s/#KDREV#/2.6.21-6/g ; s/_KDREV_/2.6.21-6/g ' < $templ > ${templ%.modules.in}; \ done # Install module dh_installdirs lib/modules/2.6.21-2-686/kernel/drivers/net/wireless # Build modules /usr/bin/make KERNDIR=/lib/modules/2.6.21-2-686/build PATCHLEVEL=6 make[2]: Entering directory `/usr/src/modules/rt2500' make[3]: Entering directory `/usr/src/linux-headers-2.6.21-2-686' CC [M] /usr/src/modules/rt2500/rtmp_main.o In file included from /usr/src/modules/rt2500/rtmp_main.c:50: /usr/src/modules/rt2500/rt_config.h:58:40: error: linux/config.h: No such file or directory /usr/src/modules/rt2500/rtmp_main.c: In function ‘RT2500_open’: /usr/src/modules/rt2500/rtmp_main.c:272: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type /usr/src/modules/rt2500/rtmp_main.c: In function ‘rt2500_resume’: /usr/src/modules/rt2500/rtmp_main.c:878: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result make[4]: *** [/usr/src/modules/rt2500/rtmp_main.o] Error 1 make[3]: *** [_module_/usr/src/modules/rt2500] Error 2 make[3]: Leaving directory `/usr/src/linux-headers-2.6.21-2-686' rt2500.ko failed to build! make[2]: *** [module] Error 1 make[2]: Leaving directory `/usr/src/modules/rt2500' make[1]: *** [binary_modules] Error 2 make[1]: Leaving directory `/usr/src/modules/rt2500' make: *** [kdist_build] Error 2 BUILD FAILED! See /var/cache/modass/rt2500-source.buildlog.2.6.21-2-686.1191180721 for details. Build failed. Press Return to continue... The first error was in rt_config.h. It was trying to access linux/config.h, which doesn't exist in the new kernel versions. In the script, the line is: #include <linux/config.h> //can delete so I just commented it out and did module-assistant build again, but with the -o option so it didn't re-unpack the tarball. Now I get this output: rayden:/usr/src/modules/rt2500# m-a -o -t a-i rt2500 . Updated infos about 1 packages Getting source for kernel version: 2.6.21-2-686 Kernel headers available in /lib/modules/2.6.21-2-686/build apt-get install build-essential Reading package lists... Done Building dependency tree Reading state information... Done build-essential is already the newest version. 0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded. Done! "/usr/share/modass/overrides/rt2500-source" build KVERS=2.6.21-2-686 KSRC=/lib/modules/2.6.21-2-686/build KDREV=2.6.21-6 kdist_image touch config.mk \ && /usr/bin/make clean make[1]: Entering directory `/usr/src/modules/rt2500' make[1]: Leaving directory `/usr/src/modules/rt2500' dh_clean dh_clean: cannot read debian/control: No such file or directory make: [kdist_clean] Error 1 (ignored) /usr/bin/make -f debian/rules kdist_clean kdist_config binary-modules make[1]: Entering directory `/usr/src/modules/rt2500' touch config.mk \ && /usr/bin/make clean make[2]: Entering directory `/usr/src/modules/rt2500' make[2]: Leaving directory `/usr/src/modules/rt2500' dh_clean dh_clean: cannot read debian/control: No such file or directory make[1]: [kdist_clean] Error 1 (ignored) for templ in ; do \ cp $templ `echo $templ | sed -e 's/_KVERS_/2.6.21-2-686/g'` ; \ done for templ in `ls debian/*.modules.in` ; do \ test -e ${templ%.modules.in}.backup || cp ${templ%.modules.in} ${templ%.modules.in}.backup 2>/dev/null || true; \ sed -e 's/##KVERS##/2.6.21-2-686/g ;s/#KVERS#/2.6.21-2-686/g ; s/_KVERS_/2.6.21-2-686/g ; s/##KDREV##/2.6.21-6/g ; s/#KDREV#/2.6.21-6/g ; s/_KDREV_/2.6.21-6/g ' < $templ > ${templ%.modules.in}; \ done # Install module dh_installdirs lib/modules/2.6.21-2-686/kernel/drivers/net/wireless # Build modules /usr/bin/make KERNDIR=/lib/modules/2.6.21-2-686/build PATCHLEVEL=6 make[2]: Entering directory `/usr/src/modules/rt2500' make[3]: Entering directory `/usr/src/linux-headers-2.6.21-2-686' CC [M] /usr/src/modules/rt2500/rtmp_main.o /usr/src/modules/rt2500/rtmp_main.c: In function ‘RT2500_open’: /usr/src/modules/rt2500/rtmp_main.c:272: warning: passing argument 2 of ‘request_irq’ from incompatible pointer type /usr/src/modules/rt2500/rtmp_main.c: In function ‘rt2500_resume’: /usr/src/modules/rt2500/rtmp_main.c:878: warning: ignoring return value of ‘pci_enable_device’, declared with attribute warn_unused_result CC [M] /usr/src/modules/rt2500/mlme.o CC [M] /usr/src/modules/rt2500/connect.o CC [M] /usr/src/modules/rt2500/sync.o CC [M] /usr/src/modules/rt2500/assoc.o CC [M] /usr/src/modules/rt2500/auth.o CC [M] /usr/src/modules/rt2500/auth_rsp.o CC [M] /usr/src/modules/rt2500/rtmp_data.o CC [M] /usr/src/modules/rt2500/rtmp_init.o /usr/src/modules/rt2500/rtmp_init.c:959:62: error: macro "INIT_WORK" passed 3 arguments, but takes just 2 /usr/src/modules/rt2500/rtmp_init.c: In function ‘NICInitializeAdapter’: /usr/src/modules/rt2500/rtmp_init.c:959: error: ‘INIT_WORK’ undeclared (first use in this function) /usr/src/modules/rt2500/rtmp_init.c:959: error: (Each undeclared identifier is reported only once /usr/src/modules/rt2500/rtmp_init.c:959: error: for each function it appears in.) make[4]: *** [/usr/src/modules/rt2500/rtmp_init.o] Error 1 make[3]: *** [_module_/usr/src/modules/rt2500] Error 2 make[3]: Leaving directory `/usr/src/linux-headers-2.6.21-2-686' rt2500.ko failed to build! make[2]: *** [module] Error 1 make[2]: Leaving directory `/usr/src/modules/rt2500' make[1]: *** [binary_modules] Error 2 make[1]: Leaving directory `/usr/src/modules/rt2500' make: *** [kdist_build] Error 2 BUILD FAILED! See /var/cache/modass/rt2500-source.buildlog.2.6.21-2-686.1191181075 for details. Build failed. Press Return to continue... I don't know what this "error: macro "INIT_WORK" passed 3 arguments, but takes just 2" business is all about. Does anyone have any clue as to why this might be happening? It's frustrating that the package isn't working right out of the box; I'm running testing, and this is the latest version of rt2500-source. Help! -AP |
You're making a mountain out of a molehill.
# aptitude install rt2500 rt2500-source module-assistant build-essential linux-headers-$(uname -r) # m-a prepare # m-a a-i rt2500 modprobe -v rt2500 After that, you may need to find the GUI RT2500 configuration app under the Debian Menu to actually activate the card. |
That's exactly what I did, except I used apt instead of aptitude. Even using your method, which is really the same thing except it made me autoclean, I still got exactly the same result. I've read all the forum posts on this subject, and I know that this is how it's _supposed_ to work, but the errors speak for themselves. Anyone have any ideas on this "error: macro "INIT_WORK" passed 3 arguments, but takes just 2" weirdness? Googling it seems to suggest that it's a bug in the build script, and the only way to fix it is to fix it myself, and this seems to be confirmed by the fact that I had to comment out another obviously outdated line in the rt_config.h file (the one that references linux/config.h) just to get this far. I sincerely hope this is not the case, because rt2500 is a popular open source driver, and I have no knowledge of scripting, so I doubt I could fix it myself. I'm hoping I'm just having some noob issue with my compiler configuration or module shimsham. Anyone have any ideas?
-AP |
and what did the log file it referred you to say ?
Quote:
|
no more details in the log file, its just the same as the report I posted.
|
Hey all, it must have been a bug in the module or an outdated makefile. The new rt2500 package and module work fine. Interestingly though, I got it to work for a while before the new version came out by installing the rt61 module.
|
Quote:
Quote:
|
All times are GMT -5. The time now is 06:09 AM. |