Before you start following the instructions in this document, make sure you have set up you account (or installed the appropriate tools on your home machine) and have checked out a copy of the source code.
-
Configure your tree for the machine on which you are working. If you want
to work in a directory that's not $HOME/csc369, you can use the
--ostree option to tell configure where the root of your install tree
is located. (./configure --help explains the other options.)
% cd a1/src
% ./configure
or,
% ./configure --ostree=$HOME/csc369/root
You should now have a defs.mk file in your src directory.
Note that this step is only needed once when you initially set up the source
tree.
-
Configure a kernel named ASST1. Starting from the src directory:
% cd kern/conf
% ./config ASST1
-
Build the ASST1 kernel.
% cd ../compile/ASST1
% bmake depend
% bmake
-
Install the ASST1 kernel.
% bmake install
-
Now also build the user level utilities.
% cd ../../..
% bmake
% bmake install
That's it! You should now have a kernel, and the user level utilities installed under
~/csc369/root.
- Copy the file from your working copy of your repo.../a1/src/sys161.conf to ~/csc369/root
-
Change into your root directory.
% cd ~/csc369/root
-
Run the machine simulator on your operating system.
% sys161 kernel
As the system boots, it will print some messages on the console, including
a list of all the devices that are found. It finishes by displaying the OS/161
kernel prompt.
- At the prompt, type ? to see the menu.
- type ?o for the operations menu. Many of these commands do not do
anything useful yet, however, the "p" command can be used to load and execute a
single user-level program. You can also type ?t at the menu prompt to
display a list of test programs. Try running some of them.
-
At the prompt, type p /sbin/poweroff <return>. This tells the
kernel to run the "poweroff" program that shuts the system down.
Congratulations! You are now ready to start assignment 1.