Support for Meraki MS220-8P

It appears that the page hosting the stage 2 firmware is MIA, can this be placed somewhere else please?

It appears that the article is just linked incorrectly. The file is firmware.bin, not firmware.dat.

With a few changes to the process laid out by Leol, I was able to get this switch rooted and working properly (Including vlans and POE).

Things that don't work.
LEDs on the switch port don't do anything.
Once provisioning of VLAN's is completed, adding a trunk port seems to make the management interface dissappear. The DHCP server shows the switch ask for and receive an address, but you can't access it. I assume I'll have to add a permanent USB->TTL converter so that I can console in and add a management address or something.

I noticed on mine with it rooted that interfaces can't really been seen or accessed in the conventional way.

Pretty sure for management, it's using a loopback interface that has a NAT somewhere between the front facing switchports and the loopback. That might give you some clues on how it's applied after you've messed about with the ports as you mentioned. Worst case let me know and I'll get mine powered up on the workbench.
I'd be fascinated to know whether you can have the front facing ports run like conventional Ethernet interfaces, or if we are simply stuck with the Vitesse programming, might dictate the long term viability of these as a smart switch or simply a rooted dumb switch.

Hey Guys,

I have an updated source from Maraki details below:

The open source you requested for the MS220 can be downloaded at
https://dl.meraki.net/switch-11-22-ms220-20190917.tar.bz2

Instructions for building the OpenWRT source code and the Linux kernel for the MS200 are below.
After downloading and unpacking the tarball:

To build OpenWRT firmware:

cd meraki-firmware/openwrt
cp config-elemental-3.18 .config
make oldconfig
make -j1 BOARD=elemental-3.18 OPENWRT_EXTRA_BOARD_SUFFIX=_3.18

To build Linux-3.18 kernel:

cd meraki-firmware/linux-3.18
cp ../openwrt/target/linux/elemental-3.18/config .config
make CROSS_COMPILE=../openwrt/staging_dir_mipsel_nofpu_3.18/bin/mipsel-linux-musl- ARCH=mips oldconfig
make CROSS_COMPILE=../openwrt/staging_dir_mipsel_nofpu_3.18/bin/mipsel-linux-musl- ARCH=mips prepare
touch rootlist
make CROSS_COMPILE=../openwrt/staging_dir_mipsel_nofpu_3.18/bin/mipsel-linux-musl- ARCH=mips vmlinux

Which email are you using to contact Cisco/Meraki for the GPL source code?

I cannot find either of these switch-*.tar.bz2 archives via the Cisco Meraki GPL link: https://meraki.cisco.com/support/#policies:gpl

I emailed opensource@meraki.com - and no they don't post links on the website for some reason.

Apparently this email address is no longer valid?

550 5.1.1 The email account that you tried to reach does not exist. Please try double-checking the recipient's email address for typos or unnecessary spaces.

Sorry my typo open-source@meraki.com

Were you able to build and flash openwrt to the switch?

No not yet. I have been trying to build the Meraki source code but ran into issues.

  • I started with a clean ubuntu 18.04.3 LTS build.

  • Installed libgtk2.0-dev

  • Installed make

  • extracted the tar file tar -xvf switch-11-22-ms220-20190917.tar.bz2

  • make oldconfig --> results https://pastebin.com/TtAAe3xw everything seems ok

  • make -j1 BOARD=elemental-3.18 OPENWRT_EXTRA_BOARD_SUFFIX=_3.18

Error message output:

 --->  toolchain/install
--->  toolchain/kernel-headers/prepare
Build failed. Please re-run make with V=99 to see what's going on (or look at make-log)
Makefile:46: recipe for target 'kernel-headers-prepare' failed
make[2]: *** [kernel-headers-prepare] Error 1
Makefile:128: recipe for target 'toolchain/install' failed
make[1]: *** [toolchain/install] Error 2
Makefile:85: recipe for target 'world' failed
make: *** [world] Error 2
 cat make-log 
Makefile:33: recipe for target '/home/chris/meraki-firmware/openwrt/toolchain_build_mipsel_nofpu_3.18/linux/.unpacked' failed
make[3]: *** [/home/chris/meraki-firmware/openwrt/toolchain_build_mipsel_nofpu_3.18/linux/.unpacked] Error 127

I have not manage to investigate further at this point.

Interesting stuff, the Meraki MS42 appears to be based on a similar VCore-III chipset:

Low level initialization complete, exiting boot mode
[    0.000000] Linux version 3.18.122-meraki-elemental (anlester@sf201.meraki.com) (gcc version 5.4.0 (GCC) ) #1 Wed Oct 10 15:27:35 PDT 201
8
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 01019654 (MIPS 24KEc)
[    0.000000] Kernel command line:  console=ttyS0,115200 mtdparts=m25p80:0x40000(loader1),0x3c0000(boot1),0x40000(loader2),0x3c0000(boot2),0x80000(rsvd),0x600000(bootubi),0x40000(conf),0x100000(stackconf),0x40000(syslog) ubi.mtd=bootubi ubi.mtd=gen_nand.0 mem=134152192
[    0.853000] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xf1
[    0.860000] nand: Micron MT29F1G08ABADAWP
[    0.864000] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    0.876000] Scanning device for bad blocks
[    0.998000] m25p80 spi0.1: found mx25l12805d, expected m25p80
[    1.004000] m25p80 spi0.1: mx25l12805d (16384 Kbytes)
[    1.009000] 9 cmdlinepart partitions found on MTD device m25p80
[    1.015000] Creating 9 MTD partitions on "m25p80":
[    1.020000] 0x000000000000-0x000000040000 : "loader1"
[    1.035000] 0x000000040000-0x000000400000 : "boot1"
[    1.044000] 0x000000400000-0x000000440000 : "loader2"
[    1.060000] 0x000000440000-0x000000800000 : "boot2"
[    1.069000] 0x000000800000-0x000000880000 : "rsvd"
[    1.077000] 0x000000880000-0x000000e80000 : "bootubi"
[    1.089000] 0x000000e80000-0x000000ec0000 : "conf"
[    1.100000] 0x000000ec0000-0x000000fc0000 : "stackconf"
[    1.112000] 0x000000fc0000-0x000001000000 : "syslog"
[   18.256000] Module: vtss_core  .text=0xc2563000 .data=0xc2693d70 .bss=0xc26ae3a0
[   18.256000] Module: proclikefs  .text=0xc10eb000 .data= .bss=0xc10ec040
[   18.256000] Module: merakiclick  .text=0xc2e5d000 .data=0xc2fb4af0 .bss=0xc2fb4d80
[   18.256000] Module: elts_meraki  .text=0xc36b1000 .data=0xc3a46ce0 .bss=0xc3a487d0
[   18.256000] Module: vc_click  .text=0xc3c06000 .data=0xc3c4a050 .bss=0xc3c4a1e0

Meraki are refusing to release the source code for the MS42 firmware, claiming that they are only obligated to release the GPL source code for 3 years after the end-of-sale of the product. Their own website says the MS42 is under support until 2021 and the firmware on the unit I purchased is from 13/06/2019...

If it helps any, I managed to build everything (without errors) on Debian 9.
Though, I don't have the tools to flash it onto my Meraki ms220-8p. :<

Yeah that sucks I did find the EOS details

  • End-of-Sales Announcement: November 5th, 2013
  • End-of-Sales Date: April 26th, 2014
  • End-of-Support Date: April 26th, 2021

Meraki typically support for 7 years after end of sale. Not sure what they gain by not releasing the GPL.

Do you have root access to the device?

Thanks at least i know it's something wrong with my build system

I have added two more packages and have less errors:

  • gcc-arm-linux-gnueabi
  • gcc-miltilib

Build with V=99 and you'll see the exact error. I had to install the linux-headers package to successfully build the source.

However I am curious what people are doing with the built source. On my machine it's just a filesystem tree in meraki-firmware/openwrt/build_mipsel_nofpu_3.18/root/ but no flashable image.

I'm curious what other people are doing to "install" the built firmware. Are you decompiling the flash dump and replacing everything in the UBI filesystem with the contents of meraki-firmware/openwrt/build_mipsel_nofpu_3.18/root/?

So, probably this is stating the obvious, but the Cisco archive is only for the 2nd stage firmware which resides on NAND.

Their instructions produce a laughably large 45MB vmlinux, which obviously doesn't fit anywhere in NOR or NAND UBI volumes. If you use objcopy you can strip the kernel down to ~4.6MB, which seems to match the kernel in the second stage firmware image:

meraki-firmware/linux-3.18$ ../openwrt/staging_dir_mipsel_nofpu_3.18/bin/mipsel-linux-musl-objcopy -O binary -R .note -R .comment -S vmlinux vmlinux.bin

Note: I have not tried to actually boot this kernel yet, so it might be total junk.

I've asked Meraki for the GPL source code for the stage 1 kernel, since that's more interesting to me (3.18.122) as it has the hard-coded kernel command line which specifies the mtd layout, but they haven't replied yet and honestly I'm not holding my breath. Hex editing the kernel command line to change the mtd layout wrecks a checksum somewhere and Linux kernel panics very early in boot.

You can overwrite anything after loader1 and boot1, and as long as you reassemble the boot1 correctly so it doesn't fail the CRC. Accessing the data on NOR after boot1 is difficult because of the hard coded mtd layout. The stock stage 1 kernel is built with squashfs support, but no JFFS2.

I found out that MicroSemi will sell you their Linux based SDK (VSC6816) for a cool ~25k in annual support costs, but if you ask them to release the GPL sources they'll tell you to contact your sales rep (corporate code for "get bent").

Thus far I haven't been able to find a copy of the RedBoot source for Vitesse. Unsurprisingly they did not upstream their work, and Cisco isn't releasing it either. Too bad, because there are a few other manufacturers using the same Vitesse SoC in their products and a few of them appear to be using NOR+JFFS2 for booting. I've contact them for their GPL source code but thus far haven't gotten anything.

In summary, I doubt mainline OpenWrt will ever support this hardware, since it relies on a closed-source Vitesse kernel module bound to a fork of 3.18 for managing the ASIC. The best we can hope for is using the 3.18 kernel source with the module distributed by Meraki.

But, if anyone has RedBoot source code for the Vitesse ASICs, please link to it!!

1 Like

Hey @t4thfavor could you elaborate on the steps you changed from @leol blog post in order to get the VLANS and POE working. I am keen to get access to this switch and work on the management issues with Trunks

1 Like

I had to re-write some of the transfer.sh scripts to have proper sh syntax instead of bash syntax, and I had to get the kexec out of the "stage2" instead of "stage1" also when you are doing the xfer, you have to disconnect your terminal emulator or you'll just get gibberish.

the transfer and recv scripts should print either ..... or ssss and not xxxxx if you see xxxx it's not working. when you see ... or sss it's working, but will take a good 20 minutes or more.

The email thread I had with him is long, but I think that about summarizes it.

As for the switch, it's still working well. I have 3 vlans on it plus a trunk port, I am able to access the managemnet interface which has very basic port vlan controls and one page to set the management interface address.

I don't mess around with building from source anymore since I don't have patience for flashing stuff via serial terminal, and this thing needs to be taken apart to access the serial term.

If you guys figure out a good build, and a decent set of flashing instructions I might try, but I kind of need this switch to work as it's now an integral part of my home network.

Great thanks for the detailed reply @t4thfavor . Did you upstream your changed back to the gitlab repo? https://git.steamr.com/leo/meraki-220-8p

No I did not. I'm sadly lacking in proper usage of gitlabs, and generally anything Github related.