Updated: 25 Oct 2015
EdgeRouer Lite (ERLite-3), Cavium OCTEON SoC
MIPS64 500MHz 2-core
Binaries for Debian
These kernels are for both NFS boot and USB boot. The supported file systems are ext3, ext4, fuse and nfsroot.
- Debian 8 jessie
- rootfs : Debian/MIPS jessie debootstrap rootfs
- vmlinux : Linux-4.3.4 kernel, USB workaround (.config here)
- OLD
- vmlinux : Linux-4.2.4 kernel, USB workaround (.config here)
- vmlinux : Linux-3.18.13 kernel (.config here)
- Debian 7 wheezy
- rootfs : Debian/MIPS wheezy debootstrap rootfs
- OLD vmlinux : Linux-3.14.1 kernel (.config here)
- OLD vmlinux : Linux-3.11.3 with usb workaround
Serial Console Setup
- Plug off the power cable.
- Setup your CISCO console cable.
- Open serial terminal such as minicom. The serial configuration is 115200bps 8N1. Don’t forget turning off HW/SW flow controls.
- Plug in the power cable. Then the boot loader will put messages.
- Send Control-C to hook the boot loader. Then you’ll see the prompt:
Octeon ubnt_e100#
USB Stick Setup
Prior to USB boot, you have to do following steps. If you don’t want to use USB boot, please ignore this section.
- Detach the USB stick from ERLite3.
- Mount the USB stick on your PC. You’ll see two partitions. The first one is FAT and the second one is ext3.
- On the first partition, replace the Linux kernel file “vmlinux.64” with new version.
- On the second partition, erase all existing files, then extract debian rootfs.
USB Boot (single user mode)
Go to the serial console and type:
fatload usb 0 $loadaddr vmlinux.64
bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw single
You’ll see the debian init process in your serial console. Initially, password for root is blank. After creating users, you can remove “single” keyword from the boot command line.
Network Boot (single user mode)
Prior to network boot, you have to setup tftp server, NFS server and optionally DHCP server.
If you use dhcp server,
dhcp
tftpboot $loadaddr vmlinux
bootoctlinux $loadaddr coremask=0x3 root=/dev/nfs rw ip=dhcp single
Or manually, [192.168.1.1 is gw, 192.168.1.2 is tftp/nfs server, 192.168.3 is ERLite-3]
setenv serverip 192.168.1.2
setenv ipaddr 192.168.1.3
tftpboot $loadaddr vmlinux
bootoctlinux $loadaddr coremask=0x3 ip=192.168.1.3::192.168.1.1:255.255.255.0:edge:eth0:off root=/dev/nfs rw nfsroot=192.168.1.2:/nfsroot/,tcp,vers=3 single
Saving Boot Settings
After confirming boot process, you can save your favorite boot command lines.
setenv bootcmd 'dhcp;tftpboot $loadaddr vmlinux
;bootoctlinux $loadaddr coremask=0x3 root=/dev/nfs rw ip=dhcp
'
saveenv
printenv
reset
Restoring Boot Settings
You can restore boot command lines with the initial value.
setenv bootcmd 'fatload usb 0 $loadaddr vmlinux.64;bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw'
saveenv
printenv
reset
Avoiding USB Problem 1
Even on official 2.6.32-UBNT kernel, you probably get many errors with any USB devices except the flash memory which comes from the board. I found that using USB1.1 HUB avoids this problem.
Actually, 2.6.32.13-UBNT is configured without CONFIG_USB_EHCI_HCD. In other words, that kernel doesn’t have USB2.0 functionality though chip supports it. [see discussion]
I guess ERLite-3 board has electric problem to support high transfer speed. For me, some CAT5e flat cables are not capable to support 1000Mbps link with ERLite-3. This suggests ERLite-3 is electrically noisy.
Avoiding USB Problem 2
In addition, you’ll get “parent hub has no TT’” errors in kernel 3.11+. Here is a one-line workaround for this problem:
*** ./drivers/staging/octeon-usb/octeon-hcd.c.orig --- ./drivers/staging/octeon-usb/octeon-hcd.c *************** *** 696,699 **** --- 696,700 ----
}
hcd->uses_new_polling = 1; +
hcd->has_tt = 1;
priv = (struct octeon_hcd *)hcd->hcd_priv;
I’m not sure whether the device really has TT, but it works with USB devices.
For more information, see http://www.serverphorums.com/read.php?12,274616
USB Extension Example
My ERLite-3 has now USB1.1 hub! I punched a hole on the box. Don’t worry, I have another ERLite-3.
Suitable USB Stick
As Gentoo people says, Sandisk Cruzer Fit 16GB works for me. It costs less than $10.
Bus 001 Device 002: ID 0781:5571 SanDisk Corp. Cruzer Fit
Toolchain for Kernel
“mips64-unknown-linux-gnu-” cross gcc and binutils work fine to build linux kernel. If you don’t want to build the cross toolchain by yourself, you can download it from cnusers. It takes a few days to complete registration.
Userland GCC
Debian has 32-bit userland on MIPS port. Thus by defaut, “gcc” generates 32-bit code on the platform. To compile 64-bit applications, install “gcc-multilib” and “libc6-dev-mips64” packages, then call gcc with options such as “-march=mips64r2 -mabi=64“.
Links
- http://wiki.gentoo.org/wiki/MIPS/ERLite-3
- http://www.linux-mips.org/archives/linux-mips/2013-07/msg00064.html
- http://www.360doc.com/content/12/0312/15/8887027_193743206.shtml
- http://www.cnusers.org/
For Japanese users: See also this post
Any comments and questions are welcome!
for USB2.0 they use CONFIG_USB_OCTEON_HCD=y
Thanks Dan, that was my misunderstanding. I’ll correct the post.
Ubiquiti provides a GPL archive containing the sources of all open-source software that runs on this router. A small FAT32 one for the Linux Kernel image and a big ext3 one containing the root filesystem in a squashfs file.