Screen Version
School of Computer Science & Engineering
University of New South Wales

 Advanced Operating Systems 
 COMP9242 2005/S2 

Using Sulima

Sulima is a useful tool to use when developing your operating system.

Sulima provides a generic framework for simulating different types of machines. For this project you want to simulate the U4600 machine. A script u4600 is provided which correctly sets up the simulator for you.

The u4600 takes one parameter; the bootimage to execute. Eg:

% u4600 /tfptboot/sos.$USER

This is the command that is executed when you run make sulima with the provided code.

By default the u4600 script will load and boot your OS directly.

Serial ports

When you run sulima the console from which you run it will be attached to the first simulated serial port, which is also the serial port that PMON, and the L4 kernel debugger use.

The provided serial driver uses the u4600's second serial port. This is so that is does not interfere with the kernel debugger. Sulima provides simulates the second serial port, however you must manually attach to it. When sulima starts it will print out a file you can attach to to use the second serial port:

nofx:/home/benno/work/cs9242/sos% make sulima                              
chmod a+r sos.bootimg
scp sos.bootimg /tftpboot/sos.benno
u4600 /tftpboot/sos.benno
Sulima v1.0.0 built on Aug  7 2003, 15:44:03
Copyright (C) 1998-2000 Patryk Zadarnowski

serial: Connect to /dev/pts/8

In the above example the file is /dev/pts/8, you can then use the program screen to attach to this simulated serial port. For exmaple:

% screen /dev/pts/8

If you need to be able to use the serial port from the very beginning of your OS boot and don't want to miss output it can by handy to set the kernel to enter the debugger on startup (via make menuconfig). This way you won't miss any output.

Last modified: Mon Aug 9 15:14:03 EST 2004