Skip to content

Instantly share code, notes, and snippets.

@FantomJAC
Created November 14, 2016 15:30
Show Gist options
  • Save FantomJAC/5afb94107531f51a6c62662b490e5640 to your computer and use it in GitHub Desktop.
Save FantomJAC/5afb94107531f51a6c62662b490e5640 to your computer and use it in GitHub Desktop.
Cross Compile MT7610U Driver for RPi2/3

Cross Compile MT7610U Driver for RPi2/3

$ mkdir bcm-staging
$ export WORK=`pwd`/bcm-staging

RPi2/3 Kernel

Setup toolchain

$ cd ${WORK}
$ git clone https://github.com/raspberrypi/tools
$ export PATH=${PATH}:`pwd`/tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian-x64/bin

Build

$ 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

MT7610U Driver

Build

$ 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

Install

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
@tdwebste
Copy link

tdwebste commented Aug 9, 2020

Did you find a way to generate the bounds.h file?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment