MT7620 (GS-MA5320) network problems after fresh compilation

Hi all,
My name is Pablo, and I'm new in the forum. I'm a software and hardware developer, and I'm working with a chinese router from Gaingstrom with a MT7620.
I'm analyzing the usage of this board (GS-MA5320) as a development platform, and to do that I want to recompile the OpenWRT images.
I could do it using the following configuration:

Target System: MediaTek Ralink MIPS
Subtarget: MT7620 based boards
Target Profile: Multiple devices
Target Devices: MediaTek MT7620a EVB (the board I have is not in the list....)

The version for OpenWRT was from Feb 26 2020.

As I had several complains during compilation about the size of the image I've implement the following changes (according to this post Build Script to Compile Custom Firmware for Devices with Small Memory):
Target Images
[] squashfs (NEW)
(256) Block size (in KiB)
Kernel modules
Wireless Drivers
[ ] Export mac80211 internals in DebugFS
[ ] Enable 802.11s mesh support
1. Collections
> luci
2. Modules
[] Minify Lua sources
3. Applications
> luci-app-adblock
<> luci-app-ddns
> luci-app-openvpn
<> luci-app-qos OR <> luci-app-sqm
<> luci-app-upnp
> luci-app-wol

<*> libustream-mbedtls

<*> openvpn-mbedtls

The compilation was fine and I got the image:

Then I flash the image, and the system starts fine. I have access through the UART.
The problem is that if I connect an ethernet cable to my PC I cannot see the device...
This router has 4 ports, none of them works...
After connecting the cable to any port I can see in the dmesg log (always through my UART) that the device is recognizing the connection:
[ 1613.867702] mtk_soc_eth 10100000.ethernet eth0: port 3 link up (100Mbps/Full duplex)

Any ideas? Any help on this would be really appreciate.
Thanks for the help! And let me know if is necessary to add more information.


Did you set the IP on your PC to fixed 192.168.1.x (x>=2) ?

Yes. I set it to
During reflash via tftp I can see the router in the address. So, I think the hardware and wiring is working fine. The problem is after reflashing my image.

Hows that ? Do you only have 4MB flash / 32MB RAM ?
(I have various similar boards using MT7620A, all having 8/64, at least)

Usually, in case, image is too large for the target, simply no image is generated. But your board might be different from reference board. You might ask Gainstrong for openwrt. May be, they have a customized version.
Another alternative: Do a standard build without LuCi, which is the default, BTW, and no other mods. And check, whether it works.

The board has 32mb of flash and 128mb of ram, but the compilation with the default configuration (make defconfig) and the necessary changes for the meaditek flavor was complaining that the size was bigger than 32mb.
I didn't try to compile without LuCi. I'll try that an let you know.
Thanks for the idea :slight_smile:

There is another board, the ZBT WE128 (32M), with 32/128, 4LAN+WAN, too. In case, you are not faint hearted, you might try to build and flash that image. With some risk of bricking your device, but I doubt it.

I've performed a fresh new compilation for the recommended flavor (ZBT WE826 3M). Sadly the router still doesn't have LAN access, or even Wifi...

Then you should try to get in touch with Gainstrongs support. Good chance, they have a customized, (old) openwrt to use. And from there to start trying to develop a newer image.
I used smaller devices from Gainstrong (minirouter), and found them really helpful.

In case, you are building from recent Trunk sources, you might be hit by a serious bug, I reported here on the forum already, and which is confirmed for MT7620A based devices,
You can try to build a basic system for the EVB (or WE826 32/128) for openwrt 18.06.07, which does NOT contain this bug.[0]=&sev[0]=&pri[0]=&due[0]=&reported[0]=&cat[0]=&status[0]=open&percent[0]=&opened=&dev=&closed=&duedatefrom=&duedateto=&changedfrom=&changedto=&openedfrom=&openedto=&closedfrom=&closedto=

Pls check that switch configuration exist in /etc/config/network
In this topic

So workaround is to setup switch manually. But the reason why it's happen is unclear yet.

It works! Finally the issue was exactly the switch was not configured:

config switch
	option name 'switch0'
	option reset '1'
	option enable_vlan '1'

config switch_vlan
	option device 'switch0'
	option vlan '1'
        option vid '1'
	option ports '1 2 3 4 5 6t'

config switch_vlan
	option device 'switch0'
	option vlan '2'
        option vid '2'
	option ports '0 6t'

Besides, for my board the only configuration which works is the ZBT WE826.

Thank you all guys for the help!
Best regards!

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.