我购买了下面列出的 Ralink USB 网络接口设备
$lsusb
Bus 004 Device 002: ID 148f:7601 Ralink Technology, Corp.
我查看了许多线程,它们都指向相同的芯片组驱动程序:mt7601u
于是我就上了 GitHub:https://github.com/kuba-moo/mt7601u
使用了定制的驱动程序,在我开始在启动过程中发生内核崩溃之前,该驱动程序运行良好几天(请勿使用此驱动程序!!)
所以我回去下载了供应商的驱动程序(http://www.mediatek.com/en/downloads1/downloads/mt7601u-usb/)
但无论如何我都无法编译。 “$make”崩溃可能是因为我使用 Linux 版本 3.16...并且至少需要 3.19。
$uname -r
3.16.0-4-amd64
我使用 Debian,最新的稳定版本是我目前拥有的版本,并且希望保持这种状态。 B计划是什么?我安装了“firmware-ralink”软件包。
真的不知道下一步该做什么。也许我应该购买另一个 USB 网络接口?如果是这样,请留下有关 Debian 轻松安装的建议。
我想提一下,所有这些问题都是由我的计算机中的网络接口有问题引起的(小心 REALTEK 芯片组!!)
$lspci -vnn | grep "Network"
04:00.0 Network controller [0280]: Realtek Semiconductor Co., Ltd.
RTL8821AE 802.11ac PCIe Wireless Network Adapter [10ec:8821]
***** 编辑 *****
感谢您的回答 GAD3R,
我已经验证一切都安装正确。然后我确保升级一切。
$sudo apt-get update
$sudo apt-get upgrade
我已将修改附加到 config.mk 文件
# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Manger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
编译的时候还是报错:
$ sudo make && make install
make -C tools
make[1]: Entering directory '/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools'
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/tools/bin2h
cp -f os/linux/Makefile.6 /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/Makefile
make -C /lib/modules/3.16.0-4-amd64/build SUBDIRS=/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux modules
make[1]: Entering directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:10: *** mixed implicit and normal rules: deprecated syntax
make[1]: Entering directory `/usr/src/linux-headers-3.16.0-4-amd64'
CC [M] /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.o
In file included from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42:0,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘duplicate_pkt’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:477:18: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast
NdisMoveMemory(skb->tail, pHeader802_3, HdrLen);
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:450:61: note: in definition of macro ‘NdisMoveMemory’
#define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
^
In file included from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/string.h:4:0,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/string.h:17,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/bitmap.h:8,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/cpumask.h:11,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/cpumask.h:4,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/msr.h:10,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/processor.h:20,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/thread_info.h:23,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/thread_info.h:54,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/preempt.h:6,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/preempt.h:18,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/spinlock.h:50,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/seqlock.h:35,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/time.h:5,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/stat.h:18,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/module.h:10,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:40,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
void *memmove(void *dest, const void *src, size_t count);
^
In file included from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42:0,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:479:18: warning: passing argument 1 of ‘memmove’ makes pointer from integer without a cast
NdisMoveMemory(skb->tail, pData, DataSize);
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:450:61: note: in definition of macro ‘NdisMoveMemory’
#define NdisMoveMemory(Destination, Source, Length) memmove(Destination, Source, Length)
^
In file included from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/string.h:4:0,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/string.h:17,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/bitmap.h:8,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/cpumask.h:11,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/cpumask.h:4,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/msr.h:10,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/processor.h:20,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/thread_info.h:23,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/thread_info.h:54,
from /usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/preempt.h:6,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/preempt.h:18,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/spinlock.h:50,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/seqlock.h:35,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/time.h:5,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/stat.h:18,
from /usr/src/linux-headers-3.16.0-4-common/include/linux/module.h:10,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/os/rt_linux.h:40,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rtmp_os.h:42,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/include/rt_config.h:72,
from /home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:28:
/usr/src/linux-headers-3.16.0-4-common/arch/x86/include/asm/string_64.h:58:7: note: expected ‘void *’ but argument is of type ‘sk_buff_data_t’
void *memmove(void *dest, const void *src, size_t count);
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘ClonePacket’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:629:23: warning: assignment makes integer from pointer without a cast
pClonedPkt->tail = pClonedPkt->data + pClonedPkt->len;
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘update_os_packet_info’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:651:15: warning: assignment makes integer from pointer without a cast
pOSPkt->tail = pOSPkt->data + pOSPkt->len;
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘wlan_802_11_to_802_3_packet’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:672:15: warning: assignment makes integer from pointer without a cast
pOSPkt->tail = pOSPkt->data + pOSPkt->len;
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘send_monitor_packets’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:945:9: 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/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSFSInfoChange’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1228:20: error: incompatible types when assigning to type ‘int’ from type ‘kuid_t’
pOSFSInfo->fsuid = current_fsuid();
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1229:20: error: incompatible types when assigning to type ‘int’ from type ‘kgid_t’
pOSFSInfo->fsgid = current_fsgid();
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevDetach’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1694:38: warning: initialization discards ‘const’ qualifier from pointer target type
struct net_device_ops *pNetDevOps = pNetDev->netdev_ops;
^
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSNetDevAttach’:
/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.c:1731:38: warning: initialization discards ‘const’ qualifier from pointer target type
struct net_device_ops *pNetDevOps = pNetDev->netdev_ops;
^
/usr/src/linux-headers-3.16.0-4-common/scripts/Makefile.build:262: recipe for target '/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.o' failed
make[4]: *** [/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux/../../os/linux/rt_linux.o] Error 1
/usr/src/linux-headers-3.16.0-4-common/Makefile:1352: recipe for target '_module_/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux' failed
make[3]: *** [_module_/home/sugar/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1/os/linux] Error 2
Makefile:181: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-3.16.0-4-amd64'
Makefile:243: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2
sugar@sugarraysam:~/downloads/2010_0709_RT2870_Linux_STA_v2.4.0.1$
我找不到工作的司机。
我在网上找到的“雷凌官方来源”是:http://www.ralinktech.com/。这只是广告...
找到联发科(母公司)的Ralink驱动程序 -->http://mediatek.com/en/downloads1/downloads/mt7612u/。但是编译的时候还是报错。
谢谢你的帮助。
答案1
安装依赖项:
apt-get install build-essential fakeroot dpkg-dev
apt-get install linux-headers-$(uname -r)
下载driver 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2
自这里
解压并加载目录
tar -jxvf 2010_0709_RT2870_Linux_STA_v2.4.0.1.tar.bz2
cd 2010_0709_RT2870_Linux_STA_v2.4.0.1
编辑config.mk
nano os/linux/config.mk
# Support Wpa_Supplicant
HAS_WPA_SUPPLICANT=y
# Support Native WpaSupplicant for Network Manger
HAS_NATIVE_WPA_SUPPLICANT_SUPPORT=y
编译
make
make install
答案2
http://gentoo-en.vfose.ru/wiki/Ralink_RT2870有帮助。具体来说,请注意,对该设备的内核支持似乎已经以驱动程序的形式包含在内核中rt2800usb
。也可以看看https://wiki.debian.org/rt2800usb
该页面提到了固件rt2870.bin
。apt-file
为此返回两次命中:
apt-file search rt2870.bin
firmware-misc-nonfree: /lib/firmware/rt2870.bin
firmware-ralink: /lib/firmware/rt2870.bin
firmware-ralink
与杰西一起使用。firmware-misc-nonfree
仅处于不稳定状态。