[HOWTO] Installing OpenWrt on Cisco Meraki MX60

It was; @chunkeey has explained that the relevant code had been in place since 22.03-rc1. Nevertheless, thank you for explaining further.

While we're having this conversation, there's a related question I asked above, but it seems to have gone unnoticed. By a sheer accident (I got distracted in the middle of the process), when trying to recover from a botched sysupgrade, I ran these commands:

setenv owrt510_boot run meraki_ubi owrt_bootargs\; run owrt_load1 owrt_bootkernel\; run owrt_load2 owrt_bootkernel
setenv bootcmd run owrt510_boot

twice, folowed by saveenv both times. Later, looking at the console log that I kept running, I noticed that the first time saveenv ran, it output this message:

Writing to redundant Nand

On the second run, the message was slightly different:

Writing to Nand

So here's a potentially silly question: what, if any, is the significance of writing to redundant NAND as opposed to writing to NAND?

I attempted to flash a custom firmware from the Firmware Selector that had Wireguard installed.

I released i failed to add luci-ssl - so I made another image and flashed again. I not cannot access the web GUI - I receive err_ssl_protocol_error

See: 22.03.2 err_ssl_protocol_error

Flashing again doesn't seem to change the firmware.

Edit: so, I finally booted to a amber light - I was able to connect by Etherent again and re-flash.

Odd.

EDIT2: It doesn't seem to flash either - but it reboots and the light turns back green. :man_shrugging:

Hello, just looking at https://openwrt.org/toh/meraki/mx60
I have stalled at step 6/7.

I'm not familiar with the commands needed to upload a copy of the squashfs-sysupgrade.bin image to the board via SCP/HTTP Server

A few notes on the MX60 install process:

  • Disregard stuff about LEDE or old versions-- that should be deleted from the wiki.
  • While you're in the bootloader, change meraki_loadaddr to 1000000 (it was 800000) to allow booting newer larger kernels. That is 16 MB of RAM for the kernel to load and uncompress. Since there is 512MB of RAM available, even 16 is kind of small.
  • It may be necessary to reformat the whole UBI if you get UBI errors. Be sure to save and recreate the volume named board-config (size 128 kB) which contains the factory MAC address as well as the serial number and a few more unit-specific bytes that are presently not important to OpenWrt.
  • I could never get the recovery partition scheme to work. It is simple enough to debrick the device using serial if ever necessary.

The boot an initramfs and then install with sysupgrade is common to a lot of devices. To get the sysupgrade image into the initramfs /tmp directory, two methods can be used.

  • scp method: Download the sysupgrade to your PC. Connect a router LAN port to PC Ethernet port. Using a PC command prompt, change directory to where the file is stored, then scp filename root@192.168.1.1:/tmp
  • http(s) method: Connect router WAN port to a LAN having Internet access. The IP subnet of this network should not be 192.168.1.0. Use your PC web browser to copy the URL of the sysupgrade file on the server to PC clipboard. On the serial terminal, wget -O /tmp/firmware.bin paste the URL and press enter. The router should download the file direct from the OpenWrt server.
1 Like

Before going into SCP, let me ask you something. Does your router have Internet access? If so, you can download the firmware from the Internet from the command line:

cd /tmp 
wget https://downloads.openwrt.org/releases/22.03.3/targets/apm821xx/nand/openwrt-22.03.3-apm821xx-nand-meraki_mx60-squashfs-sysupgrade.bin

If the router has no Internet access, but has access to LAN and there's a HTTP-accessible machine on the LAN, you can do something very similar. Copy the firmware file to that machine and upload it to the router from there:

cd /tmp 
wget http://192.168.12.34/openwrt-22.03.3-apm821xx-nand-meraki_mx60-squashfs-sysupgrade.bin

That's HTTP. With SCP, what you need to do depends on what you have. If you're sunning Linux on the administrator's computer, scp is a command-line utility. You can use it like so:

scp your_file user@router:/tmp

Example:

scp sysupgrade.bin root@192.168.1.1:/tmp

This will upload file sysupgrade.bin from the current directory on the local machine to a remote machine on behalf of user root to machine 192.168.1.1 to the directory /tmp.

If you're on Windows, you can use WinSCP, a GUI program that transfers files over SCP (hence the name).

Anybody volunteering for this task?

1 Like

To my understanding, it was updated (with current installation instructions, at least).

I'll look over it.

1 Like

@mk24

I've looked over the MX60(W) Wiki page, the original booting instructions were removed. But, the environment commands are available so that you can easily switch/revert to flashing older versions. The install instructions are up-to-date - especially the u-boot commands. The last major revisions are when I edited with the new flashing instructions.

Perhaps I'm overlooking what you mean?

Let me know what you're referencing and I'll be happy to edit it.

For future reference and clarity, you CAN or CAN NOT just run sysupgrade or load a current image on a MX60(W) that was flashed using the old instructions years ago?

I have one of each and would like to keep them up to date since they are a reasonably good piece of hardware.

You can load old versions if you follow the red notation on the page:

You won't be able to use older OpenWrt releases without switching the bootcmd back to owrt_boot

Enjoy.

1 Like

I upgraded to a snapshot and it failed to boot because meraki_loadaddr at its original setting is too small. 22.03.2 worked though.

2 Likes

If OpenWrt can be booted, it is possible to examine / change the uboot environment from inside OpenWrt, without a serial port. To do this install uboot-envtools and edit /etc/fw_env.config to contain this:

/dev/mtd1 0x00000 0x20000 0x20000 
/dev/mtd1 0x80000 0x20000 0x20000

Then the commands fw_printenv and fw_setenv can be used.

2 Likes

Hi, i tried to do it,
but the above commands not working
is there any news about it
thanks for help

It's unclear where you're running these commands, when, etc.

The Wiki instructions will install OpenWrt (albeit with the issues discussed in his thread - which I understand have not been fixed by the developers yet) - so please explain what step you're on, etc.

Hi
I followed the exact instruction same as above
Step by step
From top to Bottom

OK, the original poster would have to answer questions about the instructions in this thread.

Have you tried the official Wiki?

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

I understand; but you didn't explain what step.

Maybe you can show a screenshot or paste the output you're seeing?

The wiki is not very complete. This thread containing my and others experience installing should also be carefully reviewed.

Did the initram OpenWrt boot?

When you say a command "did not work," post the error message.

Removing those volumes is optional it won't affect the installation other than allowing a little more flash space (which isn't an issue since it's almost a GB to start with). They need only be removed once. Like removing anything, once it is gone you will get an error trying to remove it again.

3 Likes

All steps completed. But booted to a switch after a reboot it had no serial. when power cycled boots to switch and brick (with all flashing Link lights) then WAN Link, only no lan no serial.

What happened?

To be clear, you no longer have a U-Boot?

What steps?

Were you flashing from OEM, had you loaded initramfs image to ROM...issue sysupgrading OpenWrt...what?

Provide as many details as possible.

So the wireless is implemented as a pcie card? Does the MX60 have a pcie slot?