求助:USB无线网卡驱动编译报错
Tofloor
poster avatar
观摩
deepin
2018-04-25 06:25
Author
我的无线网卡也是那个万恶的没有官方Linux驱动的TP-WDN5200。

网上搜了很多帖子和介绍,也下载了很多驱动,但是在编译环节全部都报错,是不是还需要再安装什么编译环境?

期待高手的解惑。


  1. root@HOME-PC:/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit# make
  2. make -C tools
  3. make[1]: Entering directory '/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/tools'
  4. gcc -g bin2h.c -o bin2h
  5. make[1]: Leaving directory '/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/tools'
  6. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/tools/bin2h
  7. chipset = mt7610u
  8. cp -f os/linux/Makefile.6 /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/Makefile
  9. make -C /lib/modules/4.14.0-deepin2-amd64/build SUBDIRS=/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux modules
  10. make[1]: Entering directory '/usr/src/linux-headers-4.14.0-deepin2-amd64'
  11.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.o
  12. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c: In function ‘announce_802_3_packet’:
  13. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:334:16: warning: unused variable ‘pAd’ [-Wunused-variable]
  14.   RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
  15.                 ^~~
  16. In file included from /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/include/rtmp_os.h:44:0,
  17.                  from /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/include/rtmp_comm.h:75,
  18.                  from /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/include/rt_config.h:33,
  19.                  from /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:28:
  20. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c: In function ‘STA_MonPktSend’:
  21. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:443:35: warning: format ‘%d’ expects argument of type ‘int’, but argument 3 has type ‘long unsigned int’ [-Wformat=]
  22.          DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
  23.                                    ^
  24. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/include/os/rt_linux.h:660:16: note: in definition of macro ‘DBGPRINT_RAW’
  25.          printk Fmt;               \
  26.                 ^~~
  27. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../os/linux/rt_profile.c:443:9: note: in expansion of macro ‘DBGPRINT’
  28.          DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
  29.          ^~~~~~~~
  30.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/assoc.o
  31.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/auth.o
  32.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/auth_rsp.o
  33.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sync.o
  34.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sanity.o
  35.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/rtmp_data.o
  36.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/connect.o
  37.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/wpa.o
  38.   CC [M]  /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.o
  39. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c: In function ‘Set_EncrypType_Proc’:
  40. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c:789:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
  41.      else
  42.      ^~~~
  43. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c:792:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
  44.   if (pAd->StaCfg.BssType == BSS_ADHOC)
  45.   ^~
  46. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c: In function ‘RtmpIoctl_rt_ioctl_siwfreq’:
  47. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c:5647:5: warning: this ‘else’ clause does not guard... [-Wmisleading-indentation]
  48.      else
  49.      ^~~~
  50. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c:5650:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘else’
  51.   return NDIS_STATUS_SUCCESS;
  52.   ^~~~~~
  53. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c: In function ‘RtmpIoctl_rt_ioctl_giwrate’:
  54. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c:7518:5: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation]
  55.      if (rate_index >= rate_count)
  56.      ^~
  57. /home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../sta/sta_cfg.c:7521:2: note: ...this statement, but the latter is misleadingly indented as if it is guarded by the ‘if’
  58.   *(ULONG *)pData = ralinkrate[rate_index] * 500000;
  59.   ^
  60. cc1: some warnings being treated as errors
  61. /usr/src/linux-headers-4.14.0-deepin2-common/scripts/Makefile.build:319: recipe for target '/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/rtmp_chip.o' failed
  62. make[4]: *** [/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux/../../chips/rtmp_chip.o] Error 1
  63. /usr/src/linux-headers-4.14.0-deepin2-common/Makefile:1525: recipe for target '_module_/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux' failed
  64. make[3]: *** [_module_/home/java/Downloads/mediatek_mt7610u_sta_driver_linux-64bit/os/linux] Error 2
  65. Makefile:146: recipe for target 'sub-make' failed
  66. make[2]: *** [sub-make] Error 2
  67. Makefile:8: recipe for target 'all' failed
  68. make[1]: *** [all] Error 2
  69. make[1]: Leaving directory '/usr/src/linux-headers-4.14.0-deepin2-amd64'
  70. Makefile:393: recipe for target 'LINUX' failed
  71. make: *** [LINUX] Error 2
Copy the Code


Reply Favorite View the author
All Replies
avatar
观摩
deepin
2018-04-25 19:38
#1
顶一顶,希望大神帮忙看看
Reply View the author
avatar
aksss
deepin
2018-06-06 04:31
#2
一样的错误,,,折腾了好几天无果。这让我的台式机很尴尬,,,准备换新无线网卡,,
Reply View the author
avatar
观摩
deepin
2018-06-06 04:33
#3
https://bbs.deepin.org/post/155694
一样的错误,,,折腾了好几天无果。这让我的台式机很尴尬,,,准备换新无线网卡,, ...

准备换什么无线网卡,换了之后效果好的话说一声
Reply View the author