PDA

View Full Version : Can't compile driver



don_zz
19th September 2006, 06:42 PM
I have been trying to get an 802.11 card working on my AMD-64 system (running the 64 bit OS). There is no compiled driver available for it so I contacted the manufacturer.

I got a reply from the AirLink tech support people. They said that my card has the rt61 chipset and I should download the drivers from the chipset manufacturer's web site at:

http://www.ralinktech.com/supp-1.htm

Which I did (for my version of the Linux kernel). I then proceeded to try to build the code per the instructions in the README file but it won't build. When I do a "make -n", I get:

make -C /lib/modules/2.6.17-1.2174_FC5/build SUBDIRS=/downloads/RT61_Linux_STA_Drv1.0.4.0/Module modules

But I don't have a valid "build" program at the location above. What I have is a symbolic link that points to:

../../../usr/src/kernels/2.6.17-1.2174_FC5-x86_64

which does not exist on my machine (I do have an AMD-64 system). I suspect that this may be due to the fact that I have not installed the kernel development system but I don't know.

Can anyone tell me what I need to load to make the above work correctly?

Thanks,


Don

Thetargos
2nd October 2006, 03:22 AM
First make sure you have the kernel-devel package installed, I just downloaded this package to see if I could get it to build on my system, I it does. The Configure script is foo-bar, but issuing only make did work for me. This will generate an rt61.ko file which then can be installed into /lib/modules/`uname -r`/ (an elegant way to avoid writing the actual kernel release version, but should print your currently running kernel).

First make sure you have the kernel-devel package, then try to build with just make and then make install... You may require to also run `depmod -a` to add the module to the current modules list of your kernel, and you may have to edit /etc/modprobe.conf with something like alias wlan0 rt61 or something similar.

don_zz
2nd October 2006, 06:18 AM
Thetargos, thanks for the reply. Someone else already told me how to install the kernel development package which I did but I'm still having problems. I think my problem now is a 64-bit issue...

I'm running the x86-64 FC5 kernel but when I try to compile the driver code I get lots of warnings about pointer/integer conversions that are not legal. I recognize these as 64-bit conversion problems so I thought about compiling the code in 32 bit mode. However, I don't know if I can run a 32-bit driver in my 64-bit kernel... Can you tell me if that's OK to try?

If that is OK, how do I do it? I found the "-m32" flag to the compiler to get it to compile in 32-bit mode but how do I get that compiler option into the "build" script that is being invoked?

Thanks,


Don

Thetargos
2nd October 2006, 01:18 PM
No, you can't insert a 32-bit module into a 64-bit kernel (to the best of my knowledge, anyway). In my case, I also saw a lot of warnings, but the driver did compile, I'd say that you should give it a whirl if it did build for you.

don_zz
2nd October 2006, 04:04 PM
Thetargos, thanks for the reply... I was afraid of that. My driver did build but it doesn't run. I guess I'm out of luck for the time being unless I feel like debugging the driver code...


Don

Thetargos
3rd October 2006, 12:16 AM
The most striaght out solution for this problem of yours is sadly to run a 32-bit Fedora. For the time being, until the guys who developed the driver get around to such precision conversions, you're better off running the 32-bit version.

don_zz
3rd October 2006, 01:04 AM
I've thought about skipping the 64-bit OS for now and going with the 32-bit. I've had trouble with other drivers and plug-ins like Flash and Java. They all have trouble with the 64-bit OS.

Can I load the 32-bt OS without having to reinstall everything? Sort of like a dual boot, one for 32-bit and one for 64-bit.


Don

Thetargos
3rd October 2006, 03:23 AM
Yes you can "dual boot" 32 and 64-bit OSes, though you will have to have another "root" partition for the 32-bit OS. Seriously, though, your best bet is a clean install, then update and install your additional applications. Shouldn't take too long (depending on your network speed connection, of course)