CS 503 - Fall 2010

XINU Setup on Linksys

1. Xinu Configuration

2. Building XINU

Steps 1 and 2 are identical to those in Xinu Setup except that the codebase to be used is /u/u3/503/xinu-11fall-linksys.tar.gz

3. Running XINU

The Xinu image created in step 2 is to be transferred to the Linksys backend that has been alloted to your team. This section describes how to boot your copy of XINU on the backend.

cs-console [linksysXXX]

Where XXX is a number between 101 to 115. 
Now enter the command mode of cs-console using:

(control-@) OR (control-spacebar)

The first step would be to download the Xinu image you created for 
Linksys.  The following command assumes that you have a compiled image
named xinu.boot stored in the current directory.

(command-mode) d 
file: xinu.boot

Now powercycle the backend using:

(command-mode) p 

As the Linksys router powers up, its boot loader is programmed to load 
Linux by default (using an image of Linux that resides within Linksys).  
We should interrupt this process, in a way very similar to how we load
a particular kernel using GRUB/LILO on desktops.

Carefully look for the following pattern in the boot message

### main_loop entered: bootdelay=1
Hit any key to stop autoboot:  1

At that point, press any key to stop the autoboot process.  This should
get you to a low-level boot prompt on the Linksys box.

ar7100>

Now we are ready to specify it to load our Xinu image.  This is 
accomplished using the following set of commands:

ar7100>bootp 0x81000000
ar7100>bootm

bootp command talks to the bootp server (on helga.cs.purdue.edu), to get
an IP address for the network interface, and an Os image to boot.  As you
will see in the subsequent boot messages, the bootp server returns the 
linksys image you had downloaded for that backend earlier.  Then bootm 
loads this image, thereby running Xinu on the backend.

You can switch between the command mode of cs-console and the serial I/O
of Xinu using the following command anytime:

(control-@) OR (control-spacebar)

To release the control of the backend, use:

(command-mode) q