Upgrading MX60/MX60W from 21.02 to current without UART

Hello All,

Been using OpenWrt for a long time so I'm pretty familiar with the UART and Serial connections. Recently I seem to have fried my UART adapter (RXD is always on for some reason) and I have a need to upgrade some MX60 units.

I already successfully completed this upgrade on my MR16 without UART.

IS there an equivalent "I_want_a_brick=1" method to flash the MX60? These units aren't mission critical, but I would like them to survive without me buying another UART adapter (something I'm working on today/this week)

My current version is OpenWrt 21.02.3 r16554-1d4dea6d4f / LuCI openwrt-21.02 branch git-22.083.69138-0a0ce2a

Upgrading from 21.02 to 22.03 should be straightforward, using the normal sysupgrade process. You should not need serial or anything special - just download the sysupgrade image and use the built-in firmware upgrade method.

Having serial available is always a good idea in case things go sideways, but this particular upgrade should be pretty simple and drama free.

For the MX60 and MX60W have some Kernel issue where we need to repartition some of the MTD in order to make it large enough for the newer Kernels. It says you need to do it via UART, and when I upload the sysupgrade image it tells me a bunch of warnings about upgrade not supported.

I see that in the documentation for the initial installation and also for the ar71xx to ath79 transition. But where are you seeing that the sysupgrsde from 21.02 to 22.03 requires serial (it is possible I’m just missing it).

Here: https://openwrt.org/toh/meraki/mx60

That said, it also warns me when I run the upgrade procedure from the web interface that it's not a supported upgrade.

I don’t have specific experience with that device, so I don’t want to give you bad information - please take my advice with a grain of salt.

But as I read that info, it seems like that is the initial installation (first time to openwrt).

What firmware image did you attempt to install? (What is the exact filename?)

Exact filename is:openwrt-22.03.5-apm821xx-nand-meraki_mx60-squashfs-sysupgrade.bin

Well, that is the image I would have recommended. So it does seem that you need the serial adapter after all. Or, at least, I’m not going to tell you to force the upgrade without one because I don’t want to put you at risk to brick the thing.

1 Like

Serial adapter ordered. The MR16 had the same UART requirement, but I was able to flash by hacking some files on the device to reformat the mtd partitions to a larger size during the flash.

1 Like

From within OpenWrt, you can use fw_setenv and its kin to change boot environment variables without a UART. It's also important to increase meraki_loadaddr to properly load and boot the new larger kernels.

1 Like

The issue is I don't know what to change it to in order to make it large enough, but the process is fully documented using uboot and loading a kernel from tftp via UART.

A second question: Maybe my flash is already laid out with large enough partitions. What commands would I use to check existing partition sizes, and what is the size needed to support newer kernels? Is it 10MB?

This is what I am running (with 23.05.0-rc2)

root@MX60-1:~# fw_printenv
preboot=echo;echo Set serverpath and run meraki_netboot to netboot;echo
nload=${netloadmethod} 200000 ${serverpath}u-boot-nand.bin
nupdate=nand erase 0 0x00200000 ;nand write 200000 0 0x00100000
nupd=run nload nupdate
meraki_bootargs=setenv bootargs root=/dev/ram console=ttyS0,${baudrate} ubi.mtd=ubi MERAKI_BOARD=buck mtdoops.mtddev=oops ${extra_bootargs}
meraki_bootlinux=bootm ${meraki_loadaddr_kernel} ${meraki_loadaddr_ramdisk} ${meraki_loadaddr_fdt}
meraki_boot=run meraki_ubi meraki_bootargs ; run meraki_load1 meraki_checkpart meraki_bootlinux; run meraki_load2 meraki_checkpart2 meraki_bootlinux
meraki_checkpart=meraki checkpart ${meraki_loadaddr}
meraki_checkpart2=meraki checkpart ${meraki_loadaddr} skiphash
meraki_netboot=run meraki_load_net meraki_bootargs meraki_checkpart2 meraki_bootlinux
meraki_load1=ubi read ${meraki_loadaddr} part1
meraki_load2=ubi read ${meraki_loadaddr} part2
meraki_load_net=${netloadmethod} ${meraki_loadaddr} ${serverpath}${meraki_bootfile}
meraki_ubi=ubi part ubi
meraki_ubi_loadfile=${netloadmethod} 200000 ${serverpath}${meraki_ubifile}
meraki_ubi_update_nand=nand erase 0x00240000 0x3fdc0000 ; nand write 200000 0x00240000 ${filesize}
meraki_ubi_update=run meraki_ubi_loadfile meraki_ubi_update_nand
meraki_update_part1=run meraki_ubi meraki_load_net meraki_write1
meraki_update_part2=run meraki_ubi meraki_load_net meraki_write2
meraki_write1=ubi write ${meraki_loadaddr} part1 ${filesize}
meraki_write2=ubi write ${meraki_loadaddr} part2 ${filesize}
factory_cmdline=setenv bootargs root=/dev/ram ramdisk_size=${factory_ramdisk_size} rw ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:off panic=1 console=ttyS1,${baudrate}
factory_boot=tftp ${factory_kernel_addr_r} ${factory_bootfile};tftp ${factory_fdt_addr_r} ${factory_fdt_file};tftp ${factory_mtd_addr_r} ${factory_ramdisk_file};run factory_cmdline;bootm ${factory_kernel_addr_r} ${factory_mtd_addr_r} ${factory_fdt_addr_r}
ver=U-Boot 2009.08-00049-g0ee25dd Meraki MX60 (Jul 27 2012 - 14:59:20)
owrt_load1=ubi read ${meraki_loadaddr} kernel
owrt_load2=ubi read ${meraki_loadaddr} recovery
lede_bootkernel=bootm ${meraki_loadaddr_kernel} - ${meraki_loadaddr_fdt}
owrt_bootkernel=bootm ${meraki_loadaddr}
owrt_bootargs=setenv bootargs console=ttyS0,${baudrate} rootfstype=squashfs mtdoops.mtddev=oops
owrt_boot=run meraki_ubi owrt_bootargs; run owrt_load1 meraki_checkpart lede_bootkernel; run owrt_load2 owrt_bootkernel
owrt510_boot=run meraki_ubi owrt_bootargs; run owrt_load1 owrt_bootkernel; run owrt_load2 owrt_bootkernel
bootcmd=run owrt510_boot

Note that if fw_printenv does not work for you (shows "CRC Error, using default environment), you need to configure it as described here:

My mtdparts is identical to yours, what specific lines in what you posted are relevant to my issue? There are a lot of lines.

My address info seems to match yours as well. It's possible I fixed it back when I was responding to your post back in 2018.


I think the only thing needed between the wiki instructions and a new version is to change meraki_loadaddr from the factory original 800000 to 1000000. That is a change to RAM utilization not flash, it provides 16 MB of space for the uncompressed kernel instead of 8.

So are there command I can perform within the OS or do I need to do this via the boot loader?

Now that I've processed what was said, I think the following is true.

The RAM change from 8000000 to 1000000 is just an env variable that needs to be updated, and I should be able to use the firmware tools to make the change from within openwrt.

true statement?

Are you saying that's missing from the Wiki?

A sysupgradre from 22.03.2 to 23.05.0-rc3 failed for me today, as it has been.

This worked for me in UART:

#stopped serial boot
=> setenv meraki_loadaddr 1000000
=> saveenv
  • Rebooted device
  • It successfully booted to 23.05.0-rc3

I have a Second device, in UART I had to enter the recovery boot:

=> setenv meraki_loadaddr 1000000
=> saveenv
=> run meraki_ubi owrt_bootargs; run owrt_load2 owrt_bootkernel

I was then able to sysupgrade to 23.05.0-rc3. Oddly, my recovery image was also 22.03.2.

From within OpenWRT env I did fw_setenv meraki_loadaddr=1000000 and it fails to boot now with amber LED. Will be plugging in the UART soon I guess to sort that out.

Any ideas why changing the ram size breaks what I have going?

  • Did you run fw_printenv first to verify it works (I just tested that now - and realize that command doesn't work for me)?
  • Did you add the owrt510_boot envroment configs too?