Trouble

[HELP] WIFI dongle MT7601U driver compile problem ...

10 22770
Hi all
I tried to compile MT7601U driver on newest Lubuntu v3.1.1 image of Banana Pi
after the compile procedure has done , I run the command :


# modprobe -v mt7601Usta


and I will always get the message :


insmod /lib/modules/3.4.90/kernel/drivers/net/wireless/mt7601Usta.ko
modprobe: ERROR: could not insert 'mt7601Usta': Exec format error


I was so confusing ... What's going on ? then I check the /var/log/dmesg
there is the related message line :


[    9.458199] mt7601Usta: no symbol version for module_layout


I don't know what happend ? I tried to search google by the given message above
but I didn't find a simple solution


and below are the steps I used to compile the mt7601Usta driver


[install the prerequisites]
# apt-get install linux-headers-generic build-essential
# apt-get install git




[get the kernel source (I'm not sure the source is 'kernel source' or something else ...)]
# cd /usr/src
# mkdir kernel
# cd kernel
# git clone https://github.com/LeMaker/linux-bananapi
# ln -s /usr/src/kernel/linux-bananapi /lib/modules/3.4.90/build
# cd linux-bananapi




checkout the branch ... is this step needed ???
# git branch -avv
# git checkout voice/sunxi-v3.4.90-r1_bananapi




# make mrproper
# gzip -dc /proc/config.gz > .config
# make modules_prepare


then I have downloaded the MT7601U driver source from
http://www.mediatek.com/en/downloads/mt7601u-usb/




# cd /home/bananapi/Downloads
# mv DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2 /usr/local/src
# cd /usr/local/src
# tar xvjf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
# cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913
# make
# make install




yes! after these steps I will finally get my MT7601U module at
/lib/modules/3.4.90/kernel/drivers/net/wireless/mt7601Usta.ko


but this mt7601Usta.ko is not working
I cannot use it , everytime when I execute the command :
# modprobe -v mt7601Usta


I will always get the output messages from termial:
insmod /lib/modules/3.4.90/kernel/drivers/net/wireless/mt7601Usta.ko
modprobe: ERROR: could not insert 'mt7601Usta': Exec format error


RRRRRRRRR why ? I don't understand why ?
I cannot figure out this problem , any suggestion ?


救命!誰會在Banana Pi上面把MT7601U的驅動程式編譯出來呢?可以分享一下過程嗎?感激不盡
我是用最新的Lubuntu v3.1.1的影像檔開機的
here I bought the USB WIFI dongle
http://detail.tmall.com/item.htm?id=36988661875&toSite=main

because the seller's webpage says the product ID is WD-1511N
and I am so sure the WD-1511N is RTL8188eu chipset inside
so I bought it
but WUWUWUWWUWU when I plug it into my laptop
and run the command

# lsusb

I got this:
Bus 004 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 002 Device 001: ID 1d6b:0001 Linux Foundation 1.1 root hub
Bus 003 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 005: ID 148f:7601 Ralink Technology, Corp.
Bus 001 Device 004: ID 0a81:0101 Chesen Electronics Corp. Keyboard
Bus 001 Device 003: ID 093a:2510 Pixart Imaging, Inc. Optical Mouse
Bus 001 Device 002: ID 1a40:0101 Terminus Technology Inc. 4-Port HUB
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub


can you see that '7601 Ralink Technology, Corp'
I want to buy RTL8188eu but when it's it's arrived finally I got a MT7601U
so if I can not compile the driver succussfully
the only choice I just let the MT7601U go to the trash can
or go to the big ocean ... bala bala because It become useless for me

各位高手和大俠們請幫忙,不然我也只能把這USB WIFI dongle丟了,唉

as I expected , nobody reply me , I SOLVED the compilation problem
I put the 'Module.symvers' into the dir /lib/modules/3.4.90/build
then I compiled the mt7601Usta.ko again , This time the compiled
mt7601Usta.ko is good , when I execute

# modprobe -v mt7601Usta

it will be successfully loaded without any error message
and I excute

# lsmod

I will see

Module                  Size  Used by
dm_crypt               16214  0
rfcomm                 58265  0
bnep                   14241  2
bluetooth             264779  10 bnep,rfcomm
mt7601Usta            812568  0
mali_drm                2608  0
drm                   209350  1 mali_drm
mali                  111523  0
ump                    52535  1 mali

yes ~ everything looks so fine , BUT when I excute

# ifconfig -a

I cannot get wlan0 or ra0 interfaces , this is the output messages ..

eth0      Link encap:Ethernet  HWaddr 02:54:0a:81:fe:75  
          inet addr:192.168.0.162  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::54:aff:fe81:fe75/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:579 errors:0 dropped:0 overruns:0 frame:0
          TX packets:454 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:53400 (53.4 KB)  TX bytes:59640 (59.6 KB)
          Interrupt:117 Base address:0xc000

lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:136 errors:0 dropped:0 overruns:0 frame:0
          TX packets:136 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12155 (12.1 KB)  TX bytes:12155 (12.1 KB)

tunl0     Link encap:IPIP Tunnel  HWaddr   
          NOARP  MTU:1480  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)


and I check /var/log/dmesg again
I found something strange here :

[    9.227826] rtusb init rt2870 --->
[    9.234204] ===>rt2870_probe()!
[    9.238712] --> RTMPAllocAdapterBlock
[    9.248968]
[    9.248985]
[    9.248988] === pAd = f03b3000, size = 851128 ===
[    9.248993]
[    9.252670] --> RTMPAllocTxRxRingMemory
[    9.264922] ERROR: 256 KiB atomic DMA coherent pool is too small!
[    9.264941] Please increase it with coherent_pool= kernel parameter!
[    9.308194] <-- ERROR in Alloc Bulk buffer for HTTxContext!
[    9.310745] ---> RTMPFreeTxRxRingMemory
[    9.322094] <--- RTMPFreeTxRxRingMemory
[    9.332063] ERROR!!! Failed to allocate memory - TxRxRing
[    9.352231] <-- RTMPAllocAdapterBlock, Status=3
[    9.356707] rt2870: probe of 1-1:1.0 failed with error -1
[    9.361393] usbcore: registered new interface driver rt2870


and I realize ONE THING , this USB WIFI dongle use mt7601Usta module as his driver
but why it has another name called rt2870 ???
is that mean rt2870 = mt7601u ?????
I also realize when I extract the driver source tar file
(DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2)
I change into DPO_MT7601U_LinuxSTA_3.0.0.4_20130913 directory and look around
I found the file such like RT2870STA.dat RT2870STACard.dat ...
and after command 'make install'
there is a /etc/Wireless/RT2870STA/RT2870STA.dat inside my Lubuntu system on Banana Pi
so are both mt7601u and rt2870 mean the same stuff ?
they are the same ? no difference between them ? Just like You can call Iron man
Hey Iron man
or
Hey Tony
or
Hey Stark
is that mean ?
because actually 'Iron Man' = 'Tony' = 'Stark' just like 'rt2870' = 'mt7601u'
am I right ?

ok ... I keep researching for solve this problem
where is my wlan0 interface even through the lsmod command looks like successfully loaded mt7601Usta

我英文超爛請勿見怪,哈哈,看得懂就好了

One step further ...
I can see my ra0 interface
ALOHA ~~~Ya HU

I have modified the uEnv.txt on my first partition of MicroSD card
I added the 'coherent_pool=2M' parameter to the end of the line with bootargs
my actual uEnv.txt is here :

aload_script=fatload $device $partition 0x43000000 /script.bin;
aload_kernel=fatload $device $partition 0x48000000 /uImage;bootm 0x48000000
uenvcmd=run aload_script aload_kernel
bootargs=console=ttyS0,115200 console=tty0 disp.screen0_output_mode=EDID:1280x720p60 hdmi.audio=EDID:0 root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline rootwait coherent_pool=2M

and when I execute :
# ifconfig

eth0      Link encap:Ethernet  HWaddr 02:54:0a:81:fe:75  
          inet addr:192.168.0.162  Bcast:192.168.0.255  Mask:255.255.255.0
          inet6 addr: fe80::54:aff:fe81:fe75/64 Scopeink
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:178 errors:0 dropped:0 overruns:0 frame:0
          TX packets:207 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:20035 (20.0 KB)  TX bytes:25102 (25.1 KB)
          Interrupt:117 Base address:0xc000

lo        Link encapocal Loopback  
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:16436  Metric:1
          RX packets:142 errors:0 dropped:0 overruns:0 frame:0
          TX packets:142 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:12189 (12.1 KB)  TX bytes:12189 (12.1 KB)

ra0       Link encap:Ethernet  HWaddr 00:0d:0a:4b:86:6e  
          inet6 addr: fe80::20d:aff:fe4b:866e/64 Scopeink
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:28 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:7373 (7.3 KB)  TX bytes:2912 (2.9 KB)

Can you see that 'ra0'
Oh I love 'ra0'
You are the most beautiful string that I have ever seen
Love you guys
then the other network settings such like /etc/network/interfaces is easy
Oh Ya

結果變成了自問自答
這兩天為了搞定MT7601U驅動程式,我真的超認真的@_@
查資料查到都快有寫輪眼了,給我鼓勵一下吧,皮卡

epatel  
Edited by epatel at 2014-10-18 09:13
annbigbig replied at 2014-10-2 00:21
as I expected , nobody reply me , I SOLVED the compilation problem
I put the 'Module.symvers' into t ...


Hi,

I have tried to follow your steps but I still get the

`ERROR: could not insert 'mt7601Usta': Exec format error`

I have tried with all Module.symvers I could find, both from kernel dir and DPO_...

Thanks for any help!

Edward


From here maybe? http://forum.lemaker.org/2447-1-1-_.html Gonna try it anyway...

When you complied a driver, if the driver is related to something in the kernel, you' d better replace all kernel and modules.
Now can you work with mt7601u?

epatel  
tony_zhang replied at 2014-10-18 10:39
When you complied a driver, if the driver is related to something in the kernel, you' d better repla ...

It seemed to for a short moment and then everything broke down so I am rebuilding the SD image again. This is both time consuming and frustrating.

epatel  
Edited by epatel at 2014-10-18 13:20

Seems to load...

bananapi@lemaker ~ $ lsmod
Module                  Size  Used by
mali_drm                2608  0
drm                   209350  1 mali_drm
mali                  111523  0
ump                    52535  1 mali
mt7601Usta            779448  0
bananapi@lemaker ~ $ modprobe mt7601Usta
bananapi@lemaker ~ $

But no ra0 shows in ifconfig now!?!

radius  
I' m still without luck, probably I need new symvers for Bananian 2015-01-11.

igorpec  
Edited by igorpec at Sun Feb 1, 2015 07:35

I have one similar Wifi adapter. It uses the same ID 148f:7601 ... I could compile the driver without a problem. I needed to add ID to the driver (mt7610sta) and I got ra0. When start using it kernel crashes.

Adaptor is working well with Windows 7, recognized as Wireless N adapter with driver pack for RT2870.

You have to log in before you can reply Login | Sign Up

Points Rules