Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] compiling rt2870 drivers fails
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Mon May 30, 2011 8:57 pm    Post subject: [SOLVED] compiling rt2870 drivers fails Reply with quote

everything goes fine until at the file "sta_ioctl.c":

Code:
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c: In function 'rt_ioctl_siwencode':
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:1479: warning: suggest parentheses around operand of '!' or change '&' to '&&' or '!' to '~'
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c: At top level:
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2986: error: unknown field 'private' specified in initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2986: warning: initialization from incompatible pointer type
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2987: error: unknown field 'num_private' specified in initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2987: warning: excess elements in struct initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2987: warning: (near initialization for 'rt28xx_iw_handler_def')
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2988: error: unknown field 'private_args' specified in initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2988: warning: excess elements in struct initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2988: warning: (near initialization for 'rt28xx_iw_handler_def')
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2989: error: unknown field 'num_private_args' specified in initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2989: warning: excess elements in struct initializer
/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.c:2989: warning: (near initialization for 'rt28xx_iw_handler_def')
make[2]: *** [/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/sta_ioctl.o] Error 1
make[1]: *** [_module_/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
make: *** [LINUX] Error 2


some interesting stuff from dmesg:
Code:

[  355.462590] rt2870sta: version magic '2.6.32-5-686 SMP mod_unload modversions 686 ' should be '2.6.37 SMP mod_unload PENTIUM4 '
[  359.008904] rt3070sta: version magic '2.6.33.4-smp SMP mod_unload 686 ' should be '2.6.37 SMP mod_unload PENTIUM4 '


Kernel is 2.6.37-gentoo-r4

all help appreciated.


Last edited by tjekke dine lommer on Tue May 31, 2011 8:01 pm; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54232
Location: 56N 3W

PostPosted: Mon May 30, 2011 9:18 pm    Post subject: Reply with quote

tjekke dine lommer,

Code:
[  355.462590] rt2870sta: version magic '2.6.32-5-686 SMP mod_unload modversions 686 ' should be '2.6.37 SMP mod_unload PENTIUM4 '
[  359.008904] rt3070sta: version magic '2.6.33.4-smp SMP mod_unload 686 ' should be '2.6.37 SMP mod_unload PENTIUM4 '


You appear to have several binary versions of rt2870sta made for different kernela and different CPUs than your current kernel and selected CPU options.

Rebuild and reinstall your kernel and modules starting with a make clean. Until you get rid of the version magic issues, none of the other error messages will be useful.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Mon May 30, 2011 9:18 pm    Post subject: Reply with quote

Don't use the driver from Ralink. Use the in-kernel rt2800pci/rt2800usb driver instead. You need to install firmware, e.g. through the linux-firmware package. For RT3070 or newer, kernel 2.6.38 is recommended.
Back to top
View user's profile Send private message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Mon May 30, 2011 9:21 pm    Post subject: Reply with quote

chithanh wrote:
Don't use the driver from Ralink. Use the in-kernel rt2800pci/rt2800usb driver instead. You need to install firmware, e.g. through the linux-firmware package. For RT3070 or newer, kernel 2.6.38 is recommended.


that was my initial plan, but I put rt2870.bin in /lib/firmware and there is still no interface for my adapter.
Back to top
View user's profile Send private message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Mon May 30, 2011 9:24 pm    Post subject: Reply with quote

NeddySeagoon wrote:

You appear to have several binary versions of rt2870sta made for different kernela .


if binary versions of rt2870sta are modules then I do not have any.
Back to top
View user's profile Send private message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Tue May 31, 2011 8:27 am    Post subject: Reply with quote

Now I tried using a kernel that is a bit different. Result: there's nothing in dmesg and the error output in the compilation process is the same.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue May 31, 2011 8:31 am    Post subject: Reply with quote

I don't think you will have any success with out-of-tree rt2870sta build and a recent kernel.
Back to top
View user's profile Send private message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Tue May 31, 2011 9:44 am    Post subject: Reply with quote

chithanh wrote:
I don't think you will have any success with out-of-tree rt2870sta build and a recent kernel.


I'm still a nub at this stuff so could you tell me where can I get an in in-the-tree build (if such a thing exists) or what should I do to make this work?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue May 31, 2011 10:46 am    Post subject: Reply with quote

You need to use the in-kernel rt2800pci or rt2800usb driver. The kernel must be recent enough (2.6.37 supports only older devices), and the firmware must be installed.
Back to top
View user's profile Send private message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Tue May 31, 2011 11:37 am    Post subject: Reply with quote

chithanh wrote:
You need to use the in-kernel rt2800pci or rt2800usb driver. The kernel must be recent enough (2.6.37 supports only older devices), and the firmware must be installed.

okay, the firmware is in /lib/firmware (that should mean installed, correct?). how do I go about 'using' the in-kernel driver? how do I 'use' it?
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue May 31, 2011 11:41 am    Post subject: Reply with quote

You go to kernel menuconfig and enable the option for the driver.

If it is a PCI device, on next reboot you can run "lspci -k" to see if the driver is actually used.
Back to top
View user's profile Send private message
tjekke dine lommer
n00b
n00b


Joined: 28 May 2011
Posts: 20

PostPosted: Tue May 31, 2011 2:02 pm    Post subject: Reply with quote

where exactly in menuconfig can I find it? I went through networks->wireless & device drivers and did not find it.
Back to top
View user's profile Send private message
s4e8
Guru
Guru


Joined: 29 Jul 2006
Posts: 311

PostPosted: Tue May 31, 2011 2:23 pm    Post subject: Reply with quote

The in-kernel staging ralink drivers removed completely in 3.0-rc1, and replaced by a new one.
Both 2.6.39 and 3.0-rc1 ralink driver work fine here, but 3.0-rc1 seems cleanly, and NON-staging.
Back to top
View user's profile Send private message
chithanh
Developer
Developer


Joined: 05 Aug 2006
Posts: 2158
Location: Berlin, Germany

PostPosted: Tue May 31, 2011 2:33 pm    Post subject: Reply with quote

While in menuconfig, you can press / to search for RT2800
It will show you the location and any dependency that you need to enable first, before that option is shown.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum