WelcomeWelcome | FAQFAQ | DownloadsDownloads | WikiWiki

Author Topic: Need Help compiling module  (Read 4091 times)

Offline mwhit95

  • Newbie
  • *
  • Posts: 16
Need Help compiling module
« on: December 12, 2009, 11:53:09 AM »
I downloaded source to build a module for my Ralink wireless card.  I read the readme file and it said  to rename the makefile.  Next I ran make all but got an error about CFLAGS should be EXTRA_CFLAGS so I fixed that in the makefile.  I run make all again and this is what I got:

Quote
root@box:/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module# make all
make -C /lib/modules/2.6.29.1-tinycore/build SUBDIRS=/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module modules
make[1]: Entering directory `/usr/local/src/linux-headers-2.6.29.1'
  CC [M]  /tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.o
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'rt61_get_drvinfo':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:78: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:78: warning: unused variable 'pAd'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'rt61_get_regs_len':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:97: warning: no return statement in function returning non-void
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'rt61_get_regs':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:103: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:104: warning: unused variable 'counter'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:103: warning: unused variable 'pAd'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'rt61_ethtool_get_link':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:120: warning: unused variable 'pAd'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:130: warning: no return statement in function returning non-void
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'rt61_get_eeprom_len':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:139: warning: no return statement in function returning non-void
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'rt61_get_eeprom':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:145: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:146: warning: unused variable 'counter'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:145: warning: unused variable 'pAd'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:159: warning: no return statement in function returning non-void
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: At top level:
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:169: warning: initialization from incompatible pointer type
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RT61_probe':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:238: warning: assignment discards qualifiers from pointer target type
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:287: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:290: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:290: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:290: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:290: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:294: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:344: warning: ISO C90 forbids mixed declarations and code
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RT61_open':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:422: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:472: warning: passing argument 2 of 'request_irq' from incompatible pointer type
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RTMPSendPackets':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:627: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RTMPIsr':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:713: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RT61_get_wireless_stats':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:825: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RT61_get_ether_stats':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:873: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RT61_close':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:942: error: 'struct net_device' has no member named 'priv'
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c: In function 'RT61_remove_one':
/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.c:1002: error: 'struct net_device' has no member named 'priv'
make[2]: *** [/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module/rtmp_main.o] Error 1
make[1]: *** [_module_/tmp/2009_0123_RT61_Linux_STA_v1.1.2.3/Module] Error 2
make[1]: Leaving directory `/usr/local/src/linux-headers-2.6.29.1'
make: *** [all] Error 2

Is there another extension needed?

Thanks

[^thehatsrule^: quoted results]
« Last Edit: December 12, 2009, 02:43:34 PM by ^thehatsrule^ »

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825

Offline MikeLockmoore

  • Hero Member
  • *****
  • Posts: 525
  • Good software needn't be big!
Re: Need Help compiling module
« Reply #2 on: December 12, 2009, 07:56:43 PM »
Do you have 'linux-headers-2.6.29.1-tinycore.tcz' installed/mounted?  I need that when I build for my TI ACX-based WiFi adapter or the ralink chipset in the ASUS EeePC.
--
Mike L.

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Need Help compiling module
« Reply #3 on: December 13, 2009, 01:13:08 AM »
Do you have 'linux-headers-2.6.29.1-tinycore.tcz' installed/mounted?  I need that when I build for my TI ACX-based WiFi adapter or the ralink chipset in the ASUS EeePC.
--
Mike L.

no the problem is after some kernel things changed so a patch is needed
changing net_dev->priv to netdev_priv(dev) is one of them

Offline mwhit95

  • Newbie
  • *
  • Posts: 16
Re: Need Help compiling module
« Reply #4 on: December 13, 2009, 08:34:33 AM »
I did have the kernel header files mounted.  From reading the link by Arsian, it sounds like the source code was wrote for older kernels.  Maybe I need to search ralink's web page  for something newer.  Thanks for the help. 

Mike

Offline Arslan S.

  • Hero Member
  • *****
  • Posts: 825
Re: Need Help compiling module
« Reply #5 on: December 13, 2009, 10:36:22 AM »
I did have the kernel header files mounted.  From reading the link by Arsian, it sounds like the source code was wrote for older kernels.  Maybe I need to search ralink's web page  for something newer.  Thanks for the help.  

Mike

interesting thing is that driver is released on 23 January 2009
« Last Edit: December 14, 2009, 06:46:39 AM by Arslan S. »

Offline mwhit95

  • Newbie
  • *
  • Posts: 16
Re: Need Help compiling module
« Reply #6 on: January 04, 2010, 03:51:23 PM »
It took me a while to get this working and I never did get the module to compile but I didn't need to.  I should have done a lsmod and I would have seen it had loaded rt61pci.  The missing file that ifconfig was complaining about was the .dat or .bin files.  All I had to do was make the /lib/firmware directory and sudo cp *.bin rt61sta.dat /lib/firmware/ from the driver package.