LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   Broadcom drivers. (https://www.linuxquestions.org/questions/slackware-14/broadcom-drivers-754512/)

Unr3a164 09-11-2009 06:09 PM

Broadcom drivers.
 
Apparently, Broadcom now offers what they call "hybrid" broadcom drivers for Linux. I am trying to install them, but I am getting an error. I am following the instructions from this txt file:

http://www.broadcom.com/docs/linux_sta/README.txt

and when I go to step 5 to make a Linux loadable kernel module (LKM) this is what happens:

Code:

root@l3n0v0:~/hybrid_wl# make -C /lib/modules/2.6.29.6-smp/build M='pwd'
make: Entering directory `/usr/src/linux-2.6.29.6'
scripts/Makefile.build:41: /usr/src/linux-2.6.29.6/pwd/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-2.6.29.6/pwd/Makefile'.  Stop.
make: *** [_module_pwd] Error 2
make: Leaving directory `/usr/src/linux-2.6.29.6'
root@l3n0v0:~/hybrid_wl#

What am I doing wrong? I am following the instructions to the T, but it's not working. Doe anyone have any ideas? Or should I just use ndiswrapper?

GrapefruiTgirl 09-11-2009 06:13 PM

M='pwd' <-- note the quotes;

Is that a typo or something, or are you actually using '''' <-- those single quotes, instead of ```` <-- backticks?

Sasha

Unr3a164 09-11-2009 06:16 PM

Quote:

Originally Posted by GrapefruiTgirl (Post 3679360)
M='pwd' <-- note the quotes;

Is that a typo or something, or are you actually using '''' <-- those single quotes, instead of ```` <-- backticks?

Sasha

DOH!! I was using quotes instead of the backticks... I gotta get my friggin eyes checked. Let me try the command with the backticks and I will post here what happened. Thanks for the catch... I feel so stupid...

GrapefruiTgirl 09-11-2009 06:18 PM

No reason to feel stupid -- sillier things have stumped lots of people, lots of times :)

Let us know..

Unr3a164 09-11-2009 06:28 PM

Ok, I fixed the command, but now this is what I get:

Code:

root@l3n0v0:~/hybrid_wl# make -C /lib/modules/2.6.29.6/build M=`pwd`     
make: Entering directory `/usr/src/linux-2.6.29.6'                       
  LD      /root/hybrid_wl/built-in.o                                     
  CC [M]  /root/hybrid_wl/src/wl/sys/wl_linux.o                         
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_attach':         
/root/hybrid_wl/src/wl/sys/wl_linux.c:362: error: implicit declaration of function 'ieee80211_get_crypto_ops'                                       
/root/hybrid_wl/src/wl/sys/wl_linux.c:362: warning: assignment makes pointer from integer without a cast                                             
/root/hybrid_wl/src/wl/sys/wl_linux.c:365: warning: assignment makes pointer from integer without a cast                                             
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_free':             
/root/hybrid_wl/src/wl/sys/wl_linux.c:634: error: 'struct net_device' has no member named 'priv'                                                     
/root/hybrid_wl/src/wl/sys/wl_linux.c:669: error: 'struct net_device' has no member named 'priv'                                                     
/root/hybrid_wl/src/wl/sys/wl_linux.c:685: error: dereferencing pointer to incomplete type                                                           
/root/hybrid_wl/src/wl/sys/wl_linux.c:689: error: dereferencing pointer to incomplete type                                                           
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_open':             
/root/hybrid_wl/src/wl/sys/wl_linux.c:714: error: 'struct net_device' has no member named 'priv'                                                     
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_close':           
/root/hybrid_wl/src/wl/sys/wl_linux.c:742: error: 'struct net_device' has no member named 'priv'                                                     
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_start':           
/root/hybrid_wl/src/wl/sys/wl_linux.c:765: error: 'struct net_device' has no member named 'priv'                                                     
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_alloc_if':         
/root/hybrid_wl/src/wl/sys/wl_linux.c:850: error: 'struct net_device' has no member named 'priv'                                                     
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_get_driver_info': 
/root/hybrid_wl/src/wl/sys/wl_linux.c:1030: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_ioctl':           
/root/hybrid_wl/src/wl/sys/wl_linux.c:1118: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c:1119: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_get_stats':       
/root/hybrid_wl/src/wl/sys/wl_linux.c:1204: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_get_wireless_stats':
/root/hybrid_wl/src/wl/sys/wl_linux.c:1236: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c:1237: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_set_mac_address': 
/root/hybrid_wl/src/wl/sys/wl_linux.c:1304: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c:1312: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function '_wl_set_multicast_list':                                                                         
/root/hybrid_wl/src/wl/sys/wl_linux.c:1335: error: 'struct net_device' has no member named 'priv'                                                   
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_tkip_miccheck':   
/root/hybrid_wl/src/wl/sys/wl_linux.c:1726: error: dereferencing pointer to incomplete type                                                         
/root/hybrid_wl/src/wl/sys/wl_linux.c:1729: error: dereferencing pointer to incomplete type                                                         
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_tkip_micadd':     
/root/hybrid_wl/src/wl/sys/wl_linux.c:1748: error: dereferencing pointer to incomplete type                                                         
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_tkip_encrypt':     
/root/hybrid_wl/src/wl/sys/wl_linux.c:1768: error: dereferencing pointer to incomplete type                                                         
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_tkip_decrypt':     
/root/hybrid_wl/src/wl/sys/wl_linux.c:1790: error: dereferencing pointer to incomplete type                                                         
/root/hybrid_wl/src/wl/sys/wl_linux.c:1792: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_tkip_keyset':
/root/hybrid_wl/src/wl/sys/wl_linux.c:1834: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c:1844: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c:1851: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c:1861: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c:1871: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c:1878: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c: In function 'wl_tkip_printstats':
/root/hybrid_wl/src/wl/sys/wl_linux.c:1897: error: dereferencing pointer to incomplete type
/root/hybrid_wl/src/wl/sys/wl_linux.c:1899: error: dereferencing pointer to incomplete type
make[1]: *** [/root/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make: *** [_module_/root/hybrid_wl] Error 2
make: Leaving directory `/usr/src/linux-2.6.29.6'
root@l3n0v0:~/hybrid_wl#

Any ideas on this?

GrapefruiTgirl 09-11-2009 06:51 PM

Generally speaking, the above happens when either:

1-- the build process can't find the header files it's looking for, or
2-- something else really weird, like the driver and kernel version are incompatible.
Possible other causes too, perhaps..

You DO have the kernel headers package installed, right?

One thing I will suggest though, which may or may not help THIS problem, but may make things work more cleanly in general, would be:

Where you use this command:

make -C /lib/modules/2.6.29.6/build M=`pwd`

I would replace the 2.6.29.6 with `uname -r` instead (don't omit the backticks).

At least that way, you know the build is looking in the right place for your kernel's build directory (the symlink).

NOTE THOUGH: I don't know how the word "linux-" is getting prepended (on the next line: make: Entering directory `/usr/src/linux-2.6.29.6') onto the kernel version you are supplying, so if `uname -r` gives you more trouble, such as it starts looking for "linux-linux-2.6.29.6") you'll need to switch back.

Not sure at this moment what else to suggest, but more suggestions will come :) so not to worry.

At this point (regarding your earlier comment) I would definitely not switch to ndiswrapper; it looks so far like this is a little buggy, but all in all, it should work for you eventually.

Good luck!
Sasha

Unr3a164 09-11-2009 07:06 PM

I will try what you are suggesting, and I have no clue whether the kernel headers package is installed. I have not installed anything since the initial setup of slackware. So if the kernel headers package is not part of the "full" install option in the initial setup, then no, its not installed. If it is part of it, then yes, it is.

GrapefruiTgirl 09-11-2009 07:10 PM

Yep, the headers should be installed if you did the full meal deal.

Keep fiddling, and if you get really screwed up, I'd be keen on trying to build the driver myself too, for the heck of it -- provided I don't actually need a Broadcom NIC to do so ;)

Also, there's another thread on the go around here, where username mobinskariya is building a different Broadcom driver. You may find either some tips in that thread, OR a different version of the Broadcom driver that may work for you.

Sasha

jimX86 09-11-2009 07:25 PM

I think you forgot to patch the driver. I have a blog entry about this... would you mind testing the instructions to see if they work for you?

Unr3a164 09-11-2009 07:43 PM

Ok, so I did what you told me to do with the `uname -r` and got the same issue.


jimx86, I did not patch it. Maybe that's my issue. I will do that next. And yes, I will follow the directions in your blog entry and let you know what happened.

Unr3a164 09-11-2009 08:15 PM

Ok, so I patched the drivers, and now it allows me to create the LKM, however, when I try to load it with modprobe, I get this:

Code:

root@l3n0v0:~/hybrid_wl# modprobe wl
FATAL: Error inserting wl (/lib/modules/2.6.29.6/kernel/drivers/net/wireless/wl.ko): Invalid module format
root@l3n0v0:~/hybrid_wl#

So, this looks like a different issue.

EDIT: Edited out a theory that I answered myself.

jimX86 09-11-2009 08:28 PM

I'm not sure... are you using a custom kernel? Is the kernel source the same version as the running kernel?

GrapefruiTgirl 09-11-2009 08:33 PM

Only time(s) I have gotten into that situation, was when using a driver that was too old for the kernel version I was trying to build it for (or the kernel is too new for it, or otherwise incompatible with the kernel). And trying to work around it is a hellish ordeal.

My suggestion is either upgrade to a newer kernel, or more preferably, downgrade/upgrade to a different version of the driver (maybe not a "hybrid", if possible -- that word's not usually good ;) )

jimX86 09-11-2009 08:59 PM

I'm running Slackware64, but it works here with the stock 2.6.29.6 kernel and matching kernel headers. GrapefruiTgirl, you might be on to something... I'm pretty sure that this driver won't work yet with a 2.6.30 kernel.

edit... gentoo has a patch for newer kernels.

GrapefruiTgirl 09-11-2009 09:07 PM

Quote:

Originally Posted by jimX86 (Post 3679483)
I'm running Slackware64, but it works here with the stock 2.6.29.6 kernel and matching kernel headers. GrapefruiTgirl, you might be on to something... I'm pretty sure that this driver won't work yet with a 2.6.30 kernel.

edit... gentoo has a patch for newer kernels.

But the OP is using the same kernel version as you are, right? Off the top of my head, I can't recall: which headers are included with a stock Slack64 install?

Methinks I'm missing something here :scratch:
:)

The time(s) I ran into this issue, were always when trying to build the Intel 536 modem driver on a new kernel. I always had to wait until a newer version of the modem driver came out, before I could update the kernel on that machine -- I was stuck at 2.6.24.4 for the LONGest time :|

Sasha


All times are GMT -5. The time now is 11:44 PM.