Building the OSF/1 Server for SPIN

22 March 1996

So you want to build the OSF/1 Unix server for SPIN

These instructions will tell you what to do. Some steps may be unpolished and rather ugly, but this is a starting point to allow more people to work on the OSF/1 server.

Historical Perspective

In the dark ages, there was ODE. This is where SPIN lived when it was a "wart" on the side of Mach. This is also where the OSF/1 server lived.

Since those days, SPIN has migrated to CVS. The OSF/1 server has never actually migrated to CVS, but it maintains partial residence there. That is, you still need the ODE environment to build the OSF/1 server, but server code can be checked in and checked out using CVS.

Although the ODE environment is often considered difficult to use, the server build depends on it. For instance, thanks to ODE code-backing, you don't have to check out the entire source tree for compiling and editing.

In the future, the OSF/1 server will most likely be migrated to CVS. This cannot happen until reliances on ODE functionality, such as backing trees, are eliminated.

Making your sandbox

If you don't already have a sandbox (and hence a ~/.sandboxrc file), you will need to run the full mksb command:
mksb -back /afs/cs/project/spin/build/release-7 -dir /afs/cs/project/spin/{login} -m alpha {sbname}
If you already have a ~/.sandboxrc file, you can just run
mksb -def {sbname}
Make sure your sandbox is backed off release-7. Also, you will want to choose "b" for all of the backing options. If you do not have mksb in your path, use
/afs/cs/project/spin/build/release-7/export/alpha/bin/mksb

In order to use the ODE build tools, you will need to make some additions to your path. Namely, you will want the following two entries:

/afs/cs/project/spin/{login}/{sbname}/export/alpha/bin
/afs/cs/project/spin/{login}/{sbname}/link/export/alpha/bin
When you type "which build" at the prompt, you should see
/afs/cs/project/spin/{login}/{sbname}/link/export/alpha/bin/build

Setting up your sandbox for CVS

Sometime in the transition from the dark ages to the modern era, the entire OSF/1 server was entered into CVS under the trunk "release-7". The OSF/1 server which runs on SPIN is a branch off this trunk.

Just as we always check out SPIN code relative to the trunk name "spin", it is necessary to check out OSF/1 server code relative to the trunk name "release-7". However, the sandbox directory hierarchy is important to the ODE build process -- you don't want your code an extra level deep in a "release-7" directory. Hence,

cd /afs/cs/project/spin/{login}/{sbname}
ln -s src release-7

Checking out the OSF/1 server code

You will not be checking out the entire OSF/1 Unix server. Instead, you will be checking out a superset of those files which have been modified in order to run the OSF/1 server on SPIN. You will rely on the ODE code backing mechanism to account for any source files which you do not check out.

The files you check out are located in two major areas:

Currently, you will be checking out significantly more files than you actually need to check out (i.e. files which have not changed since the original release-7). There are two reasons for this excessive checkout: These are not difficult obstacles to overcome; they just take time and will take effect in future releases.

The tag to use in checking out is spinux-3. The actual checkout command is

cd /afs/cs/project/spin/{login}/{sbname}
cvs checkout -r spinux-3 release-7/mk/user release-7/osf/server

Building the OSF/1 Unix server for SPIN

The build has a two step process. First, you must build libmach and libcthreads. If you do not, the backing libs will be used when the server is linked. To build libmach and libcthreads
cd /afs/cs/project/spin/{login}/{sbname}/src/mk/user
build
This step should take several minutes. Afterwards, you should have an export/alpha/lib directory under your sandbox with libmach and libcthreads.

The second step is building the server. This step will take much longer, on the order of a half hour to an hour.

cd /afs/cs/project/spin/{login}/{sbname}/src/osf/server
build

There are a couple things to keep in mind to speed up builds:

Preparing the OSF/1 Unix server for SPIN

After the build completes, you will have a server. The server will live under export and under obj in your sandbox. The problem is that this server is unnecessarily huge since it has not been stripped. I usually strip a copy of the server and place it in my project directory for easy tftp'ing:
strip /afs/cs/project/spin/{login}/{sbname}/obj/alpha/osf/server/DEFAULT/vmunix.OSFSRV1.DEFAULT 
cp /afs/cs/project/spin/{login}/{sbname}/obj/alpha/osf/server/DEFAULT/vmunix.OSFSRV1.DEFAULT /afs/cs/project/spin/ddion/vmunix.OSFSRV1.DEFAULT
Another helpful hint: if you're going to be doing this a lot, look into X cut buffers.

When debugging, make sure you use vmunix.OSFSRV1.DEFAULT.unstripped.

Running the OSF/1 Unix server on SPIN

To learn how to run the server, click here. This Web page is targeted toward using my copy of the server binary. Yours should fit right in.

What do you mean it doesn't work?

Please mail me bug reports, or use PRMS entry machsux.


ddion@cs.washington.edu