[SOLVED] SPNMX42 (MX4200 v2) installation

Post new topic   Reply to topic    DD-WRT Forum Index -> Qualcomm Atheros based Hardware
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next
Author Message
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Thu Oct 17, 2024 19:49    Post subject: Reply with quote
I can't rule out customisation but I actually meant OEM when I said it, not the FW of the ISP. I tested the same FW that is running on OEM MX4200v2 which you can find here: https://support.linksys.com/kb/article/112-en/ and download here: https://downloads.linksys.com/support/assets/firmware/FW_MX4200_2.0.6.211172_prod.img

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.
Sponsor
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Thu Oct 17, 2024 19:57    Post subject: Reply with quote
Thank you di@mond.

As in the previous log:
Code:
[    1.062229] 29 cmdlinepart partitions found on MTD device qcom_nand.0
[    1.079423] Creating 29 MTD partitions on "qcom_nand.0":
[    1.086026] 0x000000000000-0x000000100000 : "0:SBL1"
[    1.092831] 0x000000100000-0x000000200000 : "0:MIBIB"
[    1.097786] 0x000000200000-0x000000280000 : "0:BOOTCONFIG"
[    1.102103] 0x000000280000-0x000000300000 : "0:BOOTCONFIG1"
[    1.107518] 0x000000300000-0x000000600000 : "0:QSEE"
[    1.115192] 0x000000600000-0x000000900000 : "0:QSEE_1"
[    1.120369] 0x000000900000-0x000000980000 : "0:DEVCFG"
[    1.123135] 0x000000980000-0x000000a00000 : "0:DEVCFG_1"
[    1.128234] 0x000000a00000-0x000000a80000 : "0:APDP"
[    1.133690] 0x000000a80000-0x000000b00000 : "0:APDP_1"
[    1.138634] 0x000000b00000-0x000000b80000 : "0:RPM"
[    1.143584] 0x000000b80000-0x000000c00000 : "0:RPM_1"
[    1.148351] 0x000000c00000-0x000000c80000 : "0:CDT"
[    1.153591] 0x000000c80000-0x000000d00000 : "0:CDT_1"
[    1.158262] 0x000000d00000-0x000000d80000 : "0:APPSBLENV"
[    1.163482] 0x000000d80000-0x000000e80000 : "0:APPSBL"
[    1.169313] 0x000000e80000-0x000000f80000 : "0:APPSBL_1"
[    1.174378] 0x000000f80000-0x000001000000 : "0:ART"
[    1.179383] 0x000001000000-0x000001040000 : "u_env"
[    1.183794] 0x000001040000-0x000001060000 : "s_env"
[    1.188479] 0x000001060000-0x000001080000 : "devinfo"
[    1.193361] 0x000001080000-0x00000a680000 : "kernel"
[    1.334612] 0x000001680000-0x00000a680000 : "rootfs"
[    1.465593] mtd: setting mtd22 (rootfs) as root device
[    1.465946] mtdsplit: no squashfs found in "rootfs"
[    1.469636] 0x00000a680000-0x000013c80000 : "alt_kernel"
[    1.610835] 0x00000ac80000-0x000013c80000 : "alt_rootfs"
[    1.741560] 0x000013c80000-0x000013e80000 : "sysdiag"
[    1.743755] 0x000013e80000-0x000013f00000 : "0:ETHPHYFW"
[    1.746405] 0x000013f00000-0x00001f700000 : "syscfg"
[    1.918352] 0x00001f700000-0x000020000000 : "0:WIFIFW"

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.
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Thu Oct 17, 2024 21:37    Post subject: Reply with quote
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.

https://github.com/torvalds/linux/blob/master/drivers/mtd/parsers/Kconfig#L28

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.

https://github.com/openwrt/openwrt/blob/main/target/linux/generic/config-6.6#L3665
https://github.com/openwrt/openwrt/blob/main/target/linux/qualcommax/config-6.6

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.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16703
Location: Texas, USA

PostPosted: Thu Oct 17, 2024 22:29    Post subject: Reply with quote
SVN isn't the only way to find out. Thanks for the info, going to forward this.

https://github.com/mirror/dd-wrt/blob/master/src/linux/universal/linux-6.6-nss/.config_ipq806x#L1572

https://github.com/mirror/dd-wrt/blob/master/src/linux/universal/linux-6.6/.config_ipq806x#L1572

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Fri Oct 18, 2024 12:12    Post subject: Reply with quote
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:

https://github.com/mirror/dd-wrt/blob/master/src/router/configs/ipq60xx/.config_mx4200
https://github.com/mirror/dd-wrt/blob/master/src/router/configs/ipq60xx/.config_mx4200_preflash

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:

https://github.com/mirror/dd-wrt/blob/master/src/linux/universal/linux-6.6-nss/.config_ipq6018#L1715

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.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16703
Location: Texas, USA

PostPosted: Fri Oct 18, 2024 15:53    Post subject: Reply with quote
I guess I didn't go _that_ far, but talk about not making sense:

https://wikidevi.wi-cat.ru/Linksys_MX4200
Quote:
CPU1: Qualcomm IPQ8174 (1.4 GHz, 4 cores)

Anyhow, no response, no commit activity, so I'm not going to sledgehammer the button.

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2152
Location: WV, USA

PostPosted: Fri Oct 18, 2024 16:29    Post subject: Reply with quote
TopMandolin wrote:
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
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Fri Oct 18, 2024 17:52    Post subject: Reply with quote
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.

You can see it all clearer here:

https://github.com/openwrt/openwrt/tree/main/target/linux/qualcommax (includes ipq60xx and ipq807x as subtargets)
https://github.com/openwrt/openwrt/tree/main/target/linux/ipq806x
https://github.com/openwrt/openwrt/commit/f02f6aaa8d4e1025ab4aa9f569123e57f689f4e5

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.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16703
Location: Texas, USA

PostPosted: Tue Oct 22, 2024 21:33    Post subject: Reply with quote
The response I finally found (it was sent to one address, not both) from this morning gives me the impression that this problem is strictly with your branded device. I've just now replied with a link to your ticket.
_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Wed Oct 23, 2024 10:27    Post subject: Reply with quote
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.
BrainSlayer
Site Admin


Joined: 06 Jun 2006
Posts: 7750
Location: Dresden, Germany

PostPosted: Wed Oct 23, 2024 12:04    Post subject: Reply with quote
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
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Wed Oct 23, 2024 12:14    Post subject: Reply with quote
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.
kernel-panic69
DD-WRT Guru


Joined: 08 May 2018
Posts: 16703
Location: Texas, USA

PostPosted: Wed Oct 23, 2024 16:40    Post subject: Reply with quote
The following commit will require testing a future release (there is no alpha test images at the time of this post):

https://svn.dd-wrt.com/changeset/58605

_________________
"Life is but a fleeting moment, a vapor that vanishes quickly; All is vanity"
Contribute To DD-WRT
Pogo - A minimal level of ability is expected and needed...
RSS feed for DD-WRT releases (2025)
RSS feed for DD-WRT releases (2024)
RSS feed for DD-WRT releases (2023)

----------------------
Linux User #377467 counter.li.org / linuxcounter.net
lexridge
DD-WRT Guru


Joined: 07 Jun 2006
Posts: 2152
Location: WV, USA

PostPosted: Mon Oct 28, 2024 16:24    Post subject: Reply with quote
@TopMandolin Here is the latest alpha release which will hopefully finally fix your mtd issues. Please test and report back.


dd-wrt-webflash-mx4200-v2-r58609-alpha.bin
 Description:

Download
 Filename:  dd-wrt-webflash-mx4200-v2-r58609-alpha.bin
 Filesize:  67.75 MB
 Downloaded:  5 Time(s)


factory-to-ddwrt-mx4200-v2-r58609-alpha.img
 Description:

Download
 Filename:  factory-to-ddwrt-mx4200-v2-r58609-alpha.img
 Filesize:  31.5 MB
 Downloaded:  8 Time(s)


_________________
- 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
di@mond
DD-WRT Novice


Joined: 18 Mar 2007
Posts: 19

PostPosted: Mon Oct 28, 2024 19:41    Post subject: Reply with quote
Works Very Happy

Thanks guys



Flashed straight from StarHub Firmware.
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Display posts from previous:    Page 6 of 7
Post new topic   Reply to topic    DD-WRT Forum Index -> Qualcomm Atheros based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum