So if that firmware is not booting without `mtdparts` in the cmdline on my device, it's a strong indication that the OEM device will have `partbootargs(2)` set the same way, but it's not confirmed as it would be by checking it on an actual OEM MX4200v2. There will be small differences here and there between OEM and the many SPNMX42 available for ISPs, and amongst them as well: https://support.linksys.com/kb/section/183/
But the point, and where the focus should be, is that customised or not, mtdparts in the cmdline can be ignored/parsed as it's done in OpenWRT. The many other logs available show that it's not something exclusive to my device and they are all booting. If the way that works is difficult to implement in DD-WRT, or can't be done, or the developer doesn't want to do it, that'd be another story which I wouldn't dare to argue.
Re U-boot;
Code:
~# fw_printenv boot_ver
boot_ver=1.0.03
It's an environment variable but you would think it's accurate.
Since cmdlinepart partitions doesn't contain nvram, it's not going to find it. And neither is going to find the others that DD-WRT is expecting e.g. linux, linux2 and so on. The question is why it uses cmdlinepart partitions instead of 'fixed-partitions' and if that can be changed.
All right, so finding the culprit was a lot easier than I thought.
MTD_CMDLINE_PARTS
Allow generic configuration of the MTD partition tables via the kernel
command line. Multiple flash resources are supported for hardware where
different kinds of flash memory are available.
On OpenWRT, it's not enabled on their generic target which is the base for the kernel config options, nor in that of their qualcommax target which comprises the MX4200v2 amongst many others.
So basically, it's not that OpenWRT is actively doing anything but, by not enabling the driver that would parse mtdparts, it's being ignored.
I imagine that MTD_CMDLINE_PARTS is set to =y on DD-WRT. svn.dd-wrt.com is kaput at the moment so I can't see a thing. If that's needed by other targets or not and whether it can be disabled for the MX4200v2 will determine if `partbootargs(2)` can contain `mtdparts` and boot DD-WRT while co-existing with OEM, or if someone needs to flash OEM back for whatever reason.
At least I hope I've made BrainSlayer's job a bit easier narrowing down what's likely the issue.
I thought about that later, but I needed some time to cross check something.
ipq806x is another family of targets. It'd be ipq60xx which is part of the same family. I don't find ipq807x or similar in DD-WRT and this seems to corroborate that the mx4200 is classed under ipq60xx:
There is no reference to MTD_CMDLINE_PARTS in either of those but I believe they are additional to the main configuration for the target family which it's possibly .config_ipq6018 and it includes it:
The fact that there are some specific configs for mx4200 makes me hopeful that it will be possible to set MTD_CMDLINE_PARTS to =n there and overwrite the default configuration for the target family, without affecting any other device.
From a more theoretical point of view, I don't see how this driver would be of any use for DD-WRT as a whole with the project being so 'aggressive' in the configuration of the partition layout via DTS files e.g. adding partitions, renaming them and so on. The second mtdparts pops up in the cmdline, all those customisations are thrown out of the window and the system won't be bootable. It may be needed by some targets, I guess, but I would think that the default is the opposite.
ipq806x is another family of targets. It'd be ipq60xx which is part of the same family. I don't find ipq807x or similar in DD-WRT and this seems to corroborate that the mx4200 is classed under ipq60xx:
This router is most definitely not part of the ipq60xx family. I have a mr7350 which is and they are nothing alike. I am pretty sure your first discovery is correct. I think you went down the rabbit hole a bit too far. _________________ - Linksys EA8500: I-Gateway, WAP/VAP 5ghz only. Features: VLANs, Samba, WG, Entware - r60xxx
- Linksys EA8500: 802.11s Secondary w/VLAN Trunk over 5ghz - r60xxx
- Linksys MX4300: 802.11s Primary w/VLAN Trunk over 5ghz. 2.4ghz WAP/VAP only - r60xxx
- Linksys MX4300: (WAP/VAP (7)) Multiple VLANs over single trunk port. Entware/Samba r60xxx
- Linksys MR7350: WDS Station for extended Ethernet r60xxx
- Linksys MR7500, MX8500: None in production. Just testing. r60xxx
- OSes: Fedora 40, 10 RPis (2,3,4,5), 23 ESP8266s: Straight from Amiga to Linux in '95, never having owned a Windows PC.
- Forum member #248
Numbering is misleading. IPQ8074 comes in 3 families:
* IPQ8070A/IPQ8071A (Acorn) up to 1.4GHz
* IPQ8172/IPQ8173/IPQ8174 (Oak) up to 1.4GHz
* IPQ8072A/IPQ8074A/IPQ8076A/IPQ8078A (Hawkeye) up to 2.2GHz
I believe the Oak family was introduced later, by which time ipq807x was already established.
I didn't use the correct term when I said ipq60xx is part of the same family as ipq807x. They are both part of Qualcomm's AX WiSoCs together with ipq50xx, which are different from ipq806x.
I was looking for ipq807x somewhere in DD-WRT but when I found 'src/router/configs/ipq60xx/.config_mx4200' and 'src/router/configs/ipq60xx/.config_mx4200_preflash/', I imagined that the developer had kept ipq807x under ipq60xx.
It doesn't really matter anyway. He'll know very well where the config for mx4200 lives.
First and foremost, thank you for your continued efforts passing our feedback.
While I don't know for sure, I would tend to agree that this issue likely only affects a subset of devices. However, a few points are equally valid:
1. The kernel driver MTD_CMDLINE_PARTS serves absolute no purpose on the MX4200 v1 or v2 (any device using it?). Leaving it enabled benefits absolutely no one and prevents a subset of devices from booting DD-WRT.
2. To date, nobody with the MX4200v2 has posted logs of DD-WRT booting as it is. On the contrary, we have logs that show the partition table that DD-WRT is trying to use is what U-boot passed using mtdparts which is never going to work. I only managed to boot DD-WRT after editing partbootargs and those are the only logs of a successful boot that I am aware of on a MX4200v2.
3. I have not being able to boot OEM firmware, as in the actual firmware distributed by Linksys for their OEM MX4200v2 without mtdparts. I will test this again. It is important to note that the MX4200v1 uses a different firmware so it is risky to draw conclusions about the v2 (OEM or ISP) if you own and test on a v1 because they don't even run the same OEM firmware.
These are just comments for anybody coming across this post while looking for information about their MX4200v2 not booting DD-WRT when it's in principle supported.
I don't want to argue or debate whatever decision the developers of the project eventually make in this regard. I know what I have to change to boot DD-WRT and if I don't like doing that, it's up to me to use something else so it's all cool.
Joined: 06 Jun 2006 Posts: 7750 Location: Dresden, Germany
Posted: Wed Oct 23, 2024 12:04 Post subject:
di@mond wrote:
last log attached
*EDIT*
added Stock FW to r58568
looks like you modified the kernel commandline in uboot env. is overrides the mtd partition layout and is not the case for the default uboot environment. look for all that mtdparts shit. this must be removed, then it will work _________________ "So you tried to use the computer and it started smoking? Sounds like a Mac to me.." - Louis Rossmann https://www.youtube.com/watch?v=eL_5YDRWqGE&t=60s
It's the same for katon888, di@mond and myself. These are not user modifications. I still don't understand the purpose of the kernel driver MTD_CMDLINE_PARTS on these devices but never mind.