无法在 Ubuntu 18.04(内核 4.15.0-36-generic)上安装 TP-Link T1U USB 驱动程序

无法在 Ubuntu 18.04(内核 4.15.0-36-generic)上安装 TP-Link T1U USB 驱动程序

我正在尝试在我的计算机上安装 Tp-Link T1U USB 适配器。我目前正在运行带有 4.15.0-36-generic 内核的 Ubuntu 18.04。几天来我一直在寻找一些解决方案,即: https://github.com/ashaffer/rt3573sta https://github.com/lixz789/mt7610u_wifi_sta_v3002_dpo_20130916/pull/1

这是我在安装时要做的事情,按照我下载的 README 和我发布的第二个链接中建议的补丁进行安装:

sudo apt-get install git build-essential
$ mkdir ~/src
$ cd ~/src
$ git clone https://github.com/Myria-de/mt7610u_wifi_sta_v3002_dpo_20130916.git
$ git clone https://github.com/lixz789/mt7610u_wifi_sta_v3002_dpo_20130916.git
$ cd mt7610u_wifi_sta_v3002_dpo_20130916
$ make

这是我得到的答复:

make -C tools
make[1]: Entering directory '/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/tools/bin2h
chipset = mt7610u
cp -f os/linux/Makefile.6 /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/Makefile
make -C /lib/modules/4.15.0-36-generic/build SUBDIRS=/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-36-generic'
Makefile:975: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
CC [M]  /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o
In file included from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44:0,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:77:0: warning: "EXT_BUILD_CHANNEL_LIST" redefined
#define EXT_BUILD_CHANNEL_LIST  /* must define with CRDA */

<command-line>:0:0: note: this is the location of the previous definition
In file included from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:98:0,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/cfg80211.h:35:49: error: 'IEEE80211_NUM_BANDS' undeclared here (not in a function); did you mean 'IEEE80211_NUM_ACS'?
struct ieee80211_supported_band Cfg80211_bands[IEEE80211_NUM_BANDS];
                                             ^~~~~~~~~~~~~~~~~~~
                                             IEEE80211_NUM_ACS
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c: In function 'announce_802_3_packet':
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:341:16: warning: unused variable 'pAd' [-Wunused-variable]
RTMP_ADAPTER *pAd = (RTMP_ADAPTER *)pAdSrc;
            ^~~
In file included from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44:0,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
             from /home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c: In function 'STA_MonPktSend':
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:450: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__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
                               ^                                               ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:669:16: note: in definition of macro 'DBGPRINT_RAW'
     printk Fmt;               \
            ^~~
/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:450:9: note: in expansion of macro 'DBGPRINT'
     DBGPRINT(RT_DEBUG_ERROR, ("%s : Size is too large! (%d)\n", __FUNCTION__, pRxBlk->DataSize + sizeof(wlan_ng_prism2_header)));
     ^~~~~~~~
scripts/Makefile.build:332: recipe for target '/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o' failed
make[2]: *** [/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o] Error 1
Makefile:1551: recipe for target '_module_/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux' failed
make[1]: *** [_module_/home/momissimi/src/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-36-generic'
Makefile:403: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2

我根本无法翻译所有这些内容,也不知道如何继续前进。

任何帮助都将非常有帮助。

注意::我希望我没有犯任何错误。我确实尝试遵循指南,但我不太熟悉。

答案1

啊啊啊!永远狡猾、永远不直截了当的 mt7610u!

这个驱动程序在后来的 Linux 内核中有一个困难的历史,例如:https://ubuntuforums.org/showthread.php?t=2367163&highlight=mt7610u您可能对我的帖子#18 感兴趣。

然而,这里的帖子#4声称它现在可以正常工作!https://ubuntuforums.org/showthread.php?t=2375919我们很快就会知道。

通过以太网、网络共享或任何可能的方式建立有效的互联网连接,打开终端并执行以下操作:

sudo apt update
sudo apt install git
git clone https://github.com/ulli-kroll/mt7610u.git
cd mt7610u
make
sudo make installfw
sudo insmod mt7610u.ko

在我们继续进行进一步的必要步骤之前,请告诉我们是否创建了无线接口:

iwconfig

...如果您能够轻松连接、拉取网页等。

编辑:让我们确保您拥有“master”分支。首先,删除可能有错误的文件:

cd /home/momissimi
sudo rm -r mt7610u
git clone -b master https://github.com/ulli-kroll/mt7610u.git
cd mt7610u
make
sudo make installfw
sudo insmod mt7610u.ko

有改善吗?

答案2

内核 4.19 有一个可工作的驱动器。

安装:

  1. 打开http://kernel.ubuntu.com/~kernel-ppa/mainline/并选择最新的内核版本文件夹。

  2. 下载linux-headerslinux-headers-generic和的 .deblinux-imagelinux-modules安装。

  3. 重启

相关内容