OpenWrt support for Linksys MX4200

My NSS repo has a considerable amount of patches for ath11k that should address these. Not all are NSS related, but patches from Qcom not merged upstream.

Also includes latest WiFi fw 2.12 vs 2.9.0.1.

2 Likes

Thanks, @qosmio. After reading through these long-running threads on similar issues without confirmed fixes I'm ready to try out the NSS builds:

Will try building from your repo next.

1 Like

Do you use this regularly? It didn't work very well when I tested it a while ago. Maybe I wasn't using it correctly but my recollection is that there were issues when combined with -n and I believe at some point it rebooted to the other partition. Take the feedback with a pinch of salt. It would be great if others could do some systematic testing to confirm that it works well.

By upstream do you mean Openwrt or mainline kernel?
Why aren't the non-NSS related patches getting accepted?

Hi @lytr,

Do you plan to fix this issue? Thanks!

[    5.398587] GMAC4(ffffff800609c900) Invalid MAC@ - using b2:f9:f9:79:34:6d
[    5.498615] GMAC5(ffffff80060aa900) Invalid MAC@ - using 62:74:ee:ba:08:28

Edit: Sorry, it seems like it hasn't been fixed yet. The error messages are still there.

I think @lytr already fixed this by changing the dts.

1 Like

Heres is the serial bootlog from the following build:

https://ftp.dd-wrt.com/dd-wrtv2/downloads/betas/2024/08-04-2024-r57753/linksys-mx4300/

Iirc the "UBI error: cannot attach" can be resolved with a command line change, think asd111333 covered this.

[up.sh] update /tmp/var/config/jcgi.tmp
[fw.sh] verify_linksys_header
[fw.sh] verify_linksys_header: success
[fw.sh] Erasing kernel and rootfs partitions: mtd21  ..
[fw.sh] Writing kernel and rootfs image: /tmp/var/config/jcgi.tmp to mtd21 ..
committing syscfg
Backing up devicedb database ...

system is going down
btsetup btsetup-stop
Disable BLE advertisement
[olympus][Auto_Parent] Auto Parent: waiting for mode setting...
[olympus][Auto_Parent] Auto Parent: finding Master node... WanIP(0.0.0.0) MasterIP()
service_routed: lan-status - RESTARTING service at Thu Oct 11 06:02:47 UTC 2012
service_routed: STOPPING service at Thu Oct 11 06:02:47 UTC 2012
mosquitto aborting: not Master
service_routed: STOP service complete at Thu Oct 11 06:02:48 UTC 2012
service_routed: STARTING service at Thu Oct 11 06:02:48 UTC 2012
service_guardian.sh is called with lan-status
wan, sysevent received: wan-stop
/etc/init.d/service_node-off.sh  Setting default for cache_dir = '/tmp/msg'
/etc/init.d/service_node-off.sh  Setting default for debug = '0'
/etc/init.d/service_node-off.sh  Setting default for enabled = '1'
/etc/init.d/service_node-off.sh  Setting default for enable_cloud = '1'
/etc/init.d/service_node-off.sh  Setting default for min_offline_time = '3'
node-off running
service_routed: START service complete at Thu Oct 11 06:02:48 UTC 2012
service_routed: lan-status - RESTART service complete at Thu Oct 11 06:02:48 UTC 2012
Got a TERM signal, will terminate.
Oct 11 06:02:49 mDNSResponder (Engineering Build) (Feb 22 2024 15:27:43) [4352]: stopping
Oct 10 23:02:49 mcastds: Leaving mcsd executive program
ath0: interface state ENABLED->DISABLED
ath0: AP-DISABLED
ath0: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=ath0 disabled_11b_rates=0
ath1: interface state ENABLED->DISABLED
ath1: AP-DISABLED
ath1: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=ath1 disabled_11b_rates=0
ath10: interface state ENABLED->DISABLED
ath10: AP-DISABLED
ath10: CTRL-EVENT-TERMINATING
nl80211: deinit ifname=ath10 disabled_11b_rates=0
umount: can't remount none read-only
umount: mdev busy - remounted read-only
system is going down now
The system is going down NOW!
Sent SIGTERM to all processes
Sent SIGKILL to all processes
Requesting system reboot
[  187.762780] reboot: Restarting system

Format: Log Type - Time(microsec) - Message - Optional Info
Log Type: B - Since Boot(Power On Reset),  D - Delta,  S - Statistic
S - QC_IMAGE_VERSION_STRING=BOOT.BF.3.3.1-00163
S - IMAGE_VARIANT_STRING=HAACANAZA
S - OEM_IMAGE_VERSION_STRING=CRM
S - Boot Config, 0x000002e5
B -       201 - PBL, Start
B -      2736 - bootable_media_detect_entry, Start
B -      4082 - bootable_media_detect_success, Start
B -      4086 - elf_loader_entry, Start
B -      8268 - auth_hash_seg_entry, Start
B -      8514 - auth_hash_seg_exit, Start
B -     70416 - elf_segs_hash_verify_entry, Start
B -    133272 - PBL, End
B -    215635 - SBL1, Start
B -    293105 - GCC [RstStat:0x10, RstDbg:0x600000] WDog Stat : 0x4
B -    302773 - pm_device_init, Start
B -    482327 - PM_SET_VAL:Skip
D -    177723 - pm_device_init, Delta
B -    484767 - pm_driver_init, Start
D -      5368 - pm_driver_init, Delta
B -    491141 - clock_init, Start
D -      2135 - clock_init, Delta
B -    495106 - boot_flash_init, Start
D -     17995 - boot_flash_init, Delta
B -    516761 - boot_config_data_table_init, Start
D -      4178 - boot_config_data_table_init, Delta - (575 Bytes)
B -    524112 - Boot Setting :  0x00000618
B -    528229 - CDT version:2,Platform ID:8,Major ID:1,Minor ID:0,Subtype:13
B -    535183 - sbl1_ddr_set_params, Start
B -    538996 - CPR configuration: 0x30c
B -    542381 - cpr_init, Start
B -    545157 - Rail:0 Mode: 5 Voltage: 800000
B -    550403 - CL CPR settled at 752000mV
B -    553239 - Rail:1 Mode: 5 Voltage: 880000
B -    557418 - Rail:1 Mode: 7 Voltage: 896000
D -     16561 - cpr_init, Delta
B -    564311 - Pre_DDR_clock_init, Start
B -    568337 - Pre_DDR_clock_init, End
B -    571631 - DDR Type : PCDDR3
B -    577365 - do ddr sanity test, Start
D -      1037 - do ddr sanity test, Delta
B -    582123 - DDR: Start of HAL DDR Boot Training
B -    586850 - DDR: End of HAL DDR Boot Training
B -    592554 - DDR: Checksum to be stored on flash is -1914189673
B -    603046 - Image Load, Start
D -    216397 - QSEE Image Loaded, Delta - (1374928 Bytes)
B -    819535 - Image Load, Start
D -        61 - SEC Image Loaded, Delta - (0 Bytes)
B -    827221 - Image Load, Start
D -     12047 - DEVCFG Image Loaded, Delta - (26148 Bytes)
B -    839360 - Image Load, Start
D -     23058 - RPM Image Loaded, Delta - (86660 Bytes)
B -    862509 - Image Load, Start
D -     91744 - APPSBL Image Loaded, Delta - (585496 Bytes)
B -    954375 - QSEE Execution, Start
D -        61 - QSEE Execution, Delta
B -    960201 - USB D+ check, Start
D -         0 - USB D+ check, Delta
B -    966575 - SBL1, End
D -    753258 - SBL1, Delta
S - Flash Throughput, 6903 KB/s  (2074479 Bytes,  300477 us)
S - DDR Frequency, 466 MHz
S - Core 0 Frequency, 800 MHz


U-Boot 2016.01-v0.20.256.210611_11.3csu2 (Jun 14 2021 - 23:17:51 +0800)

DRAM:  smem ram ptable found: ver: 1 len: 4
2 GiB
board_env_offset=1000000, board_env_size= 40000
board_devinfo_offset=1200000, board_devinfo_size=40000
board_senv_offset=1100000, board_senv_size=100000
NAND:  Could not find nand_gpio in dts, using defaults
ONFI device found
ID = 2690a32c
Vendor = 2c
Device = a3
qpic_nand: changing oobsize to 160 from 224 bytes
SF: Unsupported flash IDs: manuf ff, jedec ffff, ext_jedec ffff
ipq_spi: SPI Flash not found (bus/cs/speed/mode) = (0/0/48000000/0)
1024 MiB
MMC:   <NULL>: 0
readenv offset=ox1000000
[devinfo_relocate] devinfo_relocate[152] malloced DEVINFO at 4a683680
[devinfo_relocate_spec] ret: 0 , total: 262144 , CONFIG_DEVINFO_SIZE: 262144
In:    serial@78B3000
Out:   serial@78B3000
Err:   serial@78B3000
machid: 801000d
Card did not respond to voltage select!
eth3 MAC Address from ART is not valid
eth4 MAC Address from ART is not valid
eth5 MAC Address from ART is not valid
#################################
######### auto_recovery #########
#################################
 ===  enabled:1,  ===  boot_part:1,    ===  maxpartialboots:3
boot_count_buffer_size = 4096, total number = 256
i=15, offset = 0x110f000, last_offset = 0x110e000
Updating boot_count...
boot->Count:1 ,boot->CheckSum:20110812, offset:0x110f000
#### ~~~~~~~~~~~~~ ####
#### auto_recovery check ####
Hit any key to stop autoboot:  0
Normal boot

NAND read: device 0 offset 0x1240000, size 0x800000
 8388608 bytes read: OK
## Loading kernel from FIT Image at 44000000 ...
   Using 'config@1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-6.6.43-rt29
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x440000ec
     Data Size:    5294716 Bytes = 5 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41000000
     Entry Point:  0x41000000
     Hash algo:    crc32
     Hash value:   f42aca0b
     Hash algo:    sha1
     Hash value:   75daa3496449c499437f113a137bc7ca330d248a
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 44000000 ...
   Using 'config@1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt linksys_mx4300 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x4450cca8
     Data Size:    51596 Bytes = 50.4 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   e4012934
     Hash algo:    sha1
     Hash value:   248bea2a21b5eb37cdefd88031f789f51162fcac
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x4450cca8
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4a3f0000, end 4a3ff98b ... OK
Using machid 0x801000d from environment

Starting kernel ...

Jumping to AARCH64 kernel via monitor
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.6.43-rt29 (root@linux) (aarch64-openwrt-linux-gcc (OpenWrt GCC 14.2.0 r27059+16-6bb334c5cf) 14.2.0, GNU ld (GNU Binutils) 2.42) #762 SMP PREEMPT Sun Aug  4 09:20:52 +07 2024
[    0.000000] Machine model: Linksys MX4300
[    0.000000] OF: reserved mem: 0x0000000040000000..0x0000000040ffffff (16384 KiB) nomap non-reusable nss@40000000
[    0.000000] OF: reserved mem: 0x000000004a400000..0x000000004a5fffff (2048 KiB) nomap non-reusable tzapp@4a400000
[    0.000000] OF: reserved mem: 0x000000004a600000..0x000000004a9fffff (4096 KiB) nomap non-reusable bootloader@4a600000
[    0.000000] OF: reserved mem: 0x000000004aa00000..0x000000004aafffff (1024 KiB) nomap non-reusable sbl@4aa00000
[    0.000000] OF: reserved mem: 0x000000004ab00000..0x000000004abfffff (1024 KiB) nomap non-reusable smem@4ab00000
[    0.000000] OF: reserved mem: 0x000000004ac00000..0x000000004affffff (4096 KiB) nomap non-reusable memory@4ac00000
[    0.000000] OF: reserved mem: 0x000000004b000000..0x0000000050efffff (97280 KiB) nomap non-reusable wcnss@4b000000
[    0.000000] OF: reserved mem: 0x0000000050f00000..0x0000000050ffffff (1024 KiB) nomap non-reusable q6_etr_dump@50f00000
[    0.000000] OF: reserved mem: 0x0000000051000000..0x00000000510fffff (1024 KiB) nomap non-reusable m3_dump@51000000
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000]   DMA32    empty
[    0.000000]   Normal   empty
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000040000000-0x0000000040ffffff]
[    0.000000]   node   0: [mem 0x0000000041000000-0x000000004a3fffff]
[    0.000000]   node   0: [mem 0x000000004a400000-0x00000000510fffff]
[    0.000000]   node   0: [mem 0x0000000051100000-0x00000000bfffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x00000000bfffffff]
[    0.000000] psci: probing for conduit method from DT.
[    0.000000] psci: PSCIv1.0 detected in firmware.
[    0.000000] psci: Using standard PSCI v0.2 function IDs
[    0.000000] psci: MIGRATE_INFO_TYPE not supported.
[    0.000000] psci: SMC Calling Convention v1.0
[    0.000000] percpu: Embedded 17 pages/cpu s31480 r8192 d29960 u69632
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] CPU features: kernel page table isolation forced OFF by mitigations=off
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Kernel command line: init=/sbin/init rootfstype=squashfs ubi.mtd=22,2048 ubi.block=0,0 root=/dev/ubiblock0_0 rootwait ro coherent_pool=2M swiotlb=noforce mitigations=off root=/dev/ubiblock0_0
[    0.000000] Dentry cache hash table entries: 262144 (order: 9, 2097152 bytes, linear)
[    0.000000] Inode-cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 516096
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] software IO TLB: SWIOTLB bounce buffer size adjusted to 2MB
[    0.000000] Memory: 1914496K/2097152K available (7936K kernel code, 1048K rwdata, 3208K rodata, 1664K init, 320K bss, 182656K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Preemptible hierarchical RCU implementation.
[    0.000000] rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
[    0.000000] NR_IRQS: 64, nr_irqs: 64, preallocated irqs: 0
[    0.000000] Root IRQ handler: gic_handle_irq
[    0.000000] GICv2m: range[mem 0x0b00a000-0x0b00affc], SPI[448:479]
[    0.000000] rcu: srcu_init: Setting srcu_struct sizes based on contention.
[    0.000000] arch_timer: cp15 and mmio timer(s) running at 19.20MHz (virt/virt).
[    0.000000] clocksource: arch_sys_counter: mask: 0xffffffffffffff max_cycles: 0x46d987e47, max_idle_ns: 440795202767 ns
[    0.000000] sched_clock: 56 bits at 19MHz, resolution 52ns, wraps every 4398046511078ns
[    0.000107] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000120] pid_max: default: 32768 minimum: 301
[    0.000271] Mount-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000288] Mountpoint-cache hash table entries: 4096 (order: 3, 32768 bytes, linear)
[    0.000852] spectre-v4 mitigation disabled by command-line option
[    0.001767] rcu: Hierarchical SRCU implementation.
[    0.001772] rcu:     Max phase no-delay instances is 1000.
[    0.002564] smp: Bringing up secondary CPUs ...
[    0.003127] Detected VIPT I-cache on CPU1
[    0.003242] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.003868] Detected VIPT I-cache on CPU2
[    0.003945] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.004517] Detected VIPT I-cache on CPU3
[    0.004590] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.004664] smp: Brought up 1 node, 4 CPUs
[    0.004673] SMP: Total of 4 processors activated.
[    0.004678] CPU features: detected: 32-bit EL0 Support
[    0.004683] CPU features: detected: CRC32 instructions
[    0.004751] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.004759] CPU: All CPU(s) started at EL1
[    0.004761] alternatives: applying system-wide alternatives
[    0.015634] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.015661] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.015778] pinctrl core: initialized pinctrl subsystem
[    0.016906] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.017786] DMA: preallocated 2048 KiB GFP_KERNEL pool for atomic allocations
[    0.018100] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.018409] DMA: preallocated 2048 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.018859] thermal_sys: Registered thermal governor 'step_wise'
[    0.018914] cpuidle: using governor menu
[    0.019053] NET: Registered PF_QIPCRTR protocol family
[    0.019253] ASID allocator initialised with 65536 entries
[    0.053455] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.056814] Modules: 29184 pages in range for non-PLT usage
[    0.056821] Modules: 520704 pages in range for PLT usage
[    0.057747] cryptd: max_cpu_qlen set to 1000
[    0.059152] pps_core: LinuxPPS API ver. 1 registered
[    0.059159] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.059509] qcom_scm: convention: smc arm 64
[    0.060945] mctp: management component transport protocol core
[    0.060951] NET: Registered PF_MCTP protocol family
[    0.061330] clocksource: Switched to clocksource arch_sys_counter
[    0.061516] VFS: Disk quotas dquot_6.6.0
[    0.061552] VFS: Dquot-cache hash table entries: 512 (order 0, 4096 bytes)
[    0.062198] NET: Registered PF_INET protocol family
[    0.062374] IP idents hash table entries: 32768 (order: 6, 262144 bytes, linear)
[    0.064537] tcp_listen_portaddr_hash hash table entries: 1024 (order: 3, 32768 bytes, linear)
[    0.064577] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.064598] TCP established hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.064766] TCP bind hash table entries: 16384 (order: 8, 1048576 bytes, linear)
[    0.065560] TCP: Hash tables configured (established 16384 bind 16384)
[    0.065848] MPTCP token hash table entries: 2048 (order: 4, 98304 bytes, linear)
[    0.065989] UDP hash table entries: 1024 (order: 4, 98304 bytes, linear)
[    0.066086] UDP-Lite hash table entries: 1024 (order: 4, 98304 bytes, linear)
[    0.066349] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.066405] PCI: CLS 0 bytes, default 64
[    0.068302] workingset: timestamp_bits=62 max_order=19 bucket_order=0
[    0.068466] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.105016] qcom-qmp-usb-phy 78000.phy: supply vdda-phy not found, using dummy regulator
[    0.105181] qcom-qmp-usb-phy 78000.phy: supply vdda-pll not found, using dummy regulator
[    0.106552] qcom-qusb2-phy 79000.phy: supply vdd not found, using dummy regulator
[    0.106697] qcom-qusb2-phy 79000.phy: supply vdda-pll not found, using dummy regulator
[    0.106772] qcom-qusb2-phy 79000.phy: supply vdda-phy-dpdm not found, using dummy regulator
[    0.106952] qcom-qusb2-phy 79000.phy: Registered Qcom-QUSB2 phy
[    0.115870] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.117380] msm_serial 78b1000.serial: msm_serial: detected port #1
[    0.117423] msm_serial 78b1000.serial: uartclk = 19200000
[    0.117749] 78b1000.serial: ttyMSM1 at MMIO 0x78b1000 (irq = 20, base_baud = 1200000) is a MSM
[    0.118235] msm_serial 78b3000.serial: msm_serial: detected port #0
[    0.118269] msm_serial 78b3000.serial: uartclk = 3686400
[    0.118592] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 21, base_baud = 230400) is a MSM
[    0.118624] msm_serial: console setup on port #0
[    0.118669] printk: legacy console [ttyMSM0] enabled
[    0.924783] msm_serial: driver initialized
[    0.933825] loop: module loaded
[    0.935057] qcom_param_page_type_exec:2969 0
[    0.936301] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xa3
[    0.940672] nand: Micron MT29F8G08ABBCAH4
[    0.947167] nand: 1024 MiB, SLC, erase size: 256 KiB, page size: 4096, OOB size: 224
[    0.950920] QPIC controller hw version Major:1, Minor:5
[    1.771353] random: crng init done
[    1.814735] found ubi at 1A40000, skipping scan
[    2.670584] found ubi at C980000, skipping scan
[    2.670635] 30 fixed-partitions partitions found on MTD device qcom_nand.0
[    2.673956] Creating 30 MTD partitions on "qcom_nand.0":
[    2.680863] 0x000000000000-0x000000100000 : "sbl1"
[    2.687337] 0x000000100000-0x000000200000 : "mibib"
[    2.691782] 0x000000200000-0x000000280000 : "bootconfig"
[    2.696335] 0x000000280000-0x000000300000 : "bootconfig1"
[    2.701882] 0x000000300000-0x000000600000 : "qsee"
[    2.708180] 0x000000600000-0x000000900000 : "qsee_1"
[    2.712886] 0x000000900000-0x000000980000 : "devcfg"
[    2.716988] 0x000000980000-0x000000a00000 : "devcfg_1"
[    2.721940] 0x000000a00000-0x000000a80000 : "apdp"
[    2.726847] 0x000000a80000-0x000000b00000 : "apdp_1"
[    2.731674] 0x000000b00000-0x000000b80000 : "rpm"
[    2.736765] 0x000000b80000-0x000000c00000 : "rpm_1"
[    2.741409] 0x000000c00000-0x000000c80000 : "cdt"
[    2.746059] 0x000000c80000-0x000000d00000 : "cdt_1"
[    2.750909] 0x000000d00000-0x000000d80000 : "appsblenv"
[    2.755666] 0x000000d80000-0x000000e80000 : "appsbl"
[    2.761017] 0x000000e80000-0x000000f80000 : "appsbl_1"
[    2.766281] 0x000000f80000-0x000001000000 : "art"
[    2.770980] 0x000001000000-0x000001100000 : "u_env"
[    2.775985] 0x000001100000-0x000001200000 : "s_env"
[    2.780637] 0x000001200000-0x000001240000 : "devinfo"
[    2.785261] 0x000001240000-0x00000c180000 : "linux"
[    2.861559] 0x000001a40000-0x00000c180000 : "rootfs"
[    2.929917] mtd: setting mtd22 (rootfs) as root device
[    2.930396] mtdsplit: no squashfs found in "rootfs"
[    2.933978] 0x00000c180000-0x000016fc0000 : "linux2"
[    3.009919] 0x00000c980000-0x000016fc0000 : "alt_rootfs"
[    3.077905] 0x000016fc0000-0x0000170c0000 : "nvram"
[    3.078762] 0x0000170c0000-0x0000174c0000 : "oops"
[    3.083659] 0x0000174c0000-0x000017540000 : "ethphyfw"
[    3.087070] 0x00001f300000-0x000020c00000 : "wififw"
[    3.102187] 0x000020c00000-0x000040000000 : "ddwrt"
[    3.318065] spmi spmi-0: PMIC arbiter version v2 (0x20010000)
[    3.338678] PPP generic driver version 2.4.2
[    3.338854] PPP BSD Compression module registered
[    3.342134] PPP Deflate Compression module registered
[    3.346673] PPP MPPE Compression module registered
[    3.351685] NET: Registered PF_PPPOX protocol family
[    3.356627] i2c_dev: i2c /dev entries driver
[    3.374119] remoteproc remoteproc0: releasing cd00000.q6v5_wcss
[    3.375735] GACT probability NOT on
[    3.378864] Mirror/redirect action on
[    3.383128] Simple TC action Loaded
[    3.386713] netem: version 1.3
[    3.389470] u32 classifier
[    3.392581]     Performance counters on
[    3.395259]     input device check on
[    3.398991]     Actions configured
[    3.403433] nf_conntrack_rtsp v0.7 loading
[    3.406477] xt_time: kernel timezone is -0000
[    3.410343] gre: GRE over IPv4 demultiplexor driver
[    3.414749] NET: Registered PF_INET6 protocol family
[    3.420222] Segment Routing with IPv6
[    3.424556] In-situ OAM (IOAM) with IPv6
[    3.428168] NET: Registered PF_PACKET protocol family
[    3.432222] Bridge firewalling registered
[    3.437119] 8021q: 802.1Q VLAN Support v1.8
[    3.475841] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    3.476198] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    3.482008] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    3.488574] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    3.496256] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    3.504822] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    3.512898] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    3.519827] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 816000 uV
[    3.529833] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 880000 uV
[    3.539629] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 968000 uV
[    3.549492] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 721, quot_offset[ 7]=   0
[    3.559248] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 932, quot_offset[ 7]= 210
[    3.570099] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1039, quot_offset[ 7]= 105
[    3.581036] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1194, quot_offset[ 7]= 155
[    3.592222] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop
[    3.595878] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 800000 KHz, changing to: 1017600 KHz
[    3.611883] remoteproc remoteproc0: cd00000.q6v5_wcss is available
[    3.620726] alloc nvram
[    3.626432] page nvram
[    3.628752] searching for nvram
[    3.631210] nvram size = 1048576
[    6.839426] nvram empty
[    6.839489] ubi0: attaching mtd22
[    6.840684] ubi0 warning: ubi_attach_mtd_dev: EC and VID headers are in the same minimal I/O unit, switch to read-only mode
[    6.844389] ubi0 error: validate_ec_hdr: bad VID header offset 4096, expected 2048
[    6.855110] ubi0 error: validate_ec_hdr: bad EC header
[    6.862741] Erase counter header dump:
[    6.867852]  magic          0x55424923
[    6.871592]  version        1
[    6.875317]  ec             0
[    6.878355]  vid_hdr_offset 4096
[    6.881307]  data_offset    8192
[    6.884611]  image_seq      1894315401
[    6.887817]  hdr_crc        0x314a8769
[    6.891382] erase counter header hexdump:
[    6.895130] CPU: 1 PID: 1 Comm: swapper/0 Not tainted 6.6.43-rt29 #762
[    6.899196] Hardware name: Linksys MX4300 (DT)
[    6.905615] Call trace:
[    6.910038]  dump_backtrace+0xa0/0xe0
[    6.912384]  show_stack+0x18/0x24
[    6.916203]  dump_stack_lvl+0x48/0x60
[    6.919502]  dump_stack+0x18/0x24
[    6.923146]  validate_ec_hdr+0xa0/0xec
[    6.926446]  ubi_io_read_ec_hdr+0x1a8/0x208
[    6.930094]  ubi_attach+0x444/0x132c
[    6.934173]  ubi_attach_mtd_dev+0x474/0xad0
[    6.937992]  ubi_init_attach+0xa8/0x610
[    6.941899]  do_one_initcall+0x58/0x198
[    6.945717]  kernel_init_freeable+0x198/0x278
[    6.949537]  kernel_init+0x24/0xcc
[    6.954049]  ret_from_fork+0x10/0x20
[    6.957359] ubi0 error: ubi_io_read_ec_hdr: validation failed for PEB 0
[    6.961122] ubi0 error: ubi_attach_mtd_dev: failed to attach mtd22, error -22
[    6.967476] UBI error: cannot attach m▒[    6.979426] Waiting for root device /dev/ubiblock0_0...

Also, does anyone has a built image for openwrt based on qosmio's nss image? Atm trying to build it myself but taking forever lol.

(I have 2 mx4300s so can support both openwrt and ddwrt :pp)

From mainline kernel. Issue stems from either the patch not being properly documented and getting rejected, or they've just never submit it for review.

They meaning Qualcomm is not working to the get patches accepted?

Does it make sense to get them into openwrt mainline? That would make the non-nss builds work better and reduce the diffs between your NSS fork and main line.

PR was created: https://github.com/openwrt/openwrt/pull/16070
Latest build: https://github.com/testuser7/openwrt/releases/tag/qualcommax-2540ea6

Request to test this build on MX4200v1/MX4200v2/MX4300.

Thanks to everyone for helping to add support (especially @asd111333). If you have any feedback, feel free to post it here or on github.

7 Likes

One thing that I think worth discussing is how we can leverage app2_data and app2 partitions for better NAND wear leveling.

Both partitions are unused by the stock firmware. I have verified this with concatenating both partitions in OpenWrt and format it with ubiformat. I then rebooted back to stock firmware, and the stock firmware still works correctly without any problem.

I also verified that OpenWrt can boot successfully with squashfs and overlayfs on the concatenated partition. This gives me about 500MB of free space for overlayfs and better NAND wear leveling.

1 Like

Thank you so much, @lytr and @asd111333 !

What is expected behavior wrt. sysupgrade - will this build sysupgrade; to the same or another partition; and will it carry current configuration ?

@asd333111
@fongpwf

i thnk resetting the bootcounter is a bad idea.
in addition to the concern raised about NAND wear, i think this will prevent the ability to reboot to alternate partition in the event of boot errors.

my acute issue-
i just wrote qualcommax-3cae3ad factory bin
https://github.com/asd333111/openwrt/releases/download/qualcommax-3cae3ad/openwrt-qualcommax-ipq807x-linksys_mx4300-squashfs-factory.bin
to both kernel and alt-kernel
my mx4300 will not boot
based on the solid blue LED no matter how many times i power cycle, i conclude that
1 - this build is problematic
2 - rebooting to the alternate image with powercycle>3 does not work

this is great work-in-progress for the mx4300.
could we not just convert it to an nx4200v2 with some uboot mods and be done with it?
thank you all devs

Hi @asd111333

Please give us the instructions on how to concatenate/ubiformat the app2_data and app2 partitions for overlayfs storage. I don't want any trace of Linksys junk on my devices :-). Thanks.

The version you used can only be installed to kernel not alt_kernel. You should use @lytr 's latest build instead.

I don't think resetting the boot counter is a concern. The P/E cycles of the NAND is 100,000. Every reboot writes two pages to s_env, so we can easily calculate how many times you can reboot this device before reaching the rated P/E cycles.

size of s_env / (page size * 2) * rated P/E cycle
= 1048576 / ( 4096 * 2 ) * 100000
= 12800000

It requires changing the dts file and recompiling the kernel.

At the time, I need to prepare two versions of the kernel that patch the boot command in different ways, and I think it is a little bit complex.

1 Like

To (partially) answer my question - sysupgrade using LuCi went through fine, installed build to the other partition and copied configuration, if selected - my MX4300 is setup as dumb AP with 4 subnets, and they seemed to work fine.

Unfortunately - I assume due to my particular config - router itself did not have access to internet, so can't install LuCi (probably something simple, but I can't debug now).

For newbies in my situation - fw_setenv boot_part 1 (or fw_setenv boot_part 2) will get you back to the previous partition.

Thanks again, all!

1 Like

qosmio made a branch for the mx4300. thats all i can say. the bootcommandline isnt a issue for me. its more curious that the ubi cannot be attached. the partition is correct. from the errors i see its like i create the ubi image in a wrong format even if i already fixed that

Have the MX4300 build up and running. It is running well so far, but I do not know if I would notice if it was not running well :slight_smile: I think I will buy a few more and make my first foray into mesh using OpenWrt

Thanks to lytr, asd111333, and anyone else that has contributed.

this bug is a long known bug caused by a upstream fix for bss transition between 2.4 and 5 ghz. but this fix causes a issue if you are running multiple bssid's on a vap and you change between them with your client. i have written a fix for it and will bring this to a openwrt patch with qosmio.

till then. just revert this. this will fix the firmware crash

https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=d673cb6fe6c03b2be157cc6c5db40481828d282d

2 Likes