Set up an EdgeRouter Pro for OpenWRT MIPS demo

This page describes how to setup a Ubiquiti EdgeRouter Pro (ERPro-8) to run a Baserock-built OpenWRT demo.

The following parts are needed:

  • Ubiquiti EdgeRouter Pro (ERPro-8)
  • USB flash pen drive or USB HDD (1GB or more recommended)
  • Serial cable, to connect to the EdgeRouter

Prepare the boot device

Get the system image from download.baserock.org

Prepare your boot device, with a first partition (boot) of type FAT and a second partition for the rootfs of either type btrfs or ext4 (recommended). Recommended sizes of the partitions are 128MiB for boot and 1GiB for the root.

mkfs.fat -n BRBOOT /dev/sdX1
mkfs.ext4 -L baserock /dev/sdX2

Now mount the two partitions:

mkdir /mnt/rootfs
mount LABEL=openwrt /mnt/rootfs
mkdir /mnt/rootfs/boot
mount LABEL=BRBOOT /mnt/rootfs/boot

And then we unpack the image.

tar xf openwrt-mips64b-rootfs.tar.xz -C /mnt/rootfs/

Finally unmount the filesystems.

umount /mnt/rootfs/boot /mnt/rootfs

Booting the system

Connect to the EdgeRouter Pro using its CONSOLE serial port with a terminal program, eg. PuTTY. The serial parameters are 115200bps 8 bits, no parity, 1 stop bit (115k2 8N1).

Connect the boot drive to the EdgeRouter's USB port, then power on the EdgeRouter.

Interrupt U-Boot when prompted Hit any key to stop autoboot.

Type

usb start

If you get Device NOT ready, repeat the command. Then type

fatload usb 0:1 0x20000000 vmlinux-4.1.0-rc7

The kernel should then load. Finally type

bootoctlinux 0 numcores=2 endbootargs mem=0 root=/dev/sda2 rw rootwait

OpenWRT should then boot.

Demo video

Video Link