在树莓派上使用基于MT7601的无线网卡(如360/百度/腾讯Wifi)

20150626更新基于 linux kernel 4.0.6 的步骤,建议先看最后更新的部分

20151205更新,发现在8月13日时,来自4.2的mt7601u驱动被移植到了4.1.5,所以,升级内核到4.1.5或以上,只需要下载  mt7601u.bin 放到 /lib/firmware/ 下就可以了,就是执行下面这条命令。具体来源见 https://github.com/raspberrypi/linux/issues/1090

sudo wget https://github.com/porjo/mt7601/raw/master/src/mcu/bin/MT7601.bin -O /lib/firmware/mt7601u.bin

如果内核是4.1.5以上,下文都不需要看了,驱动已经自带,不需要自己编译,只需要补上 /lib/firmware/mt7601u.bin 就可以了。

否则,看下面的几行来更新系统,再补上 mt7601u.bin ,也就ok了。

20170107更新,最近把卡格了重新装raspbian系统,是2016-11-25的版本,内核是4.4,发现mt7601u.bin也已经自带,直接插上就用不需要折腾。这个版本的蛋疼之处在于SSH默认关闭,需要在启动分区加上一个名为ssh的文件,才可以开启SSH。

 


 

首先,更新你的树莓派(避免编译出来版本不对导致不能insert):

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade
sudo rpi-update

更新gcc和g++:

#可能有点问题,先不要更新  20150506
#sudo apt-get install gcc-4.8 g++-4.8

#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
#sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.8 50
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.6 20
#sudo update-alternatives --install /usr/bin/g++ g++ /usr/bin/g++-4.8 50

到MTK的官网下载驱动并传到树莓派上:http://www.mediatek.com/zh-CN/downloads/mt7601u-usb/

解压:

tar xjvf DPO_MT7601U_LinuxSTA_3.0.0.4_20130913.tar.bz2
cd DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/

打开 common/rtusb_dev_id.c,在 {USB_DEVICE(0x148f,0×7601)}, /* MT 6370 */  下面加入以下内容:

{USB_DEVICE(0x148f,0x760b)}, /* 360 Wifi */
{USB_DEVICE(0x2955,0x1001)}, /* baidu Wifi */
{USB_DEVICE(0x2a5f,0x1000)}, /* Tencent WiFi */
{USB_DEVICE(0x2955,0x0001)}, /* XiaoDu Wifi */
{USB_DEVICE(0x2717,0x4106)}, /* Xiaomi Wifi */

打开 include/os/rt_linux.h,找到

int fsuid;
int fsgid;

并把它改为

kuid_t fsuid;
kgid_t fsgid;

查看当前内核的版本:

uname -r

显示我的版本是3.18.8+ ,所以下载对应的3.18的linux源码,然后解压:

wget https://github.com/raspberrypi/linux/archive/rpi-3.18.y.tar.gz
tar xvfz rpi-3.18.y.tar.gz

取得root权限,将源码移至/usr/src目录:

sudo su
mv linux-rpi-3.18.y /usr/src

建立内核模块库目录的链接:

ln -s /usr/src/linux-rpi-3.18.y /lib/modules/3.18.8+/build
cd /lib/modules/3.18.8+/build

make mrproper 可以看作更加强劲的 make clean 命令,用来清除环境变量,即清除配置文件,一般编译内核前都要运行:

make mrproper

将当前正在使用的系统的内核配置生成内核配置信息:

gzip -dc /proc/config.gz > .config

生成编译内核所需要的东西:

make modules_prepare

获取内核编译时生成的内核模块导出符号文件。因为不是从头编译内核,所以没有,但是编译内核模块需要这个:

wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers

再到网卡驱动目录中编译驱动(进入到DPO_MT7601U_LinuxSTA_3.0.0.4_20130913):

make
make install
modprobe mt7601Usta

如无报错,驱动就安装完成了。

 

之后是修改/etc/network/interfaces文件,我改成这样:

auto lo

iface lo inet loopback
iface eth0 inet dhcp

allow-hotplug wlan0
iface wlan0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf
iface default inet dhcp

allow-hotplug ra0
iface ra0 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

其中添加的ra0是对应MT7601的,wlan0没有改,插其他无线网卡应该也能正常用。

然后修改/etc/wpa_supplicant/wpa_supplicant.conf,填入要连接的无线网络的配置。

ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
update_config=1

network={
        ssid="yourssid"
        psk="yourpassword"
        proto=RSN
        key_mgmt=WPA-PSK
        pairwise=CCMP TKIP
        group=CCMP TKIP
        auth_alg=OPEN
        priority=3
}

最后的priority是该配置的优先级,数字越大越先连接。添加几个就能在不同的地方自动连接了。

重启机器,用ifconfig、iwconfig等测试无线网卡能否正常工作。

20150110215621

rdp远程登录进去,打开Wifi设置后的截图

 

=========================

20150306更新:在内核更新到3.18后,驱动需要重新编译,出现了种种问题,在参考了[2]和[3]后,升级了gcc版本和修改了rt_linux.h。

20150306于RaspberryPi Model B+测试成功,内核为3.18.8。

20150506更新:在升级gcc后,似乎在make modules_prepare时会遇到compiler too buggy的问题。我又找了一下,还是在树莓派的官方论坛,https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=49864&start=179这里:

On the first time running rpi-source, you have to have the default gcc 4.6.3. You have to also specify –skip-gcc so that rpi-source doesn’t care about the different gcc in use and what’s been used to build the default kernel. If you run rpi-source with 4.8.2 as the default gcc, you’ll end up getting message like this during the kernel preparation (make prepare?) phase:

…error Your compiler is too buggy; it is known to miscompile kernels…

That’s why you have to first run rpi-source with the default gcc 4.6.3 with –skip-gcc parameter. After rpi-source gets all done, you have to change to gcc 4.8.2. The kernel doesn’t let you compile the kernel itself, but you can compile compatible modules for it. It’s bit tricky . It would be great if the default Raspbian gcc would compile compatible modules. Maybe gcc 4.8.3 would not complain about the kernel miscompile problem?

似乎是先用自带的4.6.3 prepare好了之后,再换用4.8的意思,各位研究一下吧。

20150623更新:在https://www.raspberrypi.org/forums/viewtopic.php?f=28&t=49864&start=353找到了一个适用于3.18.11+ #776的驱动,传到了百度盘,使用方法:

tar xzf mt7601-3.18.11-776.tar.gz
/install.sh

另外,在github上有了第三方的驱动,适用于kernel 3.19以上的版本,并且被合并到kernel 4.2,所以未来升级到4.2的时候就再也不用烦恼了。如果要自己编译,就到上面的github链接看看吧。


20150626更新

今天把我的RPi B+更新到了4.0.6内核,(Linux raspberrypi 4.0.6+ #798 PREEMPT Tue Jun 23 17:48:03 BST 2015 armv6l),然后成功使用了上文提到的github的新驱动。

步骤与之前的基本相同。以下步骤未详细说明的都在本文中有提及。

  1. 更新树莓派
  2. 确保使用的是gcc 4.6
  3. 查看当前内核的版本,下载对应的源码,解压,移到/usr/src
  4. 建立内核模块库目录的链接,并切换目录到/lib/modules/`uname -r`/build
  5. make mrproper
  6. sudo modprobe configs   #这会生成 /proc/config.gz
  7. gzip dc /proc/config.gz > .config
  8. make modules_prepare
  9. 下载Module.symvers
  10. 切换到gcc 4.8,(就是前文update-alternatives的那几行)不然编译出来会kernel oops,我试过了,20150506的更新也有提到这一点
  11. https://github.com/porjo/mt7601或官方驱动中的src/mcu/bin/MT7601.bin复制到/lib/firmware/下,命名为mt7601u.bin
  12. 下载驱动源码 https://github.com/kuba-moo/mt7601u/archive/master.zip 并解压到你喜欢的目录,在usb.c里自带了很多USB DEV ID,包括360腾讯小米等,应该不用自己添加了
  13. make && sudo make install && sudo depmod
  14. sudo modprobe mt7601u(make install 之后mt7601u.ko会放到/lib/modules/4.0.6中,如果有问题就放到/lib/modules/4.0.6+/kernel/drivers/net/wireless/下吧)
  15. 插上你的MT7601,ifconfig看一下有没有wlan0吧
  16. /etc/network/interfaces文件中没有ra0部分,只用wlan0

 

 

相关参考:

1.在树莓派上使用360WIFI(也适用于小米、百度、腾讯WIFI):http://shumeipai.nxez.com/2014/12/07/raspberry-pi-use-360wifi.html

2.http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=98913

3.http://www.raspberrypi.org/forums/viewtopic.php?f=28&t=49864&p=690479


已有34条评论 发表评论

  1. 匿名 /

    前辈你好,我是初学者。
    在make modules_prepare这里,出现如下错误,如何解决?

    arch/arm/kernel/asm-offsets.c:53:2: error: #error Your compiler is too buggy; it is known to miscompile kernels
    #error Your compiler is too buggy; it is known to miscompile kernels
    ^
    arch/arm/kernel/asm-offsets.c:54:2: error: #error and result in filesystem corruption and oopses.
    #error and result in filesystem corruption and oopses.
    ^
    Kbuild:81: recipe for target ‘arch/arm/kernel/asm-offsets.s’ failed
    make[1]: *** [arch/arm/kernel/asm-offsets.s] Error 1
    Makefile:980: recipe for target ‘prepare0’ failed
    make: *** [prepare0] Error 2

    1. 7forz / 本文作者

      编译器太旧了吧..? 我也是初学者(*^__^*)

  2. 匿名 /

    硬件树莓派2,软件3.18.7-v7+

  3. expansy /

    换回gcc4.6就可以

  4. 天空狗 /

    我也是这里有错,那个编译器怎么转换?

    1. fiyone /

      用 apt-get remove 可以卸载4.8版gcc,树莓派自带4.6版本的。

      sudo apt-get remove gcc-4.8 g++-4.8

      sudo update-alternatives –install /usr/bin/gcc gcc /usr/bin/gcc-4.6 20
      sudo update-alternatives –install /usr/bin/g++ g++ /usr/bin/g++-4.6 20

      然后再编译内核就没问题了。

      1. 7forz / 本文作者

        我用自带的4.6编译出来载入驱动时遇到kernel oops,换4.8才成功… 4.6能用就不用装4.8了

        1. 深蓝 /

          4.8提示compiler is too buggy ,4.6编译后又oops,那怎么才能用?

          1. 7forz / 本文作者

            我在官方论坛找了一下,更新到文章了,不知道有没有用呢。。。。

  5. fiyone /

    建立内核模块库目录的链接:
    ln -s /usr/src/linux-rpi-3.18.y /lib/modules/3.18.8+/build
    cd /lib/modules/3.18.8+/build

    —————————————————————
    下面的几步不能执行,只好cd linux-rpi-3.18.y ,然后再执行就没有问题
    —————————————————————
    make mrproper 可以看作更加强劲的 make clean 命令,用来清除环境变量,即清除配置文件,一般编译内核前都要运行:
    make mrproper

    将当前正在使用的系统的内核配置生成内核配置信息:
    gzip -dc /proc/config.gz > .config

    生成编译内核所需要的东西:
    make modules_prepare

    ————————————————————————————————
    Module.symvers这个文件也无法获取。只好在win7里面进网址,保存下来,拷贝到 linux-rpi-3.18.y下。
    ————————————————————————————————-
    获取内核编译时生成的内核模块导出符号文件。因为不是从头编译内核,所以没有,但是编译内核模块需要这个:
    wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers

    ——————————————————————————————————————
    下面的第一步make命令执行出错,错误如下
    cp -f os/linux/Makefile.6 /home/pi/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux/Makefile
    make -C /lib/modules/3.18.11+/build SUBDIRS=/home/pi/DPO_MT7601U_LinuxSTA_3.0.0.4_20130913/os/linux modules
    make[1]: Entering directory ‘/lib/modules/3.18.11+/build’
    make[1]: *** No rule to make target ‘modules’. Stop.
    make[1]: Leaving directory ‘/lib/modules/3.18.11+/build’
    Makefile:394: recipe for target ‘LINUX’ failed
    make: *** [LINUX] Error 2

    ——————————————————————————————————————

    再到网卡驱动目录中编译驱动(进入到DPO_MT7601U_LinuxSTA_3.0.0.4_20130913):
    make
    make install
    modprobe mt7601Usta

  6. YoungChange /

    求教,如果用天猫魔盘wifi该修改哪些地方?

    1. 7forz / 本文作者

      百度了一下,是8192eu的芯片,和本文的mtk完全不同,自己找驱动编译吧~

  7. 匿名 /

    我也是那个问题啊 4.6版本出现internal error:Oops:5 [#1] PREEMPT ARM
    4.8版本就说编译器too buggy

  8. brisy /

    我也是那个问题啊 4.6版本出现internal error:Oops:5 [#1] PREEMPT ARM
    4.8版本就说编译器too buggy
    该怎么解决呢

  9. vk /

    编译和安装都没有问题,但是在sudo modprobe my7601Usta会出现ERROR:could not insert `mt7601Usta`:Exec format error,同时ifconfig也没有无线网卡的信息

    1. 7forz / 本文作者

      本文最后的Reference里似乎都有提到这些种种问题,建议仔细看看。。。我是看了之后按着做了一次突然就成功了,现在不保证能行╮(╯▽╰)╭

    2. 匿名 /

      我也有这问题,升级了系统内核也没有,目前还没找到解决方案。

    3. 阿汪 /

      请问你怎么解决的

  10. 匿名 /

    树莓派内核被我升到4.0.5,重启后没有在/proc下找到config.gz怎么办?

    1. 7forz / 本文作者

      这几天我试试。。。

      1. 匿名 /

        好的,就等你了

        1. 7forz / 本文作者

          成功与否,希望各位读者给个回复。。。

  11. louix /

    为什么编译驱动需要 “所以下载对应的3.18的linux源码”?
    /×××××××××××××××××××××××××××××××××
    显示我的版本是3.18.8+ ,所以下载对应的3.18的linux源码,然后解压:
    wget https://github.com/raspberrypi/linux/archive/rpi-3.18.y.tar.gz
    tar xvfz rpi-3.18.y.tar.gz
    1
    2

    wget https://github.com/raspberrypi/linux/archive/rpi-3.18.y.tar.gz
    tar xvfz rpi-3.18.y.tar.gz

    取得root权限,将源码移至/usr/src目录:
    sudo su
    mv linux-rpi-3.18.y /usr/src
    1
    2

    sudo su
    mv linux-rpi-3.18.y /usr/src

    建立内核模块库目录的链接:
    ln -s /usr/src/linux-rpi-3.18.y /lib/modules/3.18.8+/build
    cd /lib/modules/3.18.8+/build
    1
    2

    ln -s /usr/src/linux-rpi-3.18.y /lib/modules/3.18.8+/build
    cd /lib/modules/3.18.8+/build

    make mrproper 可以看作更加强劲的 make clean 命令,用来清除环境变量,即清除配置文件,一般编译内核前都要运行:
    make mrproper
    1

    make mrproper

    将当前正在使用的系统的内核配置生成内核配置信息:
    gzip -dc /proc/config.gz > .config
    1

    gzip -dc /proc/config.gz > .config

    生成编译内核所需要的东西:
    make modules_prepare
    1

    make modules_prepare

    获取内核编译时生成的内核模块导出符号文件。因为不是从头编译内核,所以没有,但是编译内核模块需要这个:
    wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers
    1

    wget https://github.com/raspberrypi/firmware/raw/master/extra/Module.symvers

    ×××××××××××××××××××××××××××××××××××××/
    这几步有什么用?为什么不是直接编译驱动就可以了?

    1. 7forz / 本文作者

      因为编译驱动的时候需要linux headers

  12. Eric /

    4.0.8-v7+ 下编译后insmod出错:
    mt7601Usta: disagrees about version of symbol module_layout

    生成的驱动信息为:
    eric@raspberrypi:~/smbShare$ modinfo mt7601Usta
    filename: /lib/modules/4.0.8-v7+/kernel/drivers/net/wireless/mt7601Usta.ko
    version: 3.0.0.3
    description: RT2870 Wireless Lan Linux Driver
    author: Paul Lin
    license: GPL
    srcversion: 81B3781B4832774F967C939
    alias: usb:v2717p4106d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v2955p0001d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v2A5Fp1000d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v2955p1001d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp760Bd*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp7601d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp6370d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp7650d*dc*dsc*dp*ic*isc*ip*in*
    depends:
    vermagic: 4.0.8-v7 SMP preempt mod_unload modversions ARMv7
    parm: mac:rt28xx: wireless mac addr (charp)

    uname -r 结果:
    eric@raspberrypi:~/smbShare$ uname -r
    4.0.8-v7+

    为什么生成的驱动的vermagic 为4.0.8-v7而不是4.0.8-v7+,而我的内核版本却是4.0.8-v7+

    THX

  13. Eric /

    已经修改varmagic.h,编译后驱动的varmagic已经和uname -r一致,但是还是插入错误。
    dmesg:

    [ 79.915002] usb 1-1.5: new high-speed USB device number 4 using dwc_otg
    [ 80.026237] usb 1-1.5: New USB device found, idVendor=148f, idProduct=760b
    [ 80.026262] usb 1-1.5: New USB device strings: Mfr=1, Product=2, SerialNumber=3
    [ 80.026279] usb 1-1.5: Product: 802.11 n WLAN
    [ 80.026295] usb 1-1.5: Manufacturer: MediaTek
    [ 80.026310] usb 1-1.5: SerialNumber: 1.0
    [ 80.118664] mt7601Usta: disagrees about version of symbol module_layout
    eric@raspberrypi:~$ modinfo mt7601Usta
    filename: /lib/modules/4.0.8-v7+/kernel/drivers/net/wireless/mt7601Usta.ko
    version: 3.0.0.3
    description: RT2870 Wireless Lan Linux Driver
    author: Paul Lin
    license: GPL
    srcversion: 81B3781B4832774F967C939
    alias: usb:v2717p4106d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v2955p0001d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v2A5Fp1000d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v2955p1001d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp760Bd*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp7601d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp6370d*dc*dsc*dp*ic*isc*ip*in*
    alias: usb:v148Fp7650d*dc*dsc*dp*ic*isc*ip*in*
    depends:
    vermagic: 4.0.8-v7+ SMP preempt mod_unload modversions ARMv7
    parm: mac:rt28xx: wireless mac addr (charp)
    eric@raspberrypi:~$ uname -r
    4.0.8-v7+

    1. 7forz / 本文作者

      我在4.0上用的是github上的驱动而不是MTK驱动。github上写:It was written from scratch based on the vendor GPL-driver. Unlike the vendor driver this driver uses modern Linux WiFi infrastructure and should work flawlessly with NetworkManager, wicd, wpa_supplicant and such. This driver was merged into mainline and is part of official Linux kernel since version v4.2. 用这个替代MTK的驱动应该还是有很多好处的。

  14. GoodPerson /

    大神求解————————————————————————————————————————————–
    root@RPi:/home/pi/download/mt7601u-master# make
    make -C src/ osutil
    make[1]: Entering directory ‘/home/pi/download/mt7601u-master/src’
    cp -f os/linux/Makefile.6.util /home/pi/download/mt7601u-master/src/os/linux/Makefile
    make -C /lib/modules/4.1.7-v7+/build SUBDIRS=/home/pi/download/mt7601u-master/src/os/linux modules
    make[2]: Entering directory ‘/lib/modules/4.1.7-v7+/build’
    make[2]: *** No rule to make target ‘modules’. Stop.
    make[2]: Leaving directory ‘/lib/modules/4.1.7-v7+/build’
    Makefile:510: recipe for target ‘osutil’ failed
    make[1]: *** [osutil] Error 2
    make[1]: Leaving directory ‘/home/pi/download/mt7601u-master/src’
    Makefile:2: recipe for target ‘all’ failed
    make: *** [all] Error 2
    —————————————————————————————————————————————
    root@RPi:/home/pi/download/mt7601u-master# uname -a
    Linux RPi 4.1.7-v7+ #817 SMP PREEMPT Sat Sep 19 15:32:00 BST 2015 armv7l GNU/Linux
    ——————————————————————————————————————————————
    root@RPi:/home/pi/download/mt7601u-master# gcc –version
    gcc (Raspbian 4.8.2-21~rpi3rpi1) 4.8.2
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    ——————————————————————————————————————————————
    g++ (Raspbian 4.8.2-21~rpi3rpi1) 4.8.2
    Copyright (C) 2013 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions. There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    ——————————————————————————————————————————————
    root@RPi:/home/pi/download/mt7601u-master# cd /lib/modules/4.1.7+/
    build/ modules.alias modules.builtin modules.dep modules.devname modules.softdep modules.symbols.bin
    kernel/ modules.alias.bin modules.builtin.bin modules.dep.bin modules.order modules.symbols
    ——————————————————————————————————————————————
    root@RPi:/home/pi/download/mt7601u-master# cd /lib/modules/4.1.7+/build/
    arch/ COPYING drivers/ include/ Kconfig MAINTAINERS net/ scripts/ tools/
    block/ CREDITS firmware/ init/ kernel/ Makefile README security/ usr/
    .config crypto/ fs/ ipc/ lib/ mm/ REPORTING-BUGS sound/ virt/
    .config.old Documentation/ .gitignore Kbuild .mailmap modules.order samples/ .tmp_versions/

    1. 7forz / 本文作者

      换用github上的驱动吧,MTK的驱动问题多多。。。

  15. 猩猩 /

    非常感谢博主分享,按照最新更新的内容,瞬间搞定

    1. 7forz / 本文作者

      哈哈,好,你是第一个反馈的

  16. harry /

    博主,最新的树莓派内核(4.4以上)是不是连驱动都不用下载了?那是不是我的360随身wifi2插上去就可以直接用了呢?还是仍然要修改上面的一些文件?另外,我用的树莓派3b本身是自带无线网卡的,只是想试试看能不能用另一块360网卡破解wifi…两块网卡,会自动识别吗?
    (本来装的是kali,现在果断装回raspbian,装完了我去测试一下)

    1. 7forz / 本文作者

      还是要看mt7601u.bin有没有吧,插上,看看有没有网卡和系统日志就知道能不能用了。多网卡你可以试试,我没试过。

  17. 枫叶 /

    我在make的时候报下面这个错误,这是什么原因,已经找了n中解释没有一个是对的

    make -C tools
    make[1]: 进入目录“/root/mt7601/src/tools”
    gcc -g bin2h.c -o bin2h
    make[1]: 离开目录“/root/mt7601/src/tools”
    /root/mt7601/src/tools/bin2h
    cp -f os/linux/Makefile.6 /root/mt7601/src/os/linux/Makefile
    make -C /lib/modules/4.18.0-kali3-amd64/build SUBDIRS=/root/mt7601/src/os/linux modules
    make[1]: 进入目录“/usr/src/linux-rpi-4.18.y”
    CC [M] /root/mt7601/src/os/linux/../../sta/sync.o
    /root/mt7601/src/os/linux/../../sta/sync.c: In function ‘PeerBeacon’:
    /root/mt7601/src/os/linux/../../sta/sync.c:2182:12: error: passing argument 8 of ‘StaAddMacTableEntry’ from incompatible pointer type [-Werror=incompatible-pointer-types]
    &ie_list,
    ^~~~~~~~
    In file included from /root/mt7601/src/include/rt_config.h:59,
    from /root/mt7601/src/os/linux/../../sta/sync.c:28:
    /root/mt7601/src/include/rtmp.h:7900:15: note: expected ‘IE_LISTS *’ {aka ‘struct _IE_lists *’} but argument is of type ‘BCN_IE_LIST **’ {aka ‘struct _bcn_ie_list **’}
    IN IE_LISTS *ie_list,
    ~~~~~~~~~~^~~~~~~
    cc1: some warnings being treated as errors
    make[2]: *** [scripts/Makefile.build:318:/root/mt7601/src/os/linux/../../sta/sync.o] 错误 1
    make[1]: *** [Makefile:1505:_module_/root/mt7601/src/os/linux] 错误 2
    make[1]: 离开目录“/usr/src/linux-rpi-4.18.y”
    make: *** [Makefile:395:LINUX] 错误 2

回复给vk 取消回复