For the MX4200v2 as well. The model is SPNMX42 and it's distributed by Community Fibre in the UK but it's the same hardware.
The process to switch partitions is the same as for v1. fw_setenv boot_part 1 && reboot
takes you to kernel
while fw_setenv boot_part 2 && reboot
takes you to alt_kernel
.
ubus call system board
{
"kernel": "6.6.41",
"hostname": "OpenWrt",
"system": "ARMv8 Processor rev 4",
"model": "Linksys MX4200v2",
"board_name": "linksys,mx4200v2",
"rootfs_type": "squashfs",
"release": {
"distribution": "OpenWrt",
"version": "SNAPSHOT",
"revision": "r26996-73832e1a48",
"target": "qualcommax/ipq807x",
"description": "OpenWrt SNAPSHOT r26996-73832e1a48"
}
}
cat /tmp/sysinfo/board_name
linksys,mx4200v2
cat /proc/mtd
dev: size erasesize name
mtd0: 00100000 00020000 "0:sbl1"
mtd1: 00100000 00020000 "0:mibib"
mtd2: 00080000 00020000 "0:bootconfig"
mtd3: 00080000 00020000 "0:bootconfig1"
mtd4: 00300000 00020000 "0:qsee"
mtd5: 00300000 00020000 "0:qsee_1"
mtd6: 00080000 00020000 "0:devcfg"
mtd7: 00080000 00020000 "0:devcfg_1"
mtd8: 00080000 00020000 "0:apdp"
mtd9: 00080000 00020000 "0:apdp_1"
mtd10: 00080000 00020000 "0:rpm"
mtd11: 00080000 00020000 "0:rpm_1"
mtd12: 00080000 00020000 "0:cdt"
mtd13: 00080000 00020000 "0:cdt_1"
mtd14: 00080000 00020000 "0:appsblenv"
mtd15: 00100000 00020000 "0:appsbl"
mtd16: 00100000 00020000 "0:appsbl_1"
mtd17: 00080000 00020000 "0:art"
mtd18: 00040000 00020000 "u_env"
mtd19: 00020000 00020000 "s_env"
mtd20: 00020000 00020000 "devinfo"
mtd21: 09600000 00020000 "kernel"
mtd22: 09000000 00020000 "rootfs"
mtd23: 09600000 00020000 "alt_kernel"
mtd24: 09000000 00020000 "alt_rootfs"
mtd25: 00200000 00020000 "sysdiag"
mtd26: 00080000 00020000 "0:ethphyfw"
mtd27: 0b800000 00020000 "syscfg"
mtd28: 00900000 00020000 "0:wififw"
fw_printenv
altkern=a680000
auto_recovery=yes
baudrate=115200
bdf_country=UK_ME_EU
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:xx:xx:xx
eth2addr=E8:9F:80:xx:xx:xx
eth3addr=E8:9F:80:xx:xx:xx
eth4addr=E8:9F:80:xx:xx:xx
eth5addr=E8:9F:80:xx:xx:x
ethact=eth0
ethaddr=e8:9f:80:xx:xx:xx
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_MX4200CF_2.0.5.210892_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
boot_part_ready=3
boot_part=1
hexdump -C -n 256 /dev/mtd21
00000000 d0 0d fe ed 00 52 16 60 00 00 00 38 00 52 12 74 |.....R.`...8.R.t|
00000010 00 00 00 28 00 00 00 11 00 00 00 10 00 00 00 00 |...(............|
00000020 00 00 00 6c 00 52 12 3c 00 00 00 00 00 00 00 00 |...l.R.<........|
00000030 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................|
00000040 00 00 00 03 00 00 00 04 00 00 00 5c 66 a2 bb 78 |...........\f..x|
00000050 00 00 00 03 00 00 00 29 00 00 00 00 41 52 4d 36 |.......)....ARM6|
00000060 34 20 4f 70 65 6e 57 72 74 20 46 49 54 20 28 46 |4 OpenWrt FIT (F|
00000070 6c 61 74 74 65 6e 65 64 20 49 6d 61 67 65 20 54 |lattened Image T|
00000080 72 65 65 29 00 00 00 00 00 00 00 03 00 00 00 04 |ree)............|
00000090 00 00 00 0c 00 00 00 01 00 00 00 01 69 6d 61 67 |............imag|
000000a0 65 73 00 00 00 00 00 01 6b 65 72 6e 65 6c 2d 31 |es......kernel-1|
000000b0 00 00 00 00 00 00 00 03 00 00 00 1b 00 00 00 00 |................|
000000c0 41 52 4d 36 34 20 4f 70 65 6e 57 72 74 20 4c 69 |ARM64 OpenWrt Li|
000000d0 6e 75 78 2d 36 2e 36 2e 34 31 00 00 00 00 00 03 |nux-6.6.41......|
000000e0 00 51 5c 65 00 00 00 1b 1f 8b 08 00 00 00 00 00 |.Q\e............|
000000f0 02 ff ec ce bd 6a 93 61 18 00 d0 a7 f9 c0 41 94 |.....j.a......A.|
hexdump -C -n 256 /dev/mtd23
00000000 d0 0d fe ed 00 52 16 60 00 00 00 38 00 52 12 74 |.....R.`...8.R.t|
00000010 00 00 00 28 00 00 00 11 00 00 00 10 00 00 00 00 |...(............|
00000020 00 00 00 6c 00 52 12 3c 00 00 00 00 00 00 00 00 |...l.R.<........|
00000030 00 00 00 00 00 00 00 00 00 00 00 01 00 00 00 00 |................|
00000040 00 00 00 03 00 00 00 04 00 00 00 5c 66 a2 bb 78 |...........\f..x|
00000050 00 00 00 03 00 00 00 29 00 00 00 00 41 52 4d 36 |.......)....ARM6|
00000060 34 20 4f 70 65 6e 57 72 74 20 46 49 54 20 28 46 |4 OpenWrt FIT (F|
00000070 6c 61 74 74 65 6e 65 64 20 49 6d 61 67 65 20 54 |lattened Image T|
00000080 72 65 65 29 00 00 00 00 00 00 00 03 00 00 00 04 |ree)............|
00000090 00 00 00 0c 00 00 00 01 00 00 00 01 69 6d 61 67 |............imag|
000000a0 65 73 00 00 00 00 00 01 6b 65 72 6e 65 6c 2d 31 |es......kernel-1|
000000b0 00 00 00 00 00 00 00 03 00 00 00 1b 00 00 00 00 |................|
000000c0 41 52 4d 36 34 20 4f 70 65 6e 57 72 74 20 4c 69 |ARM64 OpenWrt Li|
000000d0 6e 75 78 2d 36 2e 36 2e 34 31 00 00 00 00 00 03 |nux-6.6.41......|
000000e0 00 51 5c 65 00 00 00 1b 1f 8b 08 00 00 00 00 00 |.Q\e............|
000000f0 02 ff ec ce bd 6a 93 61 18 00 d0 a7 f9 c0 41 94 |.....j.a......A.|