Building custom firmware for GL.iNet MT300N-V2


You’ve used to provide a custom image builder for your MT300N-V1 routers, however I can’t find one for MT300N-V2 routers. The LEDE ramips mt7620 image builder does not have profile for MT300N-V2 either.

  1. How can I build a custom image for MT300N-V2?

  2. Can I re-use my V1 code for slider polling/switch actions or has anything which had to do with buttons changed between V1 and V2?


The imagebuilder is in my Linux PC.

I am on travel this week and hope to upload it next week.

Yes you can reuse some of your code. But need to check carefully each line of the code. The switch GPIO is different.

Hi Alzhao

Thanks for your work and update - Also waiting on this so we can build and order <span style=“color: #222222; font-family: source_sans_proregular, ‘Helvetica Neue’, Arial, Helvetica, Geneva, sans-serif; font-size: 14.6667px;”>MT300N-V2</span>

Are there any instructions to build packages for MT300N-V1 router online?

I downloaded the openwrt source code from github and could only find GL AR150, GL AR300 GL Domino Pi, GL.Inet 6416 in the build list.

I compiled my package using GL AR300 but when I used opkg to install, I got an error message saying “compiled using the wrong architecture”

How can I compile for GT300M V1 ? Any resources available online?

@pavan4, by default it is ar71xx so you will not find target for MT series. Pleas change the architecture to ramips, then choose 7620 boards, you will find GL-MT300A GL-MT300N

@alzhao I might be going off thread here. My apologies.

However, I chose 'Ralink RT288x/RT3xxx ’ as target —> MT7620 based boards as subtarget —> I can’t find MT300N in the Target Profile. There is only default and that is still the wrong architecture after I compile.

I checked even the openwrt trunk openwrt/target/linux/ramips/mt7620 at master · openwrt/openwrt · GitHub the profile doesn’t exist

Please let me know what I am doing wrong?




Sorry I missed that you want v2.

For V2, please use this one: GitHub - domino-team/lede-1701: a clone of lede-1701 and add patches for GL's new devices

Please choose MTK Mips and you will find MT300N-V2

@alzhao I want V1. GL.Inet MT300N target is missing in openwrt tree. I built it for generic MT7620 board which installs on the router without error.

Not sure if that is the expected behavior?

Hi. OP and thread is V2. I am posting about V2.

I have been using lede-1701 to compile firmware and have bugs with various packages e.g.: curl library has known bug Prng cannot seed

issues with wifi in luci - wifi not configurable as it is not registered

issues with ubus call functions failing on wifi

@aaronsinclair, will have a better guide for MT300-V2 asap.

@alzhao and the image builder please.

Imagebuilder is here. I think you can compile a firmware easily

Thank you, image builder works and produces an image.

Is there a recovery procedure for MT300N-v2 on bad flash?

Yes, you can use uboot failsafe web UI. It is the same as our other routers.

So I’ve finally received my v2 and making a default image without any customizations (make image profile=mt300nv2) produces a file (lede-ramips-mt7628-gl-mt300n-v2-squashfs-sysupgrade.bin) which when flashed onto v2 unit results in a boot loop – the v2 tries to start up and then reboots.


I’m thinking something’s amiss in the image builder you’ve posted, could you please clarify.

Please include the wifi driver kmod-mt7628 as said in 404 Page not found - GL.iNet

Thank you, that works!

Oops, spoke too soon. I have re-downloaded the image builder posted on August 11th, however I’m still getting errors starting wifi:

root@mt300nv2:~# wifi

/sbin/wifi: eval: line 1: uci2dat: not found

killall: ap_client: no process killed

/sbin/wifi: eval: line 1: uci2dat: not found

killall: 8021xd: no process killed

uci: Entry not found


WiFi is not working properly, it starts with the LEDE ssid (instead of the SSID I’ve set).


Please include package uci2dat, mtk-iwinfo as well

That did the trick, thank you.