在 Ubuntu 15.10中,安装Wifi驱动程序出错

分享于 

11分钟阅读

ubuntu

  繁體

问题


ghost@ghost:~/Desktop$ cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913


ghost@ghost:~/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913$ make


make -C tools


make[1]: Entering directory '/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools'


gcc -g bin2h.c -o bin2h


make[1]: Leaving directory '/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools'


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/tools/bin2h


cp -f os/linux/Makefile.6 /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/Makefile


make -C /lib/modules/4.2.0-16-generic/build SUBDIRS=/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux modules


make[1]: Entering directory '/usr/src/linux-headers-4.2.0-16-generic'


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.o


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: In function 'announce_802_3_packet':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:331:16: warning: unused variable 'pAd' [-Wunused-variable]


 RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;


 ^


In file included from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp_os.h:44:0,


 from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp_comm.h:75,


 from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:33,


 from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:28:


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c: In function 'STA_MonPktSend':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:399:35: warning: format '%d' expects argument of type 'int', but argument 3 has type 'long unsigned int' [-Wformat=]


 DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)n", __FUNCTION_


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/os/rt_linux.h:661:16: note: in definition of macro 'DBGPRINT_RAW'


 printk Fmt; 


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../os/linux/rt_profile.c:399:9: note: in expansion of macro 'DBGPRINT'


 DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)n", __FUNCTION_


 ^


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/assoc.o


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/auth.o


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/auth_rsp.o


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.o


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.c: In function 'PeerBeacon':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.c:2180:12: warning: passing argument 8 of 'StaAddMacTableEntry' from incompatible pointer type [-Wincompatible-pointer-types]


 ie_list,


 ^


In file included from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:59:0,


 from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sync.c:28:


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp.h:7892:9: note: expected 'IE_LISTS * {aka struct _IE_lists *}' but argument is of type 'BCN_IE_LIST * {aka struct _bcn_ie_list *}'


 BOOLEAN StaAddMacTableEntry(


 ^


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sanity.o


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.o


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c: In function 'STAHandleRxDataFrame':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c:523:33: warning: passing argument 2 of 'MacTableLookup' from incompatible pointer type [-Wincompatible-pointer-types]


 pEntry = MacTableLookup(pAd, &pHeader->Addr2);


 ^


In file included from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:59:0,


 from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/rtmp_data.c:28:


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rtmp.h:8429:18: note: expected 'UCHAR * {aka unsigned char *}' but argument is of type 'UCHAR (*)[6] {aka unsigned char (*)[6]}'


 MAC_TABLE_ENTRY *MacTableLookup(RTMP_ADAPTER *pAd, UCHAR *pAddr);


 ^


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/connect.o


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/wpa.o


 CC [M] /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.o


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c: In function 'RTMPIoctlRF':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5306:32: warning: format '%X' expects argument of type 'unsigned int', but argument 5 has type 'LONG {aka long int}' [-Wformat=]


 sprintf(msg+strlen(msg),"BANK%d_R%02d:%02X", bank_Id, rfId, rfValue);


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5359:27: warning: passing argument 2 of 'RtmpDrvAllRFPrint' from incompatible pointer type [-Wincompatible-pointer-types]


 RtmpDrvAllRFPrint(NULL, msg, strlen(msg));


 ^


In file included from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_config.h:64:0,


 from /home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:28:


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/include/rt_os_util.h:668:6: note: expected 'UINT32 * {aka unsigned int *}' but argument is of type 'PSTRING {aka char *}'


 VOID RtmpDrvAllRFPrint(


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5209:22: warning: unused variable 'rf_bank' [-Wunused-variable]


 UCHAR regRF = 0, rf_bank = 0;


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c: In function 'RTMPIoctlShow':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5766:85: error: macro"__DATE__" might prevent reproducible builds [-Werror=date-time]


 intf(extra, size,"Driver version-%s, %s %sn", STA_DRIVER_VERSION, __DATE__, _


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:5766:95: error: macro"__TIME__" might prevent reproducible builds [-Werror=date-time]


 , size,"Driver version-%s, %s %sn", STA_DRIVER_VERSION, __DATE__, __TIME__ );


 ^


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c: In function 'RtmpIoctl_rt_ioctl_siwgenie':


/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.c:7610:13: warning: assignment from incompatible pointer type [-Wincompatible-pointer-types]


 eid_ptr = pAd->StaCfg.pWpaAssocIe;


 ^


cc1: some warnings being treated as errors


scripts/Makefile.build:258: recipe for target '/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.o' failed


make[2]: *** [/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/../../sta/sta_cfg.o] Error 1


Makefile:1398: recipe for target '_module_/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux' failed


make[1]: *** [_module_/home/ghost/Desktop/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux] Error 2


make[1]: Leaving directory '/usr/src/linux-headers-4.2.0-16-generic'


Makefile:394: recipe for target 'LINUX' failed


make: *** [LINUX] Error 2




答案0

驱动程序mt7601u已内置,查看它当前是否被加载:


lsmod | grep mt7



如果不加载它:


sudo modprobe mt7601u



检查是否缺少所需的固件:


dmesg | grep mt7



如果缺少临时可用的internet连接,请执行下列操作:


sudo apt-get install git


git clone https://github.com/porjo/mt7601


cd mt7601/src/mcu/bin


sudo mv MT7601.bin /lib/firmware/mt7601u.bin



现在卸载并重新加载驱动程序,以便它看到固件:


sudo modprobe -r mt7601u


sudo modprobe mt7601u



你的无线设备现在应该工作了。


答案1

解决方案:( ID 148f:7601 Ralink Technology, Corp. MT7601U无线适配器),/os/linux/Makefile.6:,添加如下行

EXTRA_CFLAGS + = -Wno-incompatible-pointer-types -Wno-date-time


Drive  MAKE  Ubuntu  无线  installing  WIF  
相关文章