[CSE]  Advanced Operating Systems 
 COMP9242 2010/S2 
CRICOS Provider
Number: 00098G

PRINTER Printer-Friendly Version
- Notices
- Course Intro
- Times
- Lecture location/time
- Statistics
- Survey Results
- Lectures
- Selected Papers
- Project Spec
- Exam
- Forums
- Wiki
- Project Resources
- Slug Lab
- L4 Debugging Guide
- Developing on a Mac
- Developing on Linux
- SOS source browser
- OKL4 reference manual
- Elfweaver user manual
- IXP42X hardware manual
- OKL Wiki
- NSLU2-Linux HomePage
- Intel IXP400 Software
Related Info
- IBM OS Prize
- OS Hall of Fame
- 2009
- 2008
- 2007
- 2006
- 2005
- 2004
- 2003
- 2002
- 2000
- 1999
- 1998
- Gernot Heiser
- Kevin Elphinstone (LiC)
- Guest Lecturers (TBA)
- Student Reps

Valid HTML 4.0!

Developing your AOS project on Linux

Many CSE students have Linux machines which they would like to be able to use to work away from the CSE labs. The following is a guide as to how to set up the necessary drivers/software. These instructions will be debian specific in some spots (e.g. setting up the tftp server) but they should at least give you an idea of how to set up other distributions.

This page might be of use, however out of date.

The components you will need to install are:

  • Cross compilers
  • Driver for the NSLU2's USB->serial converter
  • A serial terminal program (we use minicom, conserver or seyon).
  • TFTP server
  • time server
  • An NFS server/share
  • netcat
  • nslu2-util
Once installed, the installation can be tested by following the milestone 0 instructions.

Cross compilers

Crosstool is a system which will automagically build cross-compilers. Prior to crosstool, building cross-compilers was a fairly horrible process. (Of course, it still is, but slightly less horrible.)

If you don't want to build your own, we have pre-built binaries for:

Follow these steps:

  1. Obtain the latest version of crosstool.
  2. gunzip and tar xvf: tar xvfz crosstool-0.43.tar.gz
  3. Apply this diff: patch -p0 </path/to/crosstool-0.43-aos.diff
  4. sudo mkdir /opt/crosstool; sudo chown $USER:$USER /opt/crosstool
  5. Run the build script: ./demo-armv5b-softfloat.sh
  6. Go watch a movie. Yes, it takes this long.
  7. When it's done, your toolchain will be in /opt/crosstool/gcc-3.4.5-glibc-2.3.5/armv5b-softfloat-linux/bin/. Add this directory to your PATH.

Installing drivers

You need device drivers for the RTL8150 based USB to Ethernet dongle, and the FT232RL USB-Serial converter. Fortunately, these drivers are in the linux kernel and are compiled by most modern distributions, so you should be able to plug them in and see messages from the drivers via dmesg.

The modules required are:

  • rtl8150: USB-to-Ethernet
  • ftdi_sio: USB-to-Serial

If you don't have hotplug set up correctly, you may need to use modprobe: modprobe rtl8150 && modprobe ftdi_sio. Of course, you might be better off throwing some effort into making hotplug work, like in the CSE labs.

From here on in, we'll assume you can get all of this going, with the serial converter on /dev/ttyUSB0, and the ethernet adapter on eth1. Substitute these values below if your setup varies (e.g. if you are using a real Ethernet port or network) -- dmesg should show you what interface you get.

Setting up the network

The AOS board expects to find a host at You can change this temporarily in the bootloader, but it's easier to set up your host to be at this address. (This is the rationale behind using an independent network provided by the USB to Ethernet dongle.) Set this up with

ifconfig eth1 up

Setting up the TFTP server

The bootloader will download your software image from a tftp server running on your host. So you need to set one up:

apt-get install tftpd

Edit your /etc/inetd.conf. Change the following line to reflect the location of the directory which you want to use as your tftp root. (In this case it is /tftpboot).

tftp            dgram   udp     wait    nobody  /usr/sbin/tcpd  /usr/sbin/in.tftpd /tftpboot

You may need to restart inetd at this point using /etc/init.d/inetd restart

You will also need to adjust your handy Makefile if you want it to automatically copy the bootimg.bin file to the tftpboot directory. The variable to look for is: TFTPROOT

Setting up the time server

Uncomment (or add) the following line in /etc/inetd.conf :

#time           dgram   udp     wait    root    internal

Set up an NFS share

Install the NFS server:

$ apt-get install nfs-kernel-server nfs-common portmap
Then set up the exports by editing /etc/exports and adding the following lines (adjusted for the location of your tftp root directory and your username):

Install the NSLU2 utility program

It is necessary to be able to control the NSLU2 using a utility program. It controls the reset line, allowing the NSLU2 to boot once a serial console has been opened.

Download the source code. Uncompress it, make, and copy the resulting executable to a directory in your $PATH (or add the nslu2-util directory to your $PATH).

Install other required software

Install the following packages:

apt-get install minicom netcat ethereal

Last modified: 23 Jul 2010.