[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 Sep 19, 2024 22:20    Post subject: Reply with quote
Luckily, I realised my plan was flawed before going ahead as I needed OpenWRT to be able to restore the U-boot variables.

Still, I was able to test something but I had to flash with mtd from OpenWRT

- Linksys on kernel and OpenWRT on alt_kernel
- From OpenWRT, set partbootargs to
Code:
init=/sbin/init rootfstype=squashfs ubi.mtd=22,2048 ubi.block=0,0 root=/dev/ubiblock0_0 rootwait ro mtdparts=qcom_nand.0:0x100000@0x0(sbl1),0x100000@0x100000(mibib),0x80000@0x200000(bootconfig),0x80000@0x280000(bootconfig1),0x300000@0x300000(qsee),0x300000@0x600000(qsee_1),0x80000@0x900000(devcfg),0x80000@0x980000(devcfg_1),0x80000@0xa00000(apdp),0x80000@0xa80000(apdp_1),0x80000@0xb00000(rpm),0x80000@0xb80000(rpm_1),0x80000@0xc00000(cdt),0x80000@0xc80000(cdt_1),0x80000@0xd00000(appsblenv),0x100000@0xd80000(appsbl),0x100000@0xe80000(appsbl_1),0x80000@0xf80000(art),0x40000@0x1000000(u_env),0x20000@0x1040000(s_env),0x20000@0x1060000(devinfo),0x9600000@0x1080000(linux),0x9000000@0x1680000(rootfs),0x9500000@0xa680000(linux2),0x8f00000@0xac80000(alt_rootfs),0x100000@0x13b80000(nvram),0x200000@0x13c80000(sysdiag),0x80000@0x13e80000(ethphyfw),0xb800000@0x13f00000(ddwrt),0x900000@0x1f700000(wififw)

- Flashed DD-WRT 08-30-2024-r58244 onto kernel with mtd
- Switched boot partition to kernel
- No DHCP and no access to router

I did some calculations with the hex values and I believe the reg value for nvram on ipq8174-mx4200.dtsi was meant to be 0x13b80000. Hopefully we'll get some feedback about that at some point.
Sponsor
kernel-panic69
DD-WRT Guru


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

PostPosted: Thu Sep 19, 2024 22:58    Post subject: Reply with quote
Since there's been no reply to my email, I went ahead and created a PR on GitHub to hopefully further garner attention. The thing is, that file affects BOTH versions of this router, not just the v2. So how his v1 is even working, I don't know unless there's a missing commit, but again, it would be fixed in an alpha test build...
_________________
"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 Sep 20, 2024 10:30    Post subject: Reply with quote
Thanks. I thought that using GitHub to send PRs was some sort of modern sacrilege in this project.

I still don't know what to make of this finding and whether it will be the fix that I need or it will be something else. Not being able to build your own firmware is a bit frustrating when you want to try different things and to contribute. But never mind, it's more of a hobby than anything else.
kernel-panic69
DD-WRT Guru


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

PostPosted: Fri Sep 20, 2024 14:17    Post subject: Reply with quote
All I can say at the moment is test today's release and report back. I don't know if the "fix typo" in driver repository log @ https://svn.dd-wrt.com/changeset/58385 was to fix the problem or not.

https://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2024/09-20-2024-r58389/linksys-mx4200-v2/

_________________
"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 Sep 20, 2024 14:56    Post subject: Reply with quote
Yes, I saw there was a new version (09-20-2024-r58389) a bit earlier and tried it. Same, router doesn't boot.
kernel-panic69
DD-WRT Guru


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

PostPosted: Fri Sep 20, 2024 15:33    Post subject: Reply with quote
Thanks for the update. "And so we wait" per the usual Modus Operandi.
_________________
"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
di@mond
DD-WRT Novice


Joined: 18 Mar 2007
Posts: 19

PostPosted: Fri Sep 20, 2024 18:26    Post subject: Reply with quote
Hi guys. Ive also had troubles flashing the v2 (SPNMX42)
I decided to try again today after reading this post. Trying build number 08-30-2024-r58244 reported working on the post below, results in a faild boot. Led light stays BLUE.

https://forum.dd-wrt.com/phpBB2/viewtopic.php?t=337280

Attached is the serial logs. Hope it can help resolve the issue.

The first log is a stock boot from factory reset.
The second was taken as the device was being flashed with ddwrt and the other is on a reboot with the failed flash.

Hope it helps.



Serail while boot 58244.txt
 Description:

Download
 Filename:  Serail while boot 58244.txt
 Filesize:  48.56 KB
 Downloaded:  6 Time(s)


Serial While Flashing 58244.txt
 Description:

Download
 Filename:  Serial While Flashing 58244.txt
 Filesize:  52.24 KB
 Downloaded:  6 Time(s)


ax4200 serial log StockFW.txt
 Description:

Download
 Filename:  ax4200 serial log StockFW.txt
 Filesize:  36.55 KB
 Downloaded:  5 Time(s)

kernel-panic69
DD-WRT Guru


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

PostPosted: Fri Sep 20, 2024 18:50    Post subject: Reply with quote
Thanks for the confirmation, PR has already been submitted, and I just sent another reply in email regarding this.
_________________
"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 Sep 20, 2024 18:56    Post subject: Reply with quote
So comparing the two serial logs we now have to the .dtsi file, looks like we have several typos, starting at the nvram address.

Everything matches correctly in the following mtds.
Code:

0x000000000000-0x000000100000 : "0:SBL1"
0x000000100000-0x000000200000 : "0:MIBIB"
0x000000200000-0x000000280000 : "0:BOOTCONFIG"
0x000000280000-0x000000300000 : "0:BOOTCONFIG1"
0x000000300000-0x000000600000 : "0:QSEE"
0x000000600000-0x000000900000 : "0:QSEE_1"
0x000000900000-0x000000980000 : "0:DEVCFG"
0x000000980000-0x000000a00000 : "0:DEVCFG_1"
0x000000a00000-0x000000a80000 : "0:APDP"
0x000000a80000-0x000000b00000 : "0:APDP_1"
0x000000b00000-0x000000b80000 : "0:RPM"
0x000000b80000-0x000000c00000 : "0:RPM_1"
0x000000c00000-0x000000c80000 : "0:CDT"
0x000000c80000-0x000000d00000 : "0:CDT_1"
0x000000d00000-0x000000d80000 : "0:APPSBLENV"
0x000000d80000-0x000000e80000 : "0:APPSBL"
0x000000e80000-0x000000f80000 : "0:APPSBL_1"
0x000000f80000-0x000001000000 : "0:ART"
0x000001000000-0x000001040000 : "u_env"
0x000001040000-0x000001060000 : "s_env"
0x000001060000-0x000001080000 : "devinfo"
0x000001080000-0x00000a680000 : "kernel"
0x000001680000-0x00000a680000 : "rootfs"
mtd: setting mtd22 (rootfs) as root device
mtdsplit: no squashfs found in "rootfs"
0x00000a680000-0x000013c80000 : "alt_kernel"
0x00000ac80000-0x000013c80000 : "alt_rootfs"

And here is where they become distorted:
Code:

0x000013c80000-0x000013e80000 : "sysdiag"        <-- THIS ADDRESS SHOULD BE NVRAM. 13c80000
0x000013e80000-0x000013f00000 : "0:ETHPHYFW"     WHICH BREAKS EVERYTHING BELOW THIS INCLUDING THE MISSING
0x000013f00000-0x00001f700000 : "syscfg"         DD-WRT PARTITION
0x00001f700000-0x000020000000 : "0:WIFIFW"


ipq8174-mx4200.dtsi code:
Code:

         };
         partition@13b80000 {
            label = "nvram";
            reg = <0x12b80000 0x100000>;
         };

         partition@13c80000 {
            label = "sysdiag";
            reg = <0x13c80000 0x200000>;
            read-only;
         };
         partition@13e80000 {
            label = "ethphyfw";
            reg = <0x13e80000 0x80000>;
            read-only;
         };
         partition@13f00000 {
            label = "ddwrt";
            reg = <0x13f00000 0xb800000>;
         };
         partition@1f700000 {
            label = "wififw";
            reg = <0x1f700000 0x900000>;
            read-only;


So it appears all the addresses including nvram and below is just plain wrong.

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


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

PostPosted: Fri Sep 20, 2024 20:50    Post subject: Reply with quote
That, or altkernel and altrootfs end at the wrong point. Either way we're still waiting for word back from the top of the food chain. FWIW, this is the file for OpenWRT:

https://git.openwrt.org/openwrt/openwrt.git/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi

_________________
"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: Sat Sep 21, 2024 22:37    Post subject: Reply with quote
Attached is a diff file of OpenWRT's target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi and DD-WRT's src/linux/universal/linux-6.6-nss/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi

I am assuming that the builds available to download are linux-6.6-nss

Changes are:

- a new include file (ipq8074-nss.dtsi)
- different boot arguments appended
- changes on partitions as we have seen
- changes to port labels

The boot arguments could be at play here too.

@lexridge looking at the differences between the dtsi files I don't arrive at the same conclusion re the cascade errors.

The reg values of alt_kernel and alt_rootfs are originally <0xa680000 0x9600000> and <0xac80000 0x9000000> thus ending at 0x13c80000 (they overlap, that's Linksys' doing). They become <0xa680000 0x9500000> and <0xac80000 0x8f00000> thus ending at 0x13b80000. That creates 1MB of space for the nvram. Then comes what we believe is a typo and the reg value of nvram should be <0x13b80000 0x100000> instead of <0x12b80000 0x100000>.

The following partitions are the same until we arrive at syscfg. That is originally <0x13f00000 0xb800000> ending at 0x1f000000. It becomes <0x13f00000 0xb100000> ending at 0x1f000000 and freeing 7MB for the oops partition which is <0x1f000000 0x700000> ending at 0x1f700000 as it should.

So, apart from the typo in nvram, everything else seems fine to me. I don't know enough to comment on how safe it is to take space on existing partitions. I imagine that these have a lot more than it's needed and taking a small portion of their end is fine.



ipq8174-mx4200.dtsi.txt
 Description:
ipq8174-mx4200.dtsi.txt

Download
 Filename:  ipq8174-mx4200.dtsi.txt
 Filesize:  4.73 KB
 Downloaded:  2 Time(s)

TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Sat Oct 12, 2024 9:04    Post subject: Reply with quote
The issue with nvram has been fixed on #58542.

I opened ticket #7792 and managed to get the attention of the developer on another forum. I promise I am not stalking him, we just happened to end up commenting in the same post Laughing.

I tested the previous builds but no joy. I'll see when the next one comes out hopping that the nvram offset fix leads to a bootable router. It'd be great if someone with UART access tests the next one too. At least the spamming 'cannot open /dev/nvram' should go but we may come to the next hurdle. Hopefully not!
kernel-panic69
DD-WRT Guru


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

PostPosted: Sat Oct 12, 2024 14:11    Post subject: Reply with quote
You had help. I had already emailed him and submitted a PR on github and after I saw your ticket, I replied to previous email(s) linking the ticket. I'm sure others may have also emailed him.
_________________
"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: Sun Oct 13, 2024 19:11    Post subject: Reply with quote
@TopMandolin
Here is the Alpha build with the mtd fix, if you want to give it a try. Hopefully this finally fixes the issue you were having.



dd-wrt-webflash-mx4200-v2-r58545.bin
 Description:

Download
 Filename:  dd-wrt-webflash-mx4200-v2-r58545.bin
 Filesize:  72.63 MB
 Downloaded:  2 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
kernel-panic69
DD-WRT Guru


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

PostPosted: Sun Oct 13, 2024 20:07    Post subject: Reply with quote
Uhm. Need the factory-to-ddwrt.img file, too.


factory-to-ddwrt-mx4200-v2-r58545.img
 Description:

Download
 Filename:  factory-to-ddwrt-mx4200-v2-r58545.img
 Filesize:  31.75 MB
 Downloaded:  1 Time(s)


_________________
"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
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Display posts from previous:    Page 4 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