[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
lexridge
DD-WRT Guru


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

PostPosted: Mon Sep 16, 2024 14:38    Post subject: Reply with quote
katon888 wrote:
I would like to share the info which might be related:

Would you mind posting your complete serial log please so I can send it to the developer.

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


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

PostPosted: Mon Sep 16, 2024 18:42    Post subject: Reply with quote
Yes, redacted or incomplete information is not helpful, and sharing it in this thread would be ideal. Please do so.
_________________
"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: Tue Sep 17, 2024 11:58    Post subject: Reply with quote
Re MACs, OpenWRT corrects them for MX4200v2 using information from the devinfo partition.
But the router would boot before that was fixed anyway.

Initially solved here. Later on, a more sophisticated solution was added here (ignore the bits about removing regdomain, that's another issue altogether).

The error that katon888 reports about /dev/nvram seems related to what I mentioned earlier, the changes introduced here on the partitions on ipq8174-mx4200.dtsi. nvram is a partition that didn't exist on the original dtsi file and that is not a trivial change like the labels and more likely to be the problem.

But without serial logs (what a wasted opportunity to get them!) or input from the developer it's all an educated guess.

EDIT: there were issues on the MX4200v2 with the MAC of the switch (all 4 ports share the same, including WAN) and the BSSIDs of the 3 radios.
TopMandolin
DD-WRT Novice


Joined: 12 Sep 2024
Posts: 38

PostPosted: Tue Sep 17, 2024 14:10    Post subject: Reply with quote
Maybe not a problem but worth asking. Is it normal to have a mismatch on partition@... and reg?

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


partition@13b80000 but reg = <0x12b80000...
lexridge
DD-WRT Guru


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

PostPosted: Tue Sep 17, 2024 15:32    Post subject: Reply with quote
TopMandolin wrote:
Maybe not a problem but worth asking. Is it normal to have a mismatch on partition@... and reg?

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


partition@13b80000 but reg = <0x12b80000...


This definitely looks to be a typo. Good find. All the other partitions and regs do match. @kernel-panic69 Any thoughts on this?

_________________
- 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: 16703
Location: Texas, USA

PostPosted: Tue Sep 17, 2024 16:08    Post subject: Reply with quote
First thought is link the file with line number, preferably on github since Trac is acting up because there's no mind melding going on around here. Going to forward this up the food chain.

https://github.com/mirror/dd-wrt/blob/master/src/linux/universal/linux-6.6/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi#L293

_________________
"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: Tue Sep 17, 2024 21:51    Post subject: Reply with quote
Same here for completeness:

https://github.com/mirror/dd-wrt/blob/master/src/linux/universal/linux-6.6-nss/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi#L293
kernel-panic69
DD-WRT Guru


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

PostPosted: Tue Sep 17, 2024 22:09    Post subject: Reply with quote
The point was, trying to view anything on Trac / SVN earlier was useless. It was a whole lot of "ERR_TIMED_OUT." Now that it is navigable, "for completeness":

https://svn.dd-wrt.com/browser/src/linux/universal/linux-6.6/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi#L293

https://svn.dd-wrt.com/browser/src/linux/universal/linux-6.6-nss/arch/arm64/boot/dts/qcom/ipq8174-mx4200.dtsi#L293

_________________
"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
katon888
DD-WRT Novice


Joined: 16 Sep 2024
Posts: 3

PostPosted: Wed Sep 18, 2024 8:39    Post subject: Reply with quote
lexridge wrote:
katon888 wrote:
I would like to share the info which might be related:

Would you mind posting your complete serial log please so I can send it to the developer.


here's the serial log during boot, with "cannot open /dev/nvram" spamming



20240913_r58381_MX4200v2_bootlog.txt
 Description:

Download
 Filename:  20240913_r58381_MX4200v2_bootlog.txt
 Filesize:  83.15 KB
 Downloaded:  9 Time(s)

lexridge
DD-WRT Guru


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

PostPosted: Wed Sep 18, 2024 14:49    Post subject: Reply with quote
Thank you for posting this.

There are some other odd things in this log besides no nvram. It looks more like an openwrt mtd layout. No linux or linux2 partitions. We have kernel and alt_kernel instead.

_________________
- 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: Thu Sep 19, 2024 15:32    Post subject: Reply with quote
I think the mtd partitions come from U-Boot environment variables but I may be wrong.
Code:
bootcmd=if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi

Code:
bootpart1=set bootargs $partbootargs && nand read $loadaddr $prikern $kernsize && bootm $loadaddr

Code:
partbootargs=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(0:SBL1),0x100000@0x100000(0:MIBIB),0x80000@0x200000(0:BOOTCONFIG),0x80000@0x280000(0:BOOTCONFIG1),0x300000@0x300000(0:QSEE),0x300000@0x600000(0:QSEE_1),0x80000@0x900000(0:DEVCFG),0x80000@0x980000(0:DEVCFG_1),0x80000@0xa00000(0:APDP),0x80000@0xa80000(0:APDP_1),0x80000@0xb00000(0:RPM),0x80000@0xb80000(0:RPM_1),0x80000@0xc00000(0:CDT),0x80000@0xc80000(0:CDT_1),0x80000@0xd00000(0:APPSBLENV),0x100000@0xd80000(0:APPSBL),0x100000@0xe80000(0:APPSBL_1),0x80000@0xf80000(0:ART),0x40000@0x1000000(u_env),0x20000@0x1040000(s_env),0x20000@0x1060000(devinfo),0x9600000@0x1080000(kernel),0x9000000@0x1680000(rootfs),0x9600000@0xa680000(alt_kernel),0x9000000@0xac80000(alt_rootfs),0x200000@0x13c80000(sysdiag),0x80000@0x13e80000(0:ETHPHYFW),0xb800000@0x13f00000(syscfg),0x900000@0x1f700000(0:WIFIFW)

Note that mtdparts is not a variable. It's part of partbootargs.

The kernel command line becomes;
Code:
init=/sbin/init rootfstype=squashfs ubi.mtd=24,2048 ubi.block=0,0 root=/dev/ubiblock0_0 rootwait ro mtdparts=qcom_nand.0:0x100000@0x0(0:SBL1),0x100000@0x100000(0:MIBIB),0x80000@0x200000(0:BOOTCONFIG),0x80000@0x280000(0:BOOTCONFIG1),0x300000@0x300000(0:QSEE),0x300000@0x600000(0:QSEE_1),0x80000@0x900000(0:DEVCFG),0x80000@0x980000(0:DEVCFG_1),0x80000@0xa00000(0:APDP),0x80000@0xa80000(0:APDP_1),0x80000@0xb00000(0:RPM),0x80000@0xb80000(0:RPM_1),0x80000@0xc00000(0:CDT),0x80000@0xc80000(0:CDT_1),0x80000@0xd00000(0:APPSBLENV),0x100000@0xd80000(0:APPSBL),0x100000@0xe80000(0:APPSBL_1),0x80000@0xf80000(0:ART),0x40000@0x1000000(u_env),0x20000@0x1040000(s_env),0x20000@0x1060000(devinfo),0x9600000@0x1080000(kernel),0x9000000@0x1680000(rootfs),0x9600000@0xa680000(alt_kernel),0x9000000@0xac80000(alt_rootfs),0x200000@0x13c80000(sysdiag),0x80000@0x13e80000(0:ETHPHYFW),0xb800000@0x13f00000(syscfg),0x900000@0x1f700000(0:WIFIFW) root=/dev/ubiblock0_0

of which;
Code:
mtdparts=qcom_nand.0:0x100000@0x0(0:SBL1),0x100000@0x100000(0:MIBIB),0x80000@0x200000(0:BOOTCONFIG),0x80000@0x280000(0:BOOTCONFIG1),0x300000@0x300000(0:QSEE),0x300000@0x600000(0:QSEE_1),0x80000@0x900000(0:DEVCFG),0x80000@0x980000(0:DEVCFG_1),0x80000@0xa00000(0:APDP),0x80000@0xa80000(0:APDP_1),0x80000@0xb00000(0:RPM),0x80000@0xb80000(0:RPM_1),0x80000@0xc00000(0:CDT),0x80000@0xc80000(0:CDT_1),0x80000@0xd00000(0:APPSBLENV),0x100000@0xd80000(0:APPSBL),0x100000@0xe80000(0:APPSBL_1),0x80000@0xf80000(0:ART),0x40000@0x1000000(u_env),0x20000@0x1040000(s_env),0x20000@0x1060000(devinfo),0x9600000@0x1080000(kernel),0x9000000@0x1680000(rootfs),0x9600000@0xa680000(alt_kernel),0x9000000@0xac80000(alt_rootfs),0x200000@0x13c80000(sysdiag),0x80000@0x13e80000(0:ETHPHYFW),0xb800000@0x13f00000(syscfg),0x900000@0x1f700000(0:WIFIFW)

is passed to user space.

NOTE: I obtained this info from OpenWRT



dmesg.txt
 Description:
Output of dmesg from OpenWRT on MX4200v2

Download
 Filename:  dmesg.txt
 Filesize:  24.29 KB
 Downloaded:  0 Time(s)


fw_printenv.txt
 Description:
Output of fw_printenv from OpenWRT on MX4200v2

Download
 Filename:  fw_printenv.txt
 Filesize:  4.26 KB
 Downloaded:  0 Time(s)

lexridge
DD-WRT Guru


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

PostPosted: Thu Sep 19, 2024 16:06    Post subject: Reply with quote
The point is, kernel and alt_kernel should not exist in dd-wrt...at all. Even the ipq8174-mx4200.dtsi file shows them to be linux and linux2, so something is not right. While it IS most certainly a log from DD-WRT, it looks to me like something went terribly wrong in the flashing, simply because of kernel/alt_kernel being present and nvram not being present at all. Note that kernel and alt_kernel is also a stock OEM configuration, not just openwrt.

This line proves this is indeed a dd-wrt kernel booting:
[ 0.000000] Linux version 6.6.50-rt29 (root@linux.shellfast) (aarch64-openwrt-linux-gcc (OpenWrt GCC 14.2.0 r27059+16-6bb334c5cf) 14.2.0, GNU ld (GNU Binutils) 2.42) #1228 SMP Thu Sep 12 17:29:36 +07 2024

It looks to me like the kernel got flashed but nothing else did, nor were the correct mtds created.

Again, I have NEVER owned a router with DD-WRT that does NOT have linux and linux2 mtds....or nvram for that matter, and I have owned many over the years.

_________________
- 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: Thu Sep 19, 2024 16:24    Post subject: Reply with quote
Mmmm, but how does it work with dual-boot devices? I wouldn't think that flashing DD-WRT is going to touch any of the other partitions. Anyway, I don't want to add more noise because I lack enough knowledge to question these comments, but the entire change of partition labels and regs looked strange to me.

Regarding the line that 'proves' that is DD-WRT, you can build OpenWRT with that if you want. It's under Global build settings -> Kernel build options -> Custom Kernel Build User Name / Custom Kernel Build Domain Name. I'm not saying that's what's happened, it's just for your info.
lexridge
DD-WRT Guru


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

PostPosted: Thu Sep 19, 2024 16:29    Post subject: Reply with quote
The mtds will be different on a dual boot system whenever a different OS is installed on one or the other. But you only see the ones dedicated to the booted partition. So we are not seeing anything from the other partition here.

The section in the kernel line that I intentionally made bold shows the machine it was built on. All dd-wrt kernels have this. Sure, it could be forced in a openwrt build, but why would anybody do that?

_________________
- 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: Thu Sep 19, 2024 17:47    Post subject: Reply with quote
I'm thinking of another test.

I currently have Linksys on kernel and OpenWRT on alt_kernel. From OpenWRT I am going to set partbootargs2, the U-Boot environment variable, with mtdparts as the partition layout on DD-WRT's ipq8174-mx4200.dtsi. Then I will flash DD-WRT onto alt_kernel from Linksys on kernel and see if it boots.

My only doubt at the moment is if nvram should be at 0x13b80000 or 0x12b80000.

It's also possible that even though that might have worked, it won't because the reg for nvram on ipq8174-mx4200.dtsi should be
Code:
reg = <0x13b80000 0x100000>;
. We'll see.
Goto page Previous  1, 2, 3, 4, 5, 6, 7  Next Display posts from previous:    Page 3 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