Recently, MikroTik released new routerboard, the RB951G-2HnD. I got my device on Monday. It’s the new SOHO router with twice faster CPU, twice more RAM and NAND then present in RB751G-2HnD. In my personal opinion, it’s definitely the best home router i’ve used.

Just as always, when I get something new, I try to break the things :)

The patches are already present in trunk.

You can get latest .npk build from http://downloads.openwrt.org/snapshots/trunk/ar71xx.mikrotik/ on http://downloads.ayufan.eu/artifacts/openwrt-trunk-ar71xx-mikrotik-npk/.

The Device

All the device specs can be found here:

The RB951G PCB

Getting inside the OpenWrt

This is more like a challenge to me. After two days of work, I have ready OpenWrt compilation on my RB951G. The first day I spent on trying to get access to the device. I tried using UART, but in the end I broke all the pins. The next day, I thought of getting access through the USB port. I used USB Ethernet adapter for which I prepared compilation with slightly different network configuration. After while I got access to the device shell.

The next think was to make the network work. The change was rather simple. I used RB751G device mappings as the reference. I removed the:

ath79_eth0_data.mii_bus_dev = &ath79_mdio0_device.dev;
ath79_eth0_pll_data.pll_1000 = 0x06000000;

Indeed, network was working, but not the wireless. Device couldn’t find the calibration data. The only reasonable explanation was the layout of flash device. The flash is small (64kB) serial memory where device specific parameters are saved, ie.: bios, serial number, device type, mac addresses, etc.

The problem was that flash didn’t get discovered. From dmesg it looked like kernel doesn’t contains proper device definition. The flash present on RB951G uses not yet defined m25p80 device: the mx25l5121e. After googling a while I got proper patch for the drivers/mtd/devices/m25p80.c.

The last thing was to mount the SPI device. I used partition layout from RB2011UAS mappings. The flash got discovered and mounted. I could check if soft and hard configs were really where it should be. The answer is no. The flash layout was different.

The new flash layout is:

  • Hard config is at 0xc000 (0xb000 previously)
  • Bios is at 0xd000 (0xc000 previously)
  • Soft config is at 0xe000 (0xf000 previously)

After fixing the flash layout the device did found out the wireless card.

The OpenWrt

After spending a few hours, I managed to get the OpenWrt up and working.

The patch is built against OpenWrt trunk’s revision 35489. You can download it here: openwrt-rb951g.patch.

What works:

  • Network and the switch chip
  • NAND
  • Wireless
  • USB
  • UART

What doesn’t:

  • User LED

How to install

There are few possible ways to get the OpenWrt to the device. The most simple way is to use fixed MikroTik’s Netinstall. I modified the binary to allow install unsigned and custom built NPK files (MikroTik’s RouterOS Package Files).

  1. Read this page: http://wiki.mikrotik.com/wiki/Manual:Netinstall Instead of Netinstall provided by MikroTik use the fixed one: netinstall-5.23-fixed
  2. Select and install OpenWrt package: openwrt-r35489-13.0alpha1-mipsbe
  3. Switch the cable from port 1 into any other. Wait for reboot and telnet 192.168.1.1.

There are different methods, but they require to setup own DHCP and TFTP server and configure BOOTP protocol. All the files required to install using bootp can be found here: rb951g-raw-bin

Files

Thanks

I would like to thank a idahorazor2 from OpenWrt community for initial contribution. Good luck with getting the RB951 (non-G series) up and ready ![:)][1]