You are on page 1of 4

9/2/12

Installing OS/161 in the student.cs Computing Environment

Installing OS/161 in the student.cs Computing Environment


The following instructions describe how to install OS/161 into your account in the student.cs computing environment.

Step 0: Which Machine to Use?


You should do all of your OS/161 work on one of the Linux servers in the student.cs computing environment. The simplest way to do this is to log in using the generic server name
lnxsuetc.wtro.a iu.tdn.suaeloc

This will automatically choose a specific Linux machine to log you into. CSCF maintains a page that provides more information about all of the servers available in the student.cs computing environment, in case you'd like more information. However, all of your work should be done on one of the Linux servers. Do NOT: use the legacy front-end servers, e.g, m f f 0 . t d n . s u a e l o c , because the necessary e-e2suetc.wtro.a tools are not installed on those machines use the services machines, e.g, w w s u e t c . w t r o . a because those servers are w.tdn.suaeloc, dedicated to other purposes.

Step 1: Setting Up Your Environment


Start by logging in to your account and modifying your P T environment variable to ensure that various AH OS/161-related development tools are available. Your P T is normally set in your shell's startup file each AH time you log in. Users of c hor t s in the student.cs computing environment should look in their . s r s ch chc file in their home directory for a line that looks something like this:
stn PT `bnsopt sadr` eev AH /i/hwah tnad

and change it to look like this:


stn PT `bnsopt //s5/y11bn//s5/i sadr` eev AH /i/hwah uc30ss6/i uc30bn tnad

Users of b s or s should change a similar line in their . a h cor . r f l file (also in their home ah h bsr poie directory). NOTE: on Linux it looks like this needs to be . a h cfor bash. And for some reason .profile doesn't seem bsr to work for sh so you might need to use bash. Look for a line like this:
epr PT;PT=/i/hwahsadr` xot AH AH`bnsopt tnad

https://www.student.cs.uwaterloo.ca/~cs350/common/Install161.html

1/4

9/2/12

Installing OS/161 in the student.cs Computing Environment

and change it to this


epr PT;PT=/i/hwah//s5/y11bn//s5/i sadr` xot AH AH`bnsopt uc30ss6/i uc30bn tnad

Note that you may need to log out and log back in again so that this P T change will take effect. You can AH check the current setting of the P T environment variable using the command AH
pitn PT rnev AH

Note that setting these variables only works in the shell or window you issue the above commands in. You will need to ensure that the proper path is set and used for future logins and for other newly created shells. A bit more information about setting up your shell.

Step 2: Obtain a Copy of the OS/161 Source Code


Now you are ready to get a copy of OS/161. Starting in your home directory, issue the following commands:
mdrc30o11 ki s5-s6 c c30o11 d s5-s6 tr-z //s5/u/s6_eoioyo11trg a xf uc30pbo11rpstr/s6.a.z

If you are planning to use CVS to manage the OS/161 source code (which is a good idea), this is the right time to follow the separate CVS setup instructions for OS/161. Do this before you continue with Step 3. Once your CVS repository has been set up and you have checked out a working copy of a OS/161, you can proceed with Step 3 using your working copy.

Step 3: Configure and Build OS/161


The next step is to configure OS/161 and compile the kernel. From the c 3 0 o 1 1directory, do the s5-s6 following:
c o1111 d s6-.1 .cniue-ote=HM/s5-s6/ot-topei=s5/ofgr -sre$OEc30o11ro -olrfxc30 c kr/of d encn .cni AS0 /ofg ST c ./opl/ST d .cmieAS0 mk dpn ae eed mk ae mk isal ae ntl

The string ASST0 in the commands above indicates that you are working on assignment 0. For Assignment X, replace ASST0 with ASSTX in the commands above. The m k i s a lcommand will create a ae ntl directory called $ O E c 3 0 o 1 1 r o ($ O Erefers to your home directory), into which it will place HM/s5-s6/ot HM the compiled kernel in a file called k r e - S T . It will also create a symbolic link call k r e referring enlAS0 enl to k r e - S T . Check the $ O E c 3 0 o 1 1 r o directory to make sure that your kernel is in enlAS0 HM/s5-s6/ot place. Next, build the OS/161 user level utilities and test programs:

https://www.student.cs.uwaterloo.ca/~cs350/common/Install161.html

2/4

9/2/12

Installing OS/161 in the student.cs Computing Environment

c $OEc30o11o1111 d HM/s5-s6/s6-.1 mk ae

Step 4: Try Running OS/161


You should now be able to use the SYS/161 simulator to run the OS/161 kernel that you built and installed. The SYS/161 simulator requires a configuration file in order to run. To obtain one, do this:
c $OEc30o11ro d HM/s5-s6/ot c //s5/y11ss6.ofss6.of p uc30ss6/y11cn y11cn

If you are running on a home machine or laptop it is best to get a copy from the student.cs machines (e.g., using scp or sftp). For a quick test you can try using a copy of the sys161.conf file like this:
c $OEss6/y11cn . p HM/y11ss6.of

NOTE: you should remember to get a copy from the student.cs machines in case there are local changes in that copy that you need Now run your compiled kernel on the simulator. Assuming that you're still in the $ O E c 3 0 HM/s5o 1 1 r o directory, do this: s6/ot
ss6 kre-ST y11 enlAS0

You should see some output that looks something like this:
ss6:Sse/6 rlae19.5 cmie Ar2 21 2:95 y11 ytm11 ees .90, opld p 8 01 14:9 O/6 bs sse vrin11 S11 ae ytm eso .1 Cprgt()20,20,20,20 oyih c 00 01 02 03 PeietadFloso HradClee Alrgt rsre. rsdn n elw f avr olg. l ihs eevd Ptyu-ru-aehr' sse vrin0(ST #) u-orgopnm-ees ytm eso AS0 1 Cui MP r00r00 p s IS 20/30 36 pyia mmr aalbe 3k hscl eoy vial Dvc poe. eie rb.. lmbs (ytmmi bs aeu0 sse an u) eu a lmbs m0 t aeu0 lrc0a lmbs tae t aeu0 lie0a lmbs tmr t aeu0 hrcoko lie0(0 h) adlc n tmr 10 z be0a lie0 ep t tmr rcok a lie0 tlc0 t tmr ladm a lmbs rno0 t aeu0 rno0a ladm adm t rno0 ld a lmbs h0 t aeu0 ld a lmbs h1 t aeu0 le0a lmbs sr t aeu0 cn a le0 o0 t sr pedrn0(ita) suoad vrul O/6 kre [ frmn] S11 enl ? o eu:

The last line is a command prompt from the OS/161 kernel. For now, just enter the command qto shut

https://www.student.cs.uwaterloo.ca/~cs350/common/Install161.html

3/4

9/2/12

Installing OS/161 in the student.cs Computing Environment

down the simulation and return to your shell.

https://www.student.cs.uwaterloo.ca/~cs350/common/Install161.html

4/4

You might also like