I saw this topic and decided to try building a firmware for mt7620n using the SDK https://www.box.com/s/fqmmhqyykyw63350cpg1.
Got problem with wrong paths and had to correct them:
grep -rl "asm/rt2880/rt_mmap.h" ./* | xargs perl -p -i -e 's/asm\/rt2880\/rt_mmap.h/asm\/mach-ralink\/rt_mmap.h/g'
grep -rl "asm/rt2880/surfboardint.h" ./* | xargs perl -p -i -e 's/asm\/rt2880\/surfboardint.h/asm\/mach-ralink\/surfboardint.h/g'
Another problem was file i2s_ctrl.h : it was absent from the SDK. I downloaded it and copied to /openwrt-mt7620/build_dir/linux-ralink_mt7620/linux-3.3.8/drivers/char/
The firmware compiled successfully and started on the device.
Wi-Fi driver initialized successfully (ra0 was up); of all the other interfaces only eth2 was created (but down).
Viewed switch port mapping (using switch vlan dump): port0~3 had vid 1, port4 had vid 2, i.e OK.
I set up the network manually:
root@OpenWrt:/# ifconfig eth2 up
root@OpenWrt:/# vconfig add eth2 1
root@OpenWrt:/# vconfig add eth2 2
root@OpenWrt:/# brctl addbr br0
root@OpenWrt:/# brctl addif br0 eth2.1
root@OpenWrt:/# brctl addif br0 ra0
root@OpenWrt:/# ifconfig br0 192.168.0.1
root@OpenWrt:/# ifconfig eth2.2 192.168.152.149
Set default gateway (in my network it is 192.168.152.17):
root@OpenWrt:/# route add default gw 192.168.152.17
Added Google DNS 8.8.8.8:
root@OpenWrt:/# vi /etc/resolv.conf
Sent ping requests:
root@OpenWrt:/# ping 192.168.152.18
PING 192.168.152.18 (192.168.152.18): 56 data bytes
64 bytes from 192.168.152.18: seq=0 ttl=64 time=0.880 ms
64 bytes from 192.168.152.18: seq=1 ttl=64 time=0.500 ms
^C
--- 192.168.152.18 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 0.500/0.690/0.880 ms
root@OpenWrt:/# ping 8.8.8.8
PING 8.8.8.8 (8.8.8.8): 56 data bytes
64 bytes from 8.8.8.8: seq=0 ttl=48 time=25.221 ms
64 bytes from 8.8.8.8: seq=1 ttl=48 time=24.861 ms
64 bytes from 8.8.8.8: seq=2 ttl=48 time=24.800 ms
^C
--- 8.8.8.8 ping statistics ---
3 packets transmitted, 3 packets received, 0% packet loss
round-trip min/avg/max = 24.800/24.960/25.221 ms
root@OpenWrt:/# ping ya.ru
PING ya.ru (213.180.204.3): 56 data bytes
64 bytes from 213.180.204.3: seq=0 ttl=55 time=6.601 ms
64 bytes from 213.180.204.3: seq=1 ttl=53 time=5.880 ms
64 bytes from 213.180.204.3: seq=2 ttl=55 time=5.920 ms
64 bytes from 213.180.204.3: seq=3 ttl=53 time=6.160 ms
^C
--- ya.ru ping statistics ---
4 packets transmitted, 4 packets received, 0% packet loss
round-trip min/avg/max = 5.880/6.140/6.601 ms
At last I tried to enter the web-interface. It did not work, though uhttpd listened on port 80. Alas!
What do I do wrong?