$ mkdir bcm-staging
$ export WORK=`pwd`/bcm-staging
$ cd ${WORK}
$ git clone https://github.com/raspberrypi/tools
$ export PATH=${PATH}:`pwd`/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin
$ cd ${WORK}
$ git clone -b rpi-4.4.y https://github.com/raspberrypi/linux.git
$ cd linux
$ export KERNEL=kernel7
$ export ARCH=arm
$ export CROSS_COMPILE=arm-linux-gnueabihf-
$ make bcm2709_defconfig
$ make -j 4 zImage modules dtbs
$ cd ${WORK}
$ git clone -b rpi https://github.com/FantomJAC/mt7610u_wifi_sta_v3002_dpo_20130916.git
$ cd mt7610u_wifi_sta_v3002_dpo_20130916
$ export PI_SRC=${WORK}/linux
$ make
Copy driver files over rootfs. (Kernel version may vary.)
Note: Ideally, you should use the kernel built above. But the driver may work while the kernel version 4.4 is used.
$ cp ./os/linux/mt7650u_sta.ko ${RPI_ROOTFS}/modules/4.4.21-v7+
$ mkdir -p ${RPI_ROOTFS}/etc/Wireless/RT2870STA
$ cp RT2870STA.dat ${RPI_ROOTFS}/etc/Wireless/RT2870STA
Add the following line on /etc/network/interfaces
allow-hotplug ra0
iface ra0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
On Raspberry PI system, do depmod.
# depmod -a
i get this error :(
pi@raspberrypi:~/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916 $ make
make -C tools
make[1]: Entering directory '/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
gcc -g bin2h.c -o bin2h
make[1]: Leaving directory '/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/tools'
/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/tools/bin2h
chipset = mt7650u
chipset = mt7630u
chipset = mt7610u
cp -f os/linux/Makefile.6 /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/Makefile
make -C /home/pi/bcm-staging/linux SUBDIRS=/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux modules
make[1]: Entering directory '/home/pi/bcm-staging/linux'
WARNING: Symbol version dump ./Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o
In file included from include/linux/mmzone.h:18:0,
from include/linux/gfp.h:5,
from include/linux/kmod.h:22,
from include/linux/module.h:13,
from /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/include/os/rt_linux.h:31,
from /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_os.h:44,
from /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/include/rtmp_comm.h:75,
from /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/include/rt_config.h:33,
from /home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.c:28:
include/linux/page-flags-layout.h:5:30: fatal error: generated/bounds.h: No such file or directory
#include <generated/bounds.h>
^
compilation terminated.
scripts/Makefile.build:258: recipe for target '/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o' failed
make[2]: *** [/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux/../../os/linux/rt_profile.o] Error 1
Makefile:1402: recipe for target 'module/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux' failed
make[1]: *** [module/home/pi/bcm-staging/mt7610u_wifi_sta_v3002_dpo_20130916/os/linux] Error 2
make[1]: Leaving directory '/home/pi/bcm-staging/linux'
Makefile:399: recipe for target 'LINUX' failed
make: *** [LINUX] Error 2