Lawrence
Posts: 4
Joined: Mon May 28, 2012 9:29 pm

Compiling wireless card drivers

Mon Apr 01, 2013 9:31 am

Hi all.

I'm working through a guide to installing my USB WIFI dongle on my Wheezy install (http://www.cyberciti.biz/tips/linux-ins ... apter.html). I'm up to the point of compiling the drivers as per the following quote.
Save and close the file. To compile the driver, enter:
$ make
I've had a few problems but the following error has me stumped.

Code: Select all

make -C tools
make[1]: Entering directory `/home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory `/home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
/home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h
cp -f os/linux/Makefile.6 /home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile
make -C /lib/modules/3.6.11+/build SUBDIRS=/home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules
make[1]: Entering directory `/usr/src/3.6.11'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump /usr/src/3.6.11/Module.symvers
           is missing; modules will have no dependencies and modversions.

  CC [M]  /home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_md5.o
In file included from <command-line>:0:0:
/usr/src/3.6.11/include/linux/kconfig.h:4:32: fatal error: generated/autoconf.h: No such file or directory
compilation terminated.
make[2]: *** [/home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../common/crypt_md5.o] Error 1
make[1]: *** [_module_/home/pi/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
make[1]: Leaving directory `/usr/src/3.6.11'
make: *** [LINUX] Error 2
WIFI was very temperamental and after a fair bit of research it seems that compiling and installing this driver should sort my problems.

Everything has been updated to the latest version.

Any help anyone can provide would be really appreciated. Thanks!

infConnect
Posts: 7
Joined: Mon Apr 01, 2013 11:33 am

Re: Compiling wireless card drivers

Mon Apr 01, 2013 12:56 pm

I've got one of those cheapy ebay adapters, uses slightly different chipset.. however here are the steps I used...
cd /usr/src
sudo wget https://github.com/raspberrypi/linux/ar ... 6.y.tar.gz
sudo tar xvfz rpi-3.6.y.tar.gz
sudo ln -s /usr/src/linux-rpi-3.6.y/ /lib/modules/3.6.11+/build
cd /lib/modules/3.6.11+/build
sudo make mrproper
sudo gzip -dc /proc/config.gz > .config
sudo su
gzip -dc /proc/config.gz > .config
make modules_prepare
wget https://github.com/raspberrypi/firmware ... le.symvers
exit
cd ~
bzip2 -d 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
mv 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO 2011_0719_RT3070
_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.tar
tar -xvf 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.tar
cd 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/

make
sudo make install

sudo vi /etc/modprobe.d/raspi-blacklist.conf
blacklist rt2800usb
blacklist rt2x00usb

Lawrence
Posts: 4
Joined: Mon May 28, 2012 9:29 pm

Re: Compiling wireless card drivers

Mon Apr 01, 2013 2:44 pm

Thanks for the help! I managed to get it to compile (for future searchers, I hadn't compiled the 3.6.11 kernel. That was a bit of a pain in itself). If this doesn't work after it's finished compiling the driver then I'll try your method. Thank you!

Lawrence
Posts: 4
Joined: Mon May 28, 2012 9:29 pm

Re: Compiling wireless card drivers

Mon Apr 01, 2013 5:25 pm

infConnect wrote:I've got one of those cheapy ebay adapters, uses slightly different chipset.. however here are the steps I used...
cd /usr/src
sudo wget https://github.com/raspberrypi/linux/ar ... 6.y.tar.gz
sudo tar xvfz rpi-3.6.y.tar.gz
sudo ln -s /usr/src/linux-rpi-3.6.y/ /lib/modules/3.6.11+/build
cd /lib/modules/3.6.11+/build
sudo make mrproper
sudo gzip -dc /proc/config.gz > .config
sudo su
gzip -dc /proc/config.gz > .config
make modules_prepare
wget https://github.com/raspberrypi/firmware ... le.symvers
exit
cd ~
bzip2 -d 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
mv 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO 2011_0719_RT3070
_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.tar
tar -xvf 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.tar
cd 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/

make
sudo make install

sudo vi /etc/modprobe.d/raspi-blacklist.conf
blacklist rt2800usb
blacklist rt2x00usb
OK, I got stuck again (I've been working on this bleeding dongle for days!).

I'm working through your guide but Github is taking too long to resolve so it's cancelling out. Any ideas? [edit: it was my awful internet. Tethering to my phone and it seems to be working]

Thanks for your help!

TheCommiser
Posts: 8
Joined: Wed Apr 10, 2013 9:47 pm

Re: Compiling wireless card drivers

Wed Apr 10, 2013 10:12 pm

infconnect

would you be able to upload your .ko file, ive recompiled it about 15 times so far, but it always says that it cant insert it, with the following error

Error: could not insert module ./rt5370sta.ko: Unknown symbol in module

Im tearing my hair out with this one now :/

loirad
Posts: 4
Joined: Tue Mar 12, 2013 4:53 pm

Re: Compiling wireless card drivers

Tue Jun 11, 2013 11:20 am

I come until the point where I have to enter this
bzip2 -d 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
My Raspberry don't find this file and I've this file not on my Raspberry. What can I do :?:

Sorry for bad Englisch - I am German!

dconroy
Posts: 18
Joined: Sat Mar 30, 2013 3:37 am
Contact: Website

Re: Compiling wireless card drivers

Fri Jul 05, 2013 7:45 pm

you can get that file here, except its not zipped so you can skip that line and move onto the next

http://www.mediatek.com/_en/07_download ... php?sn=501

exit
Posts: 11
Joined: Fri Apr 19, 2013 8:49 am

Re: Compiling wireless card drivers

Thu Jul 25, 2013 4:48 pm

Many, many thanks to to infConnect!
I was trying to compile an ASIX USB Ethernet driver for weeks (!) and now it works like a charm :D

malhavoc
Posts: 2
Joined: Mon Nov 25, 2013 4:38 pm

Re: Compiling wireless card drivers

Sat Dec 21, 2013 3:32 pm

Hello Exit,
I'm trying to compile the dirver for AX88179 it's also a ethernet - usb adapter.
Can you please explain how you made it work?
Thanks.

boggartfly
Posts: 3
Joined: Wed Oct 29, 2014 9:44 am

Re: Compiling wireless card drivers

Wed Oct 29, 2014 10:12 am

Here's the driver for kernel version 3.12.30+ for MT7601
Enjoy!! Lemme know if that works for you guys! I've compiled it from source myself. I'm thinking we should add a repo for this kernel module in apt-get for raspian.. I'll have a look at it.
Installation Instructions

Code: Select all

wget https://www.dropbox.com/s/1fiub7slj0g7r40/mt7601_3.12.30_718.tar.gz
sudo tar xf mt7601_3.12.30_718.tar.gz -C /
sudo depmod 3.12.30+
sudo reboot

darch
Posts: 1
Joined: Thu Oct 30, 2014 2:12 pm

Re: Compiling wireless card drivers

Thu Oct 30, 2014 2:15 pm

boggartfly wrote:Here's the driver for kernel version 3.12.30+ for MT7601
Can I in any easy way make this work with 3.12.31+ or do I need to wait for someone else to compile and update?

EDIT:
Make it work by manually extcting the mt7601Usta.ko from the .tar.gz to /lib/modules/3.12.31+/kernel/drivers/net/wireless/ - i used mc

And then run:
sudo depmod 3.12.31+
sudo reboot

boggartfly
Posts: 3
Joined: Wed Oct 29, 2014 9:44 am

Re: Compiling wireless card drivers

Thu Oct 30, 2014 5:39 pm

darch wrote:
boggartfly wrote:Here's the driver for kernel version 3.12.30+ for MT7601
Can I in any easy way make this work with 3.12.31+ or do I need to wait for someone else to compile and update?

EDIT:
Make it work by manually extcting the mt7601Usta.ko from the .tar.gz to /lib/modules/3.12.31+/kernel/drivers/net/wireless/ - i used mc

And then run:
sudo depmod 3.12.31+
sudo reboot
I really doubt whether that's safe. The kernel changes from version to version. You might under rare circumstances run into a kernel panic. Its best that you try/learn to compile from source. Easily takes 10 mins.

vlatkojordanov
Posts: 2
Joined: Wed Dec 02, 2015 1:36 pm

Re: Compiling wireless card drivers

Wed Dec 02, 2015 2:27 pm

Lawrence wrote:
infConnect wrote:I've got one of those cheapy ebay adapters, uses slightly different chipset.. however here are the steps I used...
cd /usr/src
sudo wget https://github.com/raspberrypi/linux/ar ... 6.y.tar.gz
sudo tar xvfz rpi-3.6.y.tar.gz
sudo ln -s /usr/src/linux-rpi-3.6.y/ /lib/modules/3.6.11+/build
cd /lib/modules/3.6.11+/build
sudo make mrproper
sudo gzip -dc /proc/config.gz > .config
sudo su
gzip -dc /proc/config.gz > .config
make modules_prepare
wget https://github.com/raspberrypi/firmware ... le.symvers
exit
cd ~
bzip2 -d 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.bz2
mv 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO 2011_0719_RT3070
_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.tar
tar -xvf 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO.tar
cd 2011_0719_RT3070_RT3370_RT5370_RT5372_Linux_STA_V2.5.0.3_DPO/

make
sudo make install

sudo vi /etc/modprobe.d/raspi-blacklist.conf
blacklist rt2800usb
blacklist rt2x00usb
OK, I got stuck again (I've been working on this bleeding dongle for days!).

I'm working through your guide but Github is taking too long to resolve so it's cancelling out. Any ideas? [edit: it was my awful internet. Tethering to my phone and it seems to be working]

Thanks for your help!

^^ Dude you are a life saviour I was struggling with this one for almost 3 weeks now !! I bought a Tenda wifi dongle, with this instructions, it worked like a charm, keep it up !

boggartfly
Posts: 3
Joined: Wed Oct 29, 2014 9:44 am

Re: Compiling wireless card drivers

Wed Dec 02, 2015 6:54 pm

The main problem is that these drivers are not submitted to the kernel upstream. If the Linux kernel adds support for these upstream, there will be no need to recompile these modules from version to version of the kernel!
Only of these manufacturers did that.. I tried to help out with the mt7601 chipset, but it turned out that only 1 existing generic driver was needed to be modified. I doubt that it was accepted into the kernel. Let's hope!

Return to “Troubleshooting”

Who is online

Users browsing this forum: bryantlaw, ukscone and 24 guests