OpenWrt support for Linksys MX4200

IPQ807x#
bootipq
bootargs=console=ttyMSM0,115200n8 ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait
Booting from flash
Using nand device 0
ubi0: attaching mtd1
UBI init error 22

Net:   MAC0 addr:d8:ec:5e:73:de:28
EDMA ver 1 hw init
Num rings - TxDesc:1 (0-0) TxCmpl:1 (7-7)
RxDesc:1 (15-15) RxFill:1 (7-7)
ipq807x_edma_alloc_rings: successfull
ipq807x_edma_setup_ring_resources: successfull
ipq807x_edma_configure_rings: successfull
ipq807x_edma_hw_init: successfull
, eth0
Warning: eth0 MAC addresses don't match:
Address in SROM is         d8:ec:5e:73:de:28
Address in environment is  d8:ec:5e:73:de:29

IPQ807x# printenv
altkern=c180000
auto_recovery=yes
baudrate=115200
boot_part=1
bootargs=console=ttyMSM0,115200n8 ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs rootwait
bootcmd=if test $auto_recovery = no; then bootipq; elif test $boot_part = 1; then run bootpart1; else run bootpart2; fi
bootdelay=2
bootpart1=set bootargs $partbootargs && nand read $loadaddr $prikern $kernsize && bootm $loadaddr
bootpart2=set bootargs $partbootargs2 && nand read $loadaddr $altkern $kernsize && bootm $loadaddr
eth1addr=d8:ec:5e:73:de:28
eth2addr=d8:ec:5e:73:de:29
eth3addr=D8:EC:5E:73:DE:29
eth4addr=D8:EC:5E:73:DE:29
eth5addr=D8:EC:5E:73:DE:29
ethact=eth0
ethaddr=d8:ec:5e:73:de:28
fdt_high=0x4A400000
fdtcontroladdr=4a97a7b0
fileaddr=44000000
filesize=2381000
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
fsbootargs=ubi.mtd=rootfs root=mtd:ubi_rootfs rootfstype=squashfs
imgsize=af40000
ipaddr=192.168.1.1
kernsize=800000
loadaddr=44000000
machid=801000d
maxpartialboots=3
mtddevname=fs
mtddevnum=0
mtdids=nand0=nand0
mtdparts=mtdparts=nand0:0x1db00000@0x4a00000(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
partbootargs2=init=/sbin/init rootfstype=squashfs ubi.mtd=24,2048 ubi.block=0,0 root=/dev/ubiblock0_0 rootwait ro
partition=nand0,0
prikern=1240000
serverip=192.168.1.12
soc_hw_version=200d0200
soc_version_major=2
soc_version_minor=0
stderr=serial@78B3000
stdin=serial@78B3000
stdout=serial@78B3000

Environment size: 1862/262140 bytes
IPQ807x#

thank you @asd111333
i will update these info for you on Monday.

This is really weird.
By default bootipq loads the kernel from ubi. The mtdparts variable is used for this. And here the partition address is correctly defined:

mtdparts=mtdparts=nand0:0x1db00000@0x4a00000(fs),

But here the kernel is loaded from address 0x1240000 directly from NAND:

NAND read: device 0 offset 0x1240000, size 0x800000

@asd111333 mentioned this earlier.

It appears that the partition table is actually different than the boot logs indicate.
It would be useful to have a dump of all partitions after 0:art.

i ordered another batch of these things; maybe they will be the unadulterated linksys/fortinet versions - if so, i'll get this stuff from serial before tocuhing anything.

Is there a sticky or place to get started on this? I bought one of these and need to decide whether to return it ASAP. I looked at what passes for admin software and it would be pretty painful to have to use this. It doesn't appear to have remote option now that I'm thinking about it. ... Anyway, I'd like to get this up and running for another reason.

[Linksys LN1301 WiFi Router - Tri-Band WiFi - Plug-n-Play Setup - Covers up to 2700 sq. ft. - Speed up tp 4.2 Gbps - Handles 40+ Devices]
Sold by: [Woot]

Return eligible through Aug 23, 2024


Read the release doc ( Release qualcommax-fd13d50 ยท asd333111/openwrt (github.com) word by word, you will figure out.

I've flashed 3x 4300 using @asd111333 's older build from 8/1 and @lytr's 2540ea6.
In my case flashing process was somewhat inconsistent, not all factory.bin would flash. I found helpful having both on hand to try different one, if 1st won't boot.

let me get output from the new open unit. it will arrive in 2 days. thanks

Please use @lytr's build. This one https://github.com/asd333111/openwrt/releases/tag/qualcommax-fd13d50 is for @flyingdida. It will not work on a ordinary mx4300 (non HomeWrk).

yes, I can confirm it won't :slight_smile: (don't ask me how I know)

Will you get another HomeWRK or MX4300?

should be HomeWRK , at the same place I got from last time.

@asd111333 , @lytr , can you share your config.buildinfo by any chance? I've downloaded one for MX4200 from snapshot, to use as a starting point - but it seem to have many fw packages selected, and some other stuff I'm not sure about. This is first time I'm trying to build openwrt.

You can use https://github.com/asd333111/openwrt/blob/mx4300-bootargs-patch/.config_qualcommax as the basic config and add the packages you want with make menuconfig.

Thanks, exactly what I need.

Can you post info about ubi volumes (in u-boot):

set mtdparts 'mtdparts=nand0:0x1db00000@0x4a00000(rootfs),0x1db00000@0x22500000(rootfs_1)'
ubi part rootfs
ubi info l
ubi part rootfs_1
ubi info l

?

Looks like I may have bricked one in haste.

All I get now is a solid blue light when powered on and blue light never starts to flash (ie boot kernel). Anything I can do to recover?

serial port ?

You can try this: OpenWrt support for Linksys MX4200 - #1203 by lytr

thanks. not sure how, but looks like I've messed up both nand areas. Serial port it will be. i've seen the disassembly pictures, but what's the best way to get the top off. i'm struggling to take the top off.