$ 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
Did you find a way to generate the bounds.h file?