MT300Nv2 questions, building firmware

First, the product page says it has an MT7628NN but I can’t find that suffix, only the 7628N. Is that a typo?

I want to run in switched mode but I want to intercept a DHCP reply to hosts on one side and replace the
DNS with a different one. In other words I will have a second wireless net which uses a different DNS even
though I let the IP allocation pass through.
I can look at the processes running on the MT300 and take a stab at figuring out which one is doing the
packet filtering in non-routing mode, if any, or I can add packet filtering I suppose.

I have the cross compiling setup and have done that before but what I don’t have is the collection of
features that exists in the current factory build so I could do the baby step of creating a duplicate image
for checking the process. What I got was just the OpenWRT Imagebuilder and I see the target 7628 and was planning on making the benign assumption that I could use that target for the “NN” or “N” chip that is in the MT300. Once I am satisfied that I can build the factory firmware I can start trying to tackle my actual
problem in context.
The other possibility I suppose is to build a feature set out of generic components but that would not
for instance support the push button and who knows what else.

The build target looks like so:

So you select in make menuconfig ramips target mt76x8

Thanks Johnex for that reference. I am studying the OWRT build docs now.

OK (Johnex?) I have a new question. I used a python code to unpack that file and didn’t find any filesystem stuff in there. I think that a running MT300 from the mfr has configuration files in it but they don’t seem to be in the uboot .bin file.

That would seem to imply that uboot doesn’t tinker with the filesystem but if your router is bricked because of a bad file somewhere how do you restore the factory files? Thanks in advance to Johnex or whomever…

OK, got to the build menu and picked a few items but not sure after the profile whether any other stuff should be checked. So I knew what to do for the first
three but uncertain at the squashfs size and after that. There were items flagged as “new”. Which ones are in the GL build? I have no idea. Plus my previous question applies about the config files.

It is 7628N. There are some minor version numbers but this doesn’t affect the firmware.

I cannot actually know what is your question now.

You can just use openwrt to compile a firmware for mt300n-v2. Choose ramips->7628 then find mt300n-v2

Are you sure you did it correctly?
Using 7Zip on windows, with the shell menu enabled, right clicking on the firmware bin file i could extract the entire thing, and all the configuration files are there too :slight_smile:

Hi Johnex,

I see that is true. In manjaro the ‘file’ command says that file is a uboot archive or something like that and indeed the python script finds the uboot header but does not unpack the rest of it. I have not yet tried to
compare the results of my build with the .bin

I’m pretty sure I executed the build correctly but when it came time to set the options I had to take the defaults after setting the profile. So we will see. I have a dual boot machine and Im in windows now but
when I go back I’ll check. BTW it looks very much like I will have to write kernel code to get my thing done because I don’t think iptables has the flexibility for what I’m doing. I’d prefer a dynamically loaded module to
a firmware build anyway so I need to find out if that is possible.

OK I see that all that stuff is there in my bin file which is interesting. I poked around and found some of it in:


I wonder why it is not lower in the directory hierarchy since there are a variety of different vendor items below that. Anyway I don’t need to know.

Also interesting is that 7zip “sees through” whatever uboot infrastructure there is in the .bin file. I’ve noticed that some compression utilities have more understanding than others about file formats.