Page 1 of 1

Help building module

Posted: Thu Feb 07, 2013 11:28 pm
by clonky
Hello! I hope this is the right forum to post this. I have been having problems getting my broadcom wireless card to work, and after several other attempts it was recommended to me that I try the tutorial posted by broadcom itself to build and install a module. The tutorial is here.

I successfully untarred the tarball and made the directory, but when I go to make the module I get this error:

make
KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
Wireless Extension is the only possible API for this kernel version
Using Wireless Extension API
CC [M] /home/clonky/hybrid_wl/src/wl/sys/wl_linux.o
/home/clonky/hybrid_wl/src/wl/sys/wl_linux.c:43:24: fatal error: asm/system.h: No such file or directory
compilation terminated.
make[2]: *** [/home/clonky/hybrid_wl/src/wl/sys/wl_linux.o] Error 1
make[1]: *** [_module_/home/clonky/hybrid_wl] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
make: *** [all] Error 2

I am really new to being able to read the terminal and use linux in general. Can anyone shed light on what is going on and how I can fix it?

Re: Help building module

Posted: Fri Feb 08, 2013 7:20 am
by kc1di
Can you tell us what card your trying to build the module for? That may be of help in getting you up and running.
most broadcom drivers are already available in Mint and you should not have to build the module yourself.

Re: Help building module

Posted: Fri Feb 08, 2013 5:06 pm
by clonky
It's Broadcom 4331 - 802.11a. I have tried installing drivers and nothing seems to work in getting it to work, so this is kind of a last resort action unfortunately ):

Re: Help building module

Posted: Fri Feb 08, 2013 5:31 pm
by kc1di
found the following on the Ubuntu forum for the Broadcom 4331-- hope it's of help. it's for 11.10 but the procedure should be similar. of course the kernel they talk about will be a newer one.

Wireless
There is no official support yet in Ubuntu 11.10, but you can get it working with the following repository:


sudo add-apt-repository ppa:mpodroid/mactel
sudo apt-get update
sudo apt-get install b43-fwcutter firmware-b43-installer
Then install the linux-backports-modules-cw-3.2-oneiric-generic or, if you have the pae kernel installed, the linux-backports-modules-cw-3.2-oneiric-generic-pae package. While this tutorial deals with Oneiric, the same instructions for the wireless work for Precise, with the above installation of "linux-backports-modules-cw-3.2-oneiric-generic" replaced with "linux-backports-modules-cw-3.3-precise-generic".

Edit the /etc/modprobe.d/blacklist.conf and add the line:


blacklist ndiswrapper
Create or edit the file /etc/pm/config.d/modules and make sure the wireless modules (b43 and bcma) are blacklisted:


SUSPEND_MODULES="b43 bcma"
Reboot and the wireless should work.
Also take a look at this page:
http://community.linuxmint.com/hardware/view/13780

Re: Help building module

Posted: Tue Feb 12, 2013 4:43 am
by clonky
Thanks for the information, I will try it out and see if it works. Is there anything from the code I should change to suit Mint 14 such as the kernel or such?

Re: Help building module

Posted: Tue Feb 12, 2013 5:10 am
by catweazel
clonky wrote:Thanks for the information, I will try it out and see if it works. Is there anything from the code I should change to suit Mint 14 such as the kernel or such?
It's a bug.

https://bugs.launchpad.net/ubuntu/+sour ... bug/994255

There's a fix in that thread.

Re: Help building module

Posted: Tue Feb 12, 2013 5:11 pm
by clonky
Thank you so much, this is exactly what I was looking for!

Re: Help building module

Posted: Wed Feb 13, 2013 9:58 pm
by clonky
I attempted to make the updated and fixed package and got this output in the terminal:

KBUILD_NOPEDANTIC=1 make -C /lib/modules/`uname -r`/build M=`pwd`
make[1]: Entering directory `/usr/src/linux-headers-3.5.0-17-generic'
CFG80211 API is prefered for this kernel version
Using CFG80211 API
LD /home/clonky/bcmwl-6.20.155.1+bdcom/built-in.o
make[2]: *** No rule to make target `/home/clonky/bcmwl-6.20.155.1+bdcom/src/shared/linux_osl.o', needed by `/home/clonky/bcmwl-6.20.155.1+bdcom/wl.o'. Stop.
make[1]: *** [_module_/home/clonky/bcmwl-6.20.155.1+bdcom] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-3.5.0-17-generic'
make: *** [all] Error 2