Mips Development Environments

Full Debian "Lenny" on an RB433AH board (Atheros AR7161)

I have developed a nice technique for transforming an RB433AH board (routerboard.com) into a full blown Debian MIPS system for easy development. Here are some screenshots of the board running a Fluxbox desktop. Basically the technique is to netboot the router off a vmlinux-initramfs image I constructed which allows you to nfs mount an entire Debian-mips root file system served out by another computer. Here's how:

0. Set up DHCP and TFTP servers for netbooting. Also get an NFS server ready. It doesn't have to be on the same box as the DHCP/TFTP servers.

1. Download one of my root file systems (either mips-min-.tgz or mips-full-.tgz) from here and unpack it somewhere convenient on your NFS server box. I used /home/mips. Unpack it as root so that you preserve all the permissions. Export it by adding the following line to your /etc/exportfs:


Of course, change the subnet to whatever's appropriate for you network.

2. From the same directory, download the image named "vmlinux.elf". That's your vmlinux-initramfs image that you're going to netboot. Put it in the root directory of your TFTP server and configure your DHCP server to deliver it to the RB433AH box. (You can use this howto as a guide on how to netboot.)

3. ssh into the box on port 23

ssh -p 23 root@

or whatever IP address your box uses. User:root Pass:root.

4. I've written a script which will bootstrap you into the NFS mounted root filesystem. Run


You'll be asked to set the time and to mount your NFS filesystem. If you don't like automated scripts, just read /bin/reroot and you'll get the idea of what it does.

5. Switch to runlevel 2

/etc/init.d/rc 2

6. You can now ssh into the new root filesystem on the usual port 22

ssh student@

User: student Pass: student. From there, you can do your development, su root, or whatever you like. If you are using the full Debian install, you can also XDMCP to get the login greeter, or use vnc to get your desktop. I left a little script vnc.sh in /home/student to start up the server for you

7. To shut down, exit the chrooted environment and reboot/halt the RB433AH box.

I didn't want to force a bloated system on you, so I provide you with two versions, mips.tgz and mips-full.tgz. In the first, I didn't install any windowing system. The second contains Gnome and Fluxbox.

I did, however, leave a dirty kernel tree and raw rootfs in /usr/src in both tarballs in case you want to modify the kernel and/or the rootfs. The image you'll netboot is "vmlinux" at the top of the kernel tree. You'll want to strip it after compiling to reduce the size.

QEMU build environments

Here are some mips development environments with just enough tools to develop and build binaries/libraries targeted for the both big and little endian systems. The first two are basically Debian, ie. glibc, systems with the kernel that comes with the distro. The second two are uclibc systems with a comstomized kernel. They were built up from the rootfs generated by buildroot. They have less than the glibc systems, but you can bootstrap up, eg. they don't have libevent or zlib, but you can build and install these and then build binaries that link against them.

Debian mips in QEMU
Debian mipel in QEMU
uClibc mips in QEMU
uclibc mipsel in QMEU