CS 354 - Spring 2013

XINU Setup


1. Xinu Configuration

To use Xinu, several environment variables must be set. First log onto one of the frontends xinu01.cs.purdue.edu, xinu02.cs.purdue.edu, ..., xinu22.cs.purdue.edu which are Linux PCs. For remote login see Section 5). If you do not have an account on the XINU machines, please contact accounts@cs.purdue.edu. If you have any trouble with your account and its setup, please see the department help pages at http://www.cs.purdue.edu/help. If these pages do not address your particular problem, please use the trouble command from the command line to report the problem.

The following assumes that your shell is bash. The syntax may vary slightly if you use a different shell. (Run "echo $0" to determine your current shell.)

Setting environment variables for Xinu:

    1.  Edit .bashrc in your home directory by adding /p/xinu/bin to your path:

         export PATH=${PATH}:/p/xinu/bin

    2.  Run  source  .bashrc (or its equivalent) to make the change take effect.

Accessing and untarring Xinu tarball source files:

  1. Change to your home directory, if you are not already in it.

  2. Unpack:

  3. tar    zxvf   /u/u3/cs354/Spring2013/xinu-spring2013-x86.tar.gz

    In your home directory, you will now have a directory called xinu-spring2013-x86. The subdirectories under this directory contain source code, header files, configuration files, and Makefile for compiling XINU.


2. Building XINU

To compile the XINU kernel which will be loaded and executed on a backend machine, run "make" in the compile/ directory:
 
 cd    xinu-spring2013-x86/compile
 make
This creates an executable file called xinu.


3. Running XINU

The executable XINU binary runs on a selected backend machine. We have 47 dedicated x86 backends: xinu101.cs.purdue.edu, xinu102.cs.purdue.edu, ..., xinu147.cs.purdue.edu. The first 20 are Intel Core 2 Duo E8400 machines with 64-bit instruction set. The remaining 27 are single core Intel Celeron 600 machines with 32-bit instruction set. "Core" refers to the number of processing units (i.e., CPUs). In the lab assignments, we will be operating the x86-64 E8400 backends in 32-bit mode and utilize only one of the two cores.

The backend machines are shared resources. When a backend machine is grabbed by a student, it is dedicated for use by that student to run his/her version of XINU. To see which backends are available for booting XINU, type:

cs-status
This will show you who is using each backend and how long they have been using it. As with all hardware, sometimes they fail and may become unavailable until repaired by our technical staff. See XINU Backend Status for the list of machines that are known to be working within the last 24 hours.

To boot your copy of XINU on a backend, connect to a back-end by issuing the command:

cs-console [xinu1__]
With no arguments cs-console will connect you to the first available backend (including broken ones). For best results, you should specify a backend by name (xinu101 through xinu147).

To load your copy of XINU onto the backend:

(control-@) OR (control-spacebar)     //esc to local command-mode

(command-mode) d    //download command

file: xinu      //tell it to download 'xinu' (this example assumes that you are in the xinu-spring2013-x86/compile directory)

(control-@) OR (control-spacebar)    //esc to local command-mode 

(command-mode) p    //power cycle the backend
After several seconds, XINU should boot with a "Welcome to Xinu!" message.

To disconnect and free up the backend:

(control-@) OR (control-spacebar)

(command-mode) p    //power cycle the backend

(control-@) OR (control-spacebar)

(command-mode) q    //quit

NOTE:

Please do not leave a running copy of your Xinu on a backend. This will prevent others from using that backend.

4. Troubleshooting

  1. We only show the mapping from bash to tcsh. If you use other shell types, please contact the TAs. The mapping is as follows: Edit .cshrc instead of .bashrc. Add a line setenv PATH ${PATH}:/p/xinu/bin instead of export PATH=${PATH}:/p/xinu/bin. Run tcsh instead of source .bashrc.
  2. Try to figure out what's going on by yourself. Oftentimes the steps described above were not precisely followed.
  3. When your Xinu executable misbehaves or crashes (i.e., does not do what you intended when programming the kernel) then debug the problem(s) and try again. Since your version of the Xinu kernel runs over dedicated hardware, you are in full control. That is, there are no hidden side effects introduced by other software layers that you are not privy to. By the same token, everything rests on your shoulders.
  4. If you get repeatedly stuck with "Booting XINU on ... " please contact the TAs.
  5. If you are not able to get a free backend, please contact the TAs.

5. Remote Login

Use of the x86 backends is limited to implementing, testing, and evaluating lab assignments of CS 354. To access the backends, you don't have to be physically present in the XINU lab but may remote login using ssh to one of the lab's frontend machines.