OpenWrt support for Linksys MX4200

@arix no new build in 3 weeks, all good with you?

Another thing I was wondering. In regards to flashing to another partition via wiki.

Now forgive me as I don't know much about this but does it not make more sense to do all this in ssh and never even touch SCP? i.e.

cd /tmp

wget "https://downloads.openwrt.org/releases/24.10.1/targets/qualcommax/ipq807x/openwrt-24.10.1-qualcommax-ipq807x-linksys_mx4200v2-squashfs-factory.bin"

mv "openwrt-24.10.1-qualcommax-ipq807x-linksys_mx4200v2-squashfs-factory.bin" "mx4200.bin"

[ "$(sha256sum mx4200.bin | awk '{print $1}')" == "54f61ec90aa0fe2d61b6d40230b7cc9f35965b6ef64c390ac548fd39fa4a48d4" ] && echo "Firmware check passed!" || echo "Firmware is corrupted, download it again!"

Then do the normal write as per wiki e.g:

mtd -r -e alt_kernel -n write mx4200.bin alt_kernel

The main advantage of this method is you get to make sure the checksum passed before flashing and a simple rename before you attempt flashing. I also guess you could just do sha256sum mx4200.bin and compare to the value on OpenWRT site but thought I would mention it.

I am NOT sure where you got that this will NOT boot. This is what I am doing ever since I owned MX4300. Whenever you flash sysupgrade, it updates the other partition and boots from it. If you retain the settings, then the settings are copied over to the other partition as well.

I used to build but gave up on it and rely on arix00's build now. So, I use his binaries and works very well.

If anyone is interested, here is a clean build for MX4300 from Qosimos latest changes to the 24.10-nss branch using his seeded config (which includes nss accelerated SQM) use at your own risk:

3 Likes

I see that arix00 has abandoned the builds as it hasn't been updated for a while now. Is it possible to do a sysupgrade from the official SNAPSHOT build without a RESET? Anyone tried it without a RESET?

Pretty sure I did this exact thing before (going from arix or another custom build straight to SNAPSHOT). It will most likely work but you'll have leftover, unused files on the device.

Someone please correct me if wrong.

1 Like

Very new here, hope I am following correctly. I just upgraded 2 MX4200 and 5 MX4300 from snapshots this weekend to 24.10 and had to use factory.bin, not sysupgrade (failed), from snapshots. Either from Linksys-CA or ssh. All worked nicely.

I ended up compiling NSS version from Qosmio directly. It's fairly easy. I had to take this route since I wanted to build in a few kmod packages that the other pre-compiled versions lack.

Can also flash pre-compiled NSS builds from here Qualcommax NSS Build - #4859 by AgustinLorenzo

I flashed the latest snapshot and luci interface isn't coming up. "luci" is already there in the package list. Any other package for luci?

need to click the "Request build" button, the links below it will get you files without luci.

1 Like

It says Installed Packages and that's why I didn't request the build. Now, I have to flash it from shell. For those who didn't include luci and flashed the snapshot build, ssh to router and run:

apk update

apk add luci
1 Like

https://openwrt.org/docs/guide-user/installation/sysupgrade.cli, or simply flash a stable release - https://firmware-selector.openwrt.org/?version=24.10.1, then you don't need to build anything.

Never mind. I added the luci package and all good now.

root@MX4300:~# apk update

root@MX4300:~# apk add luci
1 Like

great!

just keep in mind: https://openwrt.org/faq/cannot_satisfy_dependencies.

Notice that the initial "total" available memory on the OEM firmware is much smaller (436224K) vs OpenWrt (524288K), which means that on the OEM kernel, 88064K is reserved in advance. This makes the difference in reserved memory usage between the two firmwares closer to 49MiB, which might be typical for the more advanced kernel/OS requirements of OpenWrt. 4MiB of that can be directly tied to kernel requirements.

So going on the dmesg output alone, and not really knowing the internals of how the kernel allocates memory, I think the best base scenario is 45MiB freed up.

That being said, it is possible that the memory being reserved for qualcomm special functions is overallocating on 512MiB ram devices. I think it should be adjusting the following:

Best I can tell, that is not happening, and it is using the defaults from:

If my math is correct, that could free up another 41MiB of memory. If anyone else can provide insights, that would be helpful.

2 Likes

Sorry for not mentioning that in advance... it's in the online docs and elsewhere that pre-built SNAPSHOT images don't include Luci. If you use the firmware selector/image builder convenience site, you can see it will be built with Luci. Custom builds generally include it because everyone uses it.

2 Likes

Okay I think I know what is going on. Specifically in the Linksys MX4x00 support, there is a double #include that ends up overwriting the special parameters for 512M ram devices.

Both "ipq8074-512m.dtsi" and "ipq8174-mx4200.dtsi" ultimately include "ipq8074.dtsi", so "ipq8074-512m.dtsi" is effectively nullified. I'll have to spend a little more time testing though.

1 Like

I used the firmware builder openwrt website ONLY and see that luci was included in the build but it is NOT. You have to click the "Request Build" to include luci as the "Included Packages" fooled me. lol