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
- Debian 7 wheezy
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:
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,
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'
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, 18.104.22.168-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
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.
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“.
For Japanese users: See also this post
Any comments and questions are welcome!