OpenWrt support for Linksys MX4200

There is a webIF on LAN IP (192.168.1.1) but it isnt complete
luc_17
That said, I have WAN port connected to my network on dhcp which connects and can now do
opkg updae
opkg install luci
which works
opkg wasnt working on the previous compile (16 from my numbering)
Dont see wifi though

Yeah WiFi won't work yet, not added to dts

1 Like

https://file.io/ncAhhiqEtk0w

Luci probably won't work because it's not installed on the band I guess

We have wifi


Not sure what this msg is continuously on console
hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
Had to do opkg update and install luci but seems good

Filename 'openwrt-qualcommax-ipq807x-linksys_mx4200-initramfs-uImage18.itb'.
Load address: 0x50000000
Loading: *
Got TFTP_OACK: TFTP remote port: changes from 69 to 54113
#################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ####
         3.7 MiB/s
done
Bytes transferred = 12449424 (bdf690 hex)
ipq807x_eth_halt: done
## Loading kernel from FIT Image at 50000000 ...
   Using 'config@1' configuration
   Trying 'kernel-1' kernel subimage
     Description:  ARM64 OpenWrt Linux-6.1.50
     Type:         Kernel Image
     Compression:  gzip compressed
     Data Start:   0x500000e8
     Data Size:    12406106 Bytes = 11.8 MiB
     Architecture: AArch64
     OS:           Linux
     Load Address: 0x41000000
     Entry Point:  0x41000000
     Hash algo:    crc32
     Hash value:   b1f5126e
     Hash algo:    sha1
     Hash value:   385ecf80c774330c29ba267278158ac5b97a18a4
   Verifying Hash Integrity ... crc32+ sha1+ OK
## Loading fdt from FIT Image at 50000000 ...
   Using 'config@1' configuration
   Trying 'fdt-1' fdt subimage
     Description:  ARM64 OpenWrt linksys_mx4200 device tree blob
     Type:         Flat Device Tree
     Compression:  uncompressed
     Data Start:   0x50bd4f84
     Data Size:    41413 Bytes = 40.4 KiB
     Architecture: AArch64
     Hash algo:    crc32
     Hash value:   17d2fa49
     Hash algo:    sha1
     Hash value:   774de28ce201ac54f18a90640f4fe2d2e7bce648
   Verifying Hash Integrity ... crc32+ sha1+ OK
   Booting using the fdt blob at 0x50bd4f84
   Uncompressing Kernel Image ... OK
   Loading Device Tree to 4a3f2000, end 4a3ff1c4 ... 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.1.50 (spectre@android-vm) (aarch64-openwrt-linux-musl-gcc (OpenWrt GCC 12.3.0 r23870-1c5b0b11f0) 12.3.0, GNU ld (GNU Binutils) 2.40.0) #0 SMP Sun Sep  3 20:35:05 2023
[    0.000000] Machine model: Linksys MX4200
[    0.000000] Zone ranges:
[    0.000000]   DMA      [mem 0x0000000040000000-0x000000007fffffff]
[    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-0x000000007fffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000040000000-0x000000007fffffff]
[    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 s31080 r8192 d30360 u69632
[    0.000000] Detected VIPT I-cache on CPU0
[    0.000000] alternatives: applying boot alternatives
[    0.000000] Built 1 zonelists, mobility grouping on.  Total pages: 258048
[    0.000000] Kernel command line: console=ttyMSM0,115200n8
[    0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes, linear)
[    0.000000] Inode-cache hash table entries: 65536 (order: 7, 524288 bytes, linear)
[    0.000000] mem auto-init: stack:off, heap alloc:off, heap free:off
[    0.000000] Memory: 880308K/1048576K available (7744K kernel code, 854K rwdata, 2296K rodata, 8640K init, 273K bss, 168268K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.000000] rcu: Hierarchical RCU implementation.
[    0.000000]  Tracing variant of Tasks RCU enabled.
[    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.000098] Calibrating delay loop (skipped), value calculated using timer frequency.. 38.40 BogoMIPS (lpj=192000)
[    0.000112] pid_max: default: 32768 minimum: 301
[    0.000583] Mount-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.000597] Mountpoint-cache hash table entries: 2048 (order: 2, 16384 bytes, linear)
[    0.002420] cblist_init_generic: Setting adjustable number of callback queues.
[    0.002429] cblist_init_generic: Setting shift to 2 and lim to 1.
[    0.002619] rcu: Hierarchical SRCU implementation.
[    0.002624] rcu:     Max phase no-delay instances is 1000.
[    0.003418] smp: Bringing up secondary CPUs ...
[    0.004043] Detected VIPT I-cache on CPU1
[    0.004183] CPU1: Booted secondary processor 0x0000000001 [0x410fd034]
[    0.004839] Detected VIPT I-cache on CPU2
[    0.004944] CPU2: Booted secondary processor 0x0000000002 [0x410fd034]
[    0.005548] Detected VIPT I-cache on CPU3
[    0.005646] CPU3: Booted secondary processor 0x0000000003 [0x410fd034]
[    0.005713] smp: Brought up 1 node, 4 CPUs
[    0.005721] SMP: Total of 4 processors activated.
[    0.005726] CPU features: detected: 32-bit EL0 Support
[    0.005730] CPU features: detected: CRC32 instructions
[    0.005789] CPU features: emulated: Privileged Access Never (PAN) using TTBR0_EL1 switching
[    0.005796] CPU: All CPU(s) started at EL1
[    0.005799] alternatives: applying system-wide alternatives
[    0.016055] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.016081] futex hash table entries: 1024 (order: 4, 65536 bytes, linear)
[    0.016295] pinctrl core: initialized pinctrl subsystem
[    0.017441] NET: Registered PF_NETLINK/PF_ROUTE protocol family
[    0.017951] DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
[    0.017996] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA pool for atomic allocations
[    0.018032] DMA: preallocated 128 KiB GFP_KERNEL|GFP_DMA32 pool for atomic allocations
[    0.018416] thermal_sys: Registered thermal governor 'step_wise'
[    0.018608] cpuidle: using governor menu
[    0.018860] ASID allocator initialised with 65536 entries
[    0.077810] SCSI subsystem initialized
[    0.077997] usbcore: registered new interface driver usbfs
[    0.078068] usbcore: registered new interface driver hub
[    0.078113] usbcore: registered new device driver usb
[    0.078535] qcom_scm: convention: smc arm 64
[    0.079733] clocksource: Switched to clocksource arch_sys_counter
[    0.080845] NET: Registered PF_INET protocol family
[    0.080991] IP idents hash table entries: 16384 (order: 5, 131072 bytes, linear)
[    0.082324] tcp_listen_portaddr_hash hash table entries: 512 (order: 1, 8192 bytes, linear)
[    0.082349] Table-perturb hash table entries: 65536 (order: 6, 262144 bytes, linear)
[    0.082363] TCP established hash table entries: 8192 (order: 4, 65536 bytes, linear)
[    0.082450] TCP bind hash table entries: 8192 (order: 6, 262144 bytes, linear)
[    0.082728] TCP: Hash tables configured (established 8192 bind 8192)
[    0.082826] UDP hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.082864] UDP-Lite hash table entries: 512 (order: 2, 16384 bytes, linear)
[    0.083078] NET: Registered PF_UNIX/PF_LOCAL protocol family
[    0.083115] PCI: CLS 0 bytes, default 64
[    0.084565] workingset: timestamp_bits=46 max_order=18 bucket_order=0
[    0.089501] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.089513] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.098614] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.099270] msm_serial 78b3000.serial: msm_serial: detected port #0
[    0.099311] msm_serial 78b3000.serial: uartclk = 3686400
[    0.099422] 78b3000.serial: ttyMSM0 at MMIO 0x78b3000 (irq = 18, base_baud = 230400) is a MSM
[    0.099450] msm_serial: console setup on port #0
[    0.682086] printk: console [ttyMSM0] enabled
[    0.687057] msm_serial: driver initialized
[    0.696092] loop: module loaded
[    0.697510] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xac
[    0.698049] nand: Hynix H27S4G8F2EDA-BC
[    0.704657] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[    0.718586] spmi spmi-0: PMIC arbiter version v2 (0x20010000)
[    0.776850] i2c_dev: i2c /dev entries driver
[    0.783703] sdhci: Secure Digital Host Controller Interface driver
[    0.783745] sdhci: Copyright(c) Pierre Ossman
[    0.788780] sdhci-pltfm: SDHCI platform and OF driver helper
[    0.795848] NET: Registered PF_INET6 protocol family
[    0.800012] Segment Routing with IPv6
[    0.803919] In-situ OAM (IOAM) with IPv6
[    0.807505] NET: Registered PF_PACKET protocol family
[    0.811518] 8021q: 802.1Q VLAN Support v1.8
[    0.837181] qcom,cpr4-apss-regulator b018000.cpr4-ctrl: CPR valid fuse count: 4
[    0.837487] cpr4_ipq807x_apss_read_fuse_data: apc_corner: speed bin = 0
[    0.843414] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR fusing revision = 1
[    0.849919] cpr4_ipq807x_apss_read_fuse_data: apc_corner: CPR misc fuse value = 0
[    0.857569] cpr4_ipq807x_apss_read_fuse_data: apc_corner: Voltage boost fuse config = 0 boost = disable
[    0.865088] cpr3_mem_acc_init: apc: not using memory accelerator regulator
[    0.874220] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      SVS: open-loop= 704000 uV
[    0.881170] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused      NOM: open-loop= 808000 uV
[    0.891151] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused    TURBO: open-loop= 864000 uV
[    0.900959] cpr4_ipq807x_apss_calculate_open_loop_voltages: apc_corner: fused   STURBO: open-loop= 944000 uV
[    0.910820] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      SVS: quot[ 7]= 743, quot_offset[ 7]=   0
[    0.920582] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused      NOM: quot[ 7]= 945, quot_offset[ 7]= 200
[    0.931430] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused    TURBO: quot[ 7]=1042, quot_offset[ 7]=  95
[    0.942368] cpr4_ipq807x_apss_calculate_target_quotients: apc_corner: fused   STURBO: quot[ 7]=1192, quot_offset[ 7]= 150
[    0.953490] cpr3_regulator_init_ctrl: apc: Default CPR mode = closed-loop
[    0.955880] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xac
[    0.971007] nand: Hynix H27S4G8F2EDA-BC
[    0.977415] nand: 512 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 128
[    0.990520] 27 qcomsmem partitions found on MTD device qcom_nand.0
[    0.990570] Creating 27 MTD partitions on "qcom_nand.0":
[    0.995606] 0x000000000000-0x000000100000 : "0:sbl1"
[    1.002659] 0x000000100000-0x000000200000 : "0:mibib"
[    1.007456] 0x000000200000-0x000000280000 : "0:bootconfig"
[    1.011947] 0x000000280000-0x000000300000 : "0:bootconfig1"
[    1.017280] 0x000000300000-0x000000600000 : "0:qsee"
[    1.025130] 0x000000600000-0x000000900000 : "0:qsee_1"
[    1.030248] 0x000000900000-0x000000980000 : "0:devcfg"
[    1.032914] 0x000000980000-0x000000a00000 : "0:devcfg_1"
[    1.038075] 0x000000a00000-0x000000a80000 : "0:apdp"
[    1.043605] 0x000000a80000-0x000000b00000 : "0:apdp_1"
[    1.048447] 0x000000b00000-0x000000b80000 : "0:rpm"
[    1.053473] 0x000000b80000-0x000000c00000 : "0:rpm_1"
[    1.058157] 0x000000c00000-0x000000c80000 : "0:cdt"
[    1.063439] 0x000000c80000-0x000000d00000 : "0:cdt_1"
[    1.068056] 0x000000d00000-0x000000d80000 : "0:appsblenv"
[    1.073344] 0x000000d80000-0x000000e80000 : "0:appsbl"
[    1.079111] 0x000000e80000-0x000000f80000 : "0:appsbl_1"
[    1.084303] 0x000000f80000-0x000001000000 : "0:art"
[    1.089177] 0x000001000000-0x000001040000 : "u_env"
[    1.093598] 0x000001040000-0x000001060000 : "s_env"
[    1.098271] 0x000001060000-0x000001080000 : "devinfo"
[    1.103200] 0x000001080000-0x00000a680000 : "rootfs"
[    1.247917] mtd: setting mtd21 (rootfs) as root device
[    1.248271] mtdsplit: no squashfs found in "rootfs"
[    1.252009] 0x00000a680000-0x000013c80000 : "rootfs_1"
[    1.396931] 0x000013c80000-0x000013e80000 : "sysdiag"
[    1.399371] 0x000013e80000-0x000013f00000 : "0:ethphyfw"
[    1.401954] 0x000013f00000-0x00001f700000 : "syscfg"
[    1.579684] 0x00001f700000-0x000020000000 : "0:wififw"
[    1.598059] cpu cpu0: SoC ID 399 is not part of IPQ8074 family, limiting to 1.4GHz!
[    1.599133] cpufreq: cpufreq_online: CPU0: Running at unlisted initial frequency: 19200 KHz, changing to: 1017600 KHz
[  ▒[    1.619826] Freeing unused kernel memory: 8640K
[    1.689797] Run /init as init process
[    1.905569] init: Console is alive
[    1.905787] init: - watchdog -
[    1.913994] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    2.012410] ssdk_phy_driver_init[369]:INFO:dev_id = 0, phy_adress = 5, phy_id = 0x6820805 phytype doesn't match
[    2.012458] malibu_phy_api_ops_init[2854]:INFO:qca probe malibu phy driver succeeded!
[    2.021513] hsl_phy_phydev_get[798]:ERROR:phy_addr 0 phydev is NULL
[    2.273389] hsl_phy_phydev_get[798]:ERROR:phy_addr 0 phydev is NULL
[    2.273548] hsl_phy_phydev_get[798]:ERROR:phy_addr 0 phydev is NULL
[    2.505934] regi_init[3989]:INFO:Initializing HPPE Done!!
[    2.506040] regi_init[4049]:INFO:qca-ssdk module init succeeded!
[    2.512464] EDMA ver 1 hw init
[    2.516594] EDMA HW Reset completed succesfully
[    2.519271] Num rings - TxDesc:1 (23-23) TxCmpl:1 (7-7)
[    2.523687] RxDesc:1 (15-15) RxFill:1 (7-7)
[    2.533100] **********************************************************
[    2.533137] * NSS Data Plane driver
[    2.539636] **********************************************************
[    2.550327] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    2.555079] init: - preinit -
[    6.499722] random: crng init done
Press the [f] key and hit [enter] to enter failsafe mode
Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level
[    7.650221] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[    8.628572] procd: - early -
[    8.628702] procd: - watchdog -
[    8.739928] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[    9.161102] procd: - watchdog -
[    9.161325] procd: - ubus -
[    9.214356] procd: - init -
Please press Enter to activate this console.
[    9.352335] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.391818] Loading modules backported from Linux version v6.1.24-0-g0102425ac76b
[    9.391861] Backport generated by backports.git v5.15.92-1-44-gd6ea70fafd36
[    9.403189] NET: Registered PF_QIPCRTR protocol family
[    9.434029] PPP generic driver version 2.4.2
[    9.434783] NET: Registered PF_PPPOX protocol family
[    9.444146] ath11k c000000.wifi: ipq8074 hw2.0
[    9.444181] ath11k c000000.wifi: FW memory mode: 1
[    9.447733] remoteproc remoteproc0: powering up cd00000.q6v5_wcss
[    9.452353] remoteproc remoteproc0: Booting fw image IPQ8074/q6_fw.mdt, size 668
[    9.621024] urngd: v1.0.2 started.
[    9.769894] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[    9.805970] remoteproc remoteproc0: remote processor cd00000.q6v5_wcss is now up
[    9.810880] kmodloader: done loading kernel modules from /etc/modules.d/*
[    9.849969] ath11k c000000.wifi: qmi ignore invalid mem req type 3
[    9.857388] ath11k c000000.wifi: chip_id 0x0 chip_family 0x0 board_id 0xff soc_id 0xffffffff
[    9.857424] ath11k c000000.wifi: fw_version 0x290984a5 fw_build_timestamp 2023-07-19 02:31 fw_build_id WLAN.HK.2.9.0.1-01862-QCAHKSWPL_SILICONZ-1
[   10.124738] ath11k c000000.wifi: htt event 48 not handled
[   10.809921] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   11.849994] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   12.899900] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   13.929884] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   14.979884] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   16.009971] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   16.966695] br-lan: port 1(lan1) entered blocking state
[   16.966739] br-lan: port 1(lan1) entered disabled state
[   16.971006] device lan1 entered promiscuous mode
[   16.985203] br-lan: port 2(lan2) entered blocking state
[   16.985248] br-lan: port 2(lan2) entered disabled state
[   16.989485] device lan2 entered promiscuous mode
[   16.998008] br-lan: port 3(lan3) entered blocking state
[   16.999316] br-lan: port 3(lan3) entered disabled state
[   17.004547] device lan3 entered promiscuous mode
[   17.079375] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   18.090275] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   19.130057] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   20.090174] nss-dp 3a001600.dp4 lan2: PHY Link up speed: 1000
[   20.090245] br-lan: port 2(lan2) entered blocking state
[   20.094904] br-lan: port 2(lan2) entered forwarding state
[   20.100218] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   20.169999] nss-dp 3a001200.dp2 wan: PHY Link up speed: 1000
[   20.170060] IPv6: ADDRCONF(NETDEV_CHANGE): wan: link becomes ready
[   20.170118] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   21.210301] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   22.250013] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   23.289959] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   24.329976] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   25.369958] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   26.409966] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   27.449985] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   28.489970] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   29.529971] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   30.569969] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   31.609969] hsl_phy_phydev_get[798]:ERROR:phy_addr 5 phydev is NULL
[   31.849780] l11: disabling

Ooh finally

Do you want me to send you the .ubi files to have permanent installation Dunno if that works not

Can do, are there any other easy wins for the image to be gained or prefer to run it and see how it behavased ?

Wdym I don't understand

Can you also run fw_printenv

I just meant if there were any other bits obviously missing which needed adding - no matter.
fw_printenv from fully up factory image (looks v similar to printenv when stopped at console)
Interestingly, the MAC address from these is nothing like the MAC from ifconfig

~ # fw_printenv
altkern=a680000
auto_recovery=yes
baudrate=115200
bdf_country=UK_ME_EU
boot_part=1
boot_part_ready=3
boot_ver=1.0.03
bootargs=console=ttyMSM0,115200n8
bootcmd=if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi
bootdelay=1
bootpart1=set bootargs $partbootargs && nand read $loadaddr $prikern $kernsize && bootm $loadaddr
bootpart2=set bootargs $partbootargs2 && nand read $loadaddr $altkern $kernsize && bootm $loadaddr
cmd0=init=/sbin/init rootfstype=squashfs ubi.mtd=22,2048 ubi.block=0,0 root=/dev/ubiblock0_0 rootwait ro
cmd1=init=/sbin/init rootfstype=squashfs ubi.mtd=24,2048 ubi.block=0,0 root=/dev/ubiblock0_0 rootwait ro
cmd2=mtdparts=qcom_nand.0:0x100000@0x0(0:SBL1),0x100000@0x100000(0:MIBIB),0x80000@0x200000(0:BOOTCONFIG),
cmd3=0x80000@0x280000(0:BOOTCONFIG1),0x300000@0x300000(0:QSEE),0x300000@0x600000(0:QSEE_1),0x80000@0x900000(0:DEVCFG),
cmd4=0x80000@0x980000(0:DEVCFG_1),0x80000@0xa00000(0:APDP),0x80000@0xa80000(0:APDP_1),0x80000@0xb00000(0:RPM),
cmd5=0x80000@0xb80000(0:RPM_1),0x80000@0xc00000(0:CDT),0x80000@0xc80000(0:CDT_1),0x80000@0xd00000(0:APPSBLENV),
cmd6=0x100000@0xd80000(0:APPSBL),0x100000@0xe80000(0:APPSBL_1),0x80000@0xf80000(0:ART),
cmd7=0x40000@0x1000000(u_env),0x20000@0x1040000(s_env),0x20000@0x1060000(devinfo),
cmd8=0x9600000@0x1080000(kernel),0x9000000@0x1680000(rootfs),0x9600000@0xa680000(alt_kernel),0x9000000@0xac80000(alt_rootfs),
cmd9=0x200000@0x13c80000(sysdiag),0x80000@0x13e80000(0:ETHPHYFW),0xb800000@0x13f00000(syscfg),0x900000@0x1f700000(0:WIFIFW)
eth1addr=e8:9f:80:e5:ef:75
eth2addr=E8:9F:80:E5:EF:75
eth3addr=E8:9F:80:E5:EF:75
eth4addr=E8:9F:80:E5:EF:75
eth5addr=E8:9F:80:E5:EF:75
ethact=eth0
ethaddr=e8:9f:80:e5:ef:75
fdt_high=0x4A400000
fdtcontroladdr=4a970b30
fileaddr=44000000
filesize=24a0000
flash_type=2
flashimg=tftpboot $loadaddr $image && nand erase $prikern $imgsize && nand write $loadaddr $prikern $filesize
flashimg2=tftpboot $loadaddr $image && nand erase $altkern $imgsize && nand write $loadaddr $altkern $filesize
image=FW_MX4200TR_2.0.5.210476_prod.img
imgsize=9600000
ipaddr=192.168.1.1
kernsize=600000
loadaddr=44000000
machid=801000d
maxpartialboots=3
mtddevname=fs
mtddevnum=0
mtdids=nand0=nand0
mtdparts=mtdparts=nand0:0x9000000@0xac80000(fs),
netmask=255.255.255.0
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)
partbootargs2=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)
partition=nand0,0
prikern=1080000
serverip=192.168.1.100
soc_hw_version=200d0200
soc_version_major=2
soc_version_minor=0
stderr=serial@78B3000
stdin=serial@78B3000
stdout=serial@78B3000

Nice, I'm sure everything is working now, except Bluetooth but I don't think anybody really needs that

https://file.io/BEPXWfNexs98

Mx4200V1 initramfs

(V1 Only)

@SpectreDev : question if you don't mind. Am working, or at least trying, to add support for 2 other Linksys devices. When adding the device images to the .mk file, how do I determine what the value of the KERNEL_SIZE property is? Is that simply the difference between the offsets for the MTDs labelled 'kernel' (and alt_kernel) or something else?

Use print or printenv command in uboot cli, it will say kernel size

that was too easy, thanks!

No problem, Good Luck

We've got Openwrt installed and booting alot of thanks to robimarko and neggles for the help provided

2 Likes

What are the next steps, PR / codereview ?

1 Like

Pull Request already submitted, i need to fix sysupgrade

edit: fixed sysupgrade on mtd24 partition

1 Like

Testing out your PR - is anything special needed to be done to get the WiFi radios working? I'm able to flash, ethernet works. But there are no radios detected at all.