Installing and Building Nachos
on Duke ACPUB Systems

If you are just starting, follow the instructions immediately below.


If you already unpacked the old version of Nachos 3.4, use the instructions here, beyond the first horizontal line.

Create a directory in which to unpack the code directory. I suggest 110/ or cps110/ in your home directory to make it easy for us to find.

mkdir dirname

chmod go-rwx dirname

cd dirname

tar xf /afs/acpub.duke.edu/project/web/cssa/nachos-3.4-fall02/code.tar

cd code

Now you are ready to build Nachos for the first time:

gmake

Proceed


Create a directory in which to unpack the code directory. I suggest 110/ or cps110/ in your home directory to make it easy for us to find.

mkdir dirname

chmod go-rwx dirname

cd dirname

tar xf /afs/acpub.duke.edu/project/cps/pkgs/courseware/cps110/nachos-3.4/code.tar

cd code

Now there are a few modifications to make in the files to cope with recent acpub upgrades that aren't consistent with our current Nachos version:

In each of the subdirectories (threads, userprog, vm, filesys, network),
modify all Makefile files as follows:
find the line defining INCPATH
The line looks like: INCPATH = -I../threads -I../machine (or with more paths)
then append one parameter to the line like this:
INCPATH = -I../threads -I../machine -I/usr/pkg/gcc-2.7.2/sun4m_55/lib/g++-include

To the system.h file in the threads directory add these lines:
#include <strings.h>
#include <param.h>
#define getpagesize() PAGESIZE

To network/post.cc add
#include "system.h"

Now you are ready to build Nachos for the first time:

gmake


Common to both versions:

Expect the first nachos build to take some time (~15 minutes).

You may wish to open your nachos pool to other members of your group, but not the world. You can grant permissions to specific users as follows. (Note you may need to run 'klog' for AFS to respect new permissions.)

fs setacl dirname username rwlid
Alternatively you can give only read access:
fs setacl dirname username rl
And revoke them:
fs setacl dirname username none
Check permissions:
fs listacl dirname