A major component of the AOS course is the project. The project is to implement a complete operating system which runs on real hardware, given some existing infrastructure.
This year, the course is replacing the hardware previously being used. The previous hardware required a dedicated lab to be set up, where the machines were located. The new hardware will be small enough and cheap enough that each student will be given a take-home kit. The main component of this kit is a Linksys NSLU2 network-attached storage device.
It is designed to connect USB based storage devices to a network. It can be bought at most decent computer stores. It is based on an Intel Xscale based processor. The XScale is an implementation of the ARM architecture. The processor is an IXP425. The NSLU2 is shipped with Linux in flash, but it is possible, via use of a serial port console, to boot an alternative operating system obtained from the network interface (tftp protocol).
It will be possible for students to work at home, but the students must also be able to work together in the CSE labs.
A host computer is required for work, while the NSLU2 is used as a “crash-and-burn” box. The host computer provides:
a serial terminal for reading the NSLU2 console;
a tftp server from which the NSLU2 will download operating systems images;
an NFS server which will be used as a file-system during the project;
a time server;
a network console-like interface via Ethernet.
The former is accessed via USB, the latter four are accessed via Ethernet.
Since the operating system on the NSLU2 will be bug-ridden, and therefore likely to disrupt a working network, it was decided to use a second Ethernet interface to communicate directly between the host and the NSLU2. The students can use their own switch or computer’s Ethernet interface at home.
Note: the NSLU2 can be powered via the USB connection to the host computer, so they will not need to access the power points in the labs.
FTDI USB serial driver (required modules listed below)
USB to ethernet dongle driver
Minicom or conserver
timeserver
tftpd
nfs server
netcat (nc)
ethereal
Cross compilers maintained by ERTOS in ~disy
Any necessary bring-up and tear-down scripts (udev, hotplug)
Permissions: serial port (_usually_ /dev/ttyUSB0), anything necessary for Ethereal.
ftdi_sio 28040 0 (serial)
usbserial 28108 1 ftdi_sio (serial)
rtl8150 10720 0 (ethernet)
Having connected the USB↔Ethernet dongle:
ifconfig ethX 192.168.168.1 netmask 255.255.255.0
tftpd to run on the tftp udp port with a -s <chroot-dir> flag and create the <chroot-dir> with write-all permissions for AOS students/staff (Either /tftpboot or the student’s home directory?).
An nfs export on <spareenet> with a base directory of <chroot-dir>
Configure minicom with empty modem strings, /dev/ttyUSB0 (probably), 115200 8N1, no Hardware flowcontrol.
Plug the NSLU2 USB port (Mini-B) to the host machine (the NSLU2 is USB powered, so no power required)
Connect the NSLU2’s ethernet to the USB↔Ethernet dongle (or a spare ethernet port when at home, or on a laptop)
Turn the NSLU2 on (power button at the front).
Run minicom: check the settings - 115200, 8N1, no hardware flow control or XON/XOFF.
At this stage, tftpd, nfs, etc, should be running on the Ethernet interface (192.168.168.1).
To activate the slug, run:
daves@gedanken:~$ ~disy/bin/nslu2 up
A networked console is available which will be used to interact with applications on the NSLU2. This command will connect to it:
daves@gedanken:~$ nc -lup 26706
-
Add ~disy/crossdev/pc.i86.linux/gcc-3.4.5-glibc-2.3.5/bin and ~disy/bin to PATH
-
Get 2 terminal windows up, one with the minicom session and another with ‘nc -lu -p 26706’ running
cd aos-2006
Build sos, i.e. build/buildimg.bin, code by typing ‘make’, to bootimg will automatically be copied to your tftpboot directory and the slug will be reset.
At this point the NSLU2 should boot the sos which will output some stuff to both the serial terminal and ‘nc’ terminal.
These pages might be useful: