User Tools

Site Tools


MikroTik RouterBOARD 91xG 5HPnD (RB911/RB912)


CPU CPU Speed RAM (MByte) NAND (MByte) Serial Flash Ethernet PoE Wireless USB UART JTAG
AR9342 600 MHz 64 (NT5TU32M16DG–AC) 128 (Samsung K9F1G08U0D-SCB0) MX25L512E AR8033 (10M/100M/1000M) 8-30V 14W at 24V AR9342-BL1A 1x 2.0 1x onboard no pins 1x onboard?

Create image

$ mkdir /home/$USER/mikrotik/
$ cd /home/$USER/mikrotik/
$ svn co svn://
$ cd /home/$USER/mikrotik/trunk

Configure image for booting from RAM and NAND, enable regdomain set

$ make menuconfig

Target System = AR7XXX Subtarget = Mikrotik device with NAND flash Target Images = choose ramdisk and tar.gz Kernel modules → Wireless Drivers → kmod-ath Atheros common driver part → enable Force Atheros drivers to respect the user's regdomain settings (CONFIG_ATH_USER_REGD)

$ make kernel_menuconfig

Machine selection System type = Atheros AR71XX/AR724X/AR913X based boards Atheros AR71XX/AR724X/AR913X machine selection - enable MikroTik RouterBOARD 91X support

$ make V=s

Run OpenWrt in RAM

Create script: nano /tftp/

ifconfig eth0 up
dnsmasq -i eth0 --dhcp-range=, \
--dhcp-boot=openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf \
--enable-tftp --tftp-root=/home/$USER/mikrotik/trunk/bin/ar71xx/ -d -u $USER -p0 -K --log-dhcp --bootp-dynamic
  • Run script from root/sudo
  • Unplug power jack from PoE injector
  • Hold reset button
  • Plug power jack
  • After LEDS stopped blinking release reset button

Your RB91x should boot into OpenWRT with IP

Flash OpenWRT to Mikrotik

To flash openwrt-ar71xx-nand-vmlinux-lzma.elf you must login to router via telnet and then copy OpenWrt image to /tmp/

Find kernel and rootfs partitions from /proc/mtd

root@OpenWrt:/# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 0000b000 00001000 "routerboot"
mtd1: 00001000 00001000 "hard_config"
mtd2: 00001000 00001000 "bios"
mtd3: 00001000 00001000 "soft_config"
mtd4: 00040000 00020000 "booter"
mtd5: 003c0000 00020000 "kernel"
mtd6: 07c00000 00020000 "rootfs"

Erase them, there may be bad blocks detected and skipped during erase

root@OpenWrt:/# mtd erase /dev/mtd5
root@OpenWrt:/# mtd erase /dev/mtd6
root@OpenWrt:/# mkdir /mnt/kernel
root@OpenWrt:/# mkdir /mnt/rootfs
root@OpenWrt:/# mount /dev/mtdblock5 /mnt/kernel
root@OpenWrt:/# mount /dev/mtdblock6 /mnt/rootfs

Change password to enable ssh

root@OpenWrt:/# passwd

Copy kernel & rootfs to RB91x

$ cd /home/$USER/mikrotik/trunk
$ scp bin/ar71xx/openwrt-ar71xx-mikrotik-vmlinux-lzma.elf root@
$ scp bin/ar71xx/openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz root@

Flash kernel & rootfs

root@OpenWrt:/# mv /tmp/openwrt-ar71xx-mikrotik-vmlinux-lzma.elf /mnt/kernel/kernel
root@OpenWrt:/# chmod +x /mnt/kernel/kernel
root@OpenWrt:/# umount /mnt/kernel
root@OpenWrt:/# tar -C /mnt/rootfs -xvzf /tmp/openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz
root@OpenWrt:/# umount /mnt/rootfs

Stop and finally

root@OpenWrt:/# reboot

After reboot you should be able to login via telnet

About: Helpfull info:

toh/mikrotik/rb91xg_5hpnd.txt · Last modified: 2014/07/06 10:07 by voron