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 the PMON bootloader, from which you can then boot your OS as you would on a real u4600, however it is probably quicker and easier to use the sulima target in the provided makefile.

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

Last modified: Mon Aug 11 15:19:53 EST 2003