%!PS-Adobe-3.0 %%Creator: groff version 1.09 %%CreationDate: Tue Oct 22 14:19:56 1996 %%DocumentNeededResources: font Times-Bold %%+ font Times-Italic %%+ font Times-Roman %%DocumentSuppliedResources: procset grops 1.09 0 %%Pages: 6 %%PageOrder: Ascend %%Orientation: Portrait %%EndComments %%BeginProlog %%BeginResource: procset grops 1.09 0 /setpacking where{ pop currentpacking true setpacking }if /grops 120 dict dup begin /SC 32 def /A/show load def /B{0 SC 3 -1 roll widthshow}bind def /C{0 exch ashow}bind def /D{0 exch 0 SC 5 2 roll awidthshow}bind def /E{0 rmoveto show}bind def /F{0 rmoveto 0 SC 3 -1 roll widthshow}bind def /G{0 rmoveto 0 exch ashow}bind def /H{0 rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /I{0 exch rmoveto show}bind def /J{0 exch rmoveto 0 SC 3 -1 roll widthshow}bind def /K{0 exch rmoveto 0 exch ashow}bind def /L{0 exch rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /M{rmoveto show}bind def /N{rmoveto 0 SC 3 -1 roll widthshow}bind def /O{rmoveto 0 exch ashow}bind def /P{rmoveto 0 exch 0 SC 5 2 roll awidthshow}bind def /Q{moveto show}bind def /R{moveto 0 SC 3 -1 roll widthshow}bind def /S{moveto 0 exch ashow}bind def /T{moveto 0 exch 0 SC 5 2 roll awidthshow}bind def /SF{ findfont exch [exch dup 0 exch 0 exch neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /MF{ findfont [5 2 roll 0 3 1 roll neg 0 0]makefont dup setfont [exch/setfont cvx]cvx bind def }bind def /level0 0 def /RES 0 def /PL 0 def /LS 0 def /PLG{ gsave newpath clippath pathbbox grestore exch pop add exch pop }bind def /BP{ /level0 save def 1 setlinecap 1 setlinejoin 72 RES div dup scale LS{ 90 rotate }{ 0 PL translate }ifelse 1 -1 scale }bind def /EP{ level0 restore showpage }bind def /DA{ newpath arcn stroke }bind def /SN{ transform .25 sub exch .25 sub exch round .25 add exch round .25 add exch itransform }bind def /DL{ SN moveto SN lineto stroke }bind def /DC{ newpath 0 360 arc closepath }bind def /TM matrix def /DE{ TM currentmatrix pop translate scale newpath 0 0 .5 0 360 arc closepath TM setmatrix }bind def /RC/rcurveto load def /RL/rlineto load def /ST/stroke load def /MT/moveto load def /CL/closepath load def /FL{ currentgray exch setgray fill setgray }bind def /BL/fill load def /LW/setlinewidth load def /RE{ findfont dup maxlength 1 index/FontName known not{1 add}if dict begin { 1 index/FID ne{def}{pop pop}ifelse }forall /Encoding exch def dup/FontName exch def currentdict end definefont pop }bind def /DEFS 0 def /EBEGIN{ moveto DEFS begin }bind def /EEND/end load def /CNT 0 def /level1 0 def /PBEGIN{ /level1 save def translate div 3 1 roll div exch scale neg exch neg exch translate 0 setgray 0 setlinecap 1 setlinewidth 0 setlinejoin 10 setmiterlimit []0 setdash /setstrokeadjust where{ pop false setstrokeadjust }if /setoverprint where{ pop false setoverprint }if newpath /CNT countdictstack def userdict begin /showpage{}def }bind def /PEND{ clear countdictstack CNT sub{end}repeat level1 restore }bind def end def /setpacking where{ pop setpacking }if %%EndResource %%IncludeResource: font Times-Bold %%IncludeResource: font Times-Italic %%IncludeResource: font Times-Roman grops begin/DEFS 1 dict def DEFS begin/u{.001 mul}bind def end/RES 72 def/PL 792 def/LS false def/ENC0[/asciicircum/asciitilde/Scaron/Zcaron /scaron/zcaron/Ydieresis/trademark/quotesingle/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef/.notdef /.notdef/.notdef/space/exclam/quotedbl/numbersign/dollar/percent /ampersand/quoteright/parenleft/parenright/asterisk/plus/comma/hyphen /period/slash/zero/one/two/three/four/five/six/seven/eight/nine/colon /semicolon/less/equal/greater/question/at/A/B/C/D/E/F/G/H/I/J/K/L/M/N/O /P/Q/R/S/T/U/V/W/X/Y/Z/bracketleft/backslash/bracketright/circumflex /underscore/quoteleft/a/b/c/d/e/f/g/h/i/j/k/l/m/n/o/p/q/r/s/t/u/v/w/x/y /z/braceleft/bar/braceright/tilde/.notdef/quotesinglbase/guillemotleft /guillemotright/bullet/florin/fraction/perthousand/dagger/daggerdbl /endash/emdash/ff/fi/fl/ffi/ffl/dotlessi/dotlessj/grave/hungarumlaut /dotaccent/breve/caron/ring/ogonek/quotedblleft/quotedblright/oe/lslash /quotedblbase/OE/Lslash/.notdef/exclamdown/cent/sterling/currency/yen /brokenbar/section/dieresis/copyright/ordfeminine/guilsinglleft /logicalnot/minus/registered/macron/degree/plusminus/twosuperior /threesuperior/acute/mu/paragraph/periodcentered/cedilla/onesuperior /ordmasculine/guilsinglright/onequarter/onehalf/threequarters /questiondown/Agrave/Aacute/Acircumflex/Atilde/Adieresis/Aring/AE /Ccedilla/Egrave/Eacute/Ecircumflex/Edieresis/Igrave/Iacute/Icircumflex /Idieresis/Eth/Ntilde/Ograve/Oacute/Ocircumflex/Otilde/Odieresis /multiply/Oslash/Ugrave/Uacute/Ucircumflex/Udieresis/Yacute/Thorn /germandbls/agrave/aacute/acircumflex/atilde/adieresis/aring/ae/ccedilla /egrave/eacute/ecircumflex/edieresis/igrave/iacute/icircumflex/idieresis /eth/ntilde/ograve/oacute/ocircumflex/otilde/odieresis/divide/oslash /ugrave/uacute/ucircumflex/udieresis/yacute/thorn/ydieresis]def /Times-Roman@0 ENC0/Times-Roman RE/Times-Italic@0 ENC0/Times-Italic RE /Times-Bold@0 ENC0/Times-Bold RE %%EndProlog %%Page: 1 1 %%BeginPageSetup BP %%EndPageSetup /F0 12/Times-Bold@0 SF(Regenerating System Softwar)209.46 123 Q(e)-.216 E/F1 10/Times-Italic@0 SF(Charles B. Hale)253.57 147 Q(y)-.3 E (Dennis. M. Ritc)250.58 165 Q(hie)-.15 E/F2 10/Times-Bold@0 SF(Intr)72 201 Q(oduction)-.18 E/F3 10/Times-Roman@0 SF 1.016 (This document discusses ho)97 216.6 R 3.516(wt)-.25 G 3.516(oa)-3.516 G 1.016(ssemble or compile v)-3.516 F 1.015(arious parts of the)-.25 F/F4 8/Times-Roman@0 SF(UNIX)3.515 E F3 3.515C 1.015(ystem softw)-3.515 F(are.)-.1 E .085(This may be necessary because a command or library is\ accidentally deleted or otherwise destro)72 228.6 R .085(yed; also, it) -.1 F 1.577(may be desirable to install a modi\214ed v)72 240.6 R 1.577 (ersion of some command or library routine.)-.15 F 4.076(Af)6.577 G 2.076 -.25(ew c)-4.076 H(ommands).25 E .299(depend to some de)72 252.6 R .299(gree on the current con\214guration of the system; thus in an)-.15 F 2.8(yn)-.15 G .8 -.25(ew s)-2.8 H .3(ystem modi\214cations to).25 F 1.105(some commands are advisable.)72 264.6 R 1.105(Most of the lik) 6.105 F 1.104(ely modi\214cations relate to the standard disk de)-.1 F 1.104(vices con-)-.25 F .514(tained in the system.)72 276.6 R -.15(Fo) 5.514 G 3.014(re).15 G .515 (xample, the df\(1\) \(`disk free'\) command has b)-3.164 F .515 (uilt into it the names of the stan-)-.2 F .929 (dardly present disk storage dri)72 288.6 R -.15(ve)-.25 G 3.429(s\().15 G .929(e.g. `/de)-3.429 F .929(v/rf0', `/de)-.25 F 3.429 (v/rp0'\). Df\(1\))-.25 F(tak)3.428 E .928(es an ar)-.1 F .928 (gument to indicate which)-.18 F 1.561(disk to e)72 300.6 R 1.561 (xamine, b)-.15 F 1.562(ut it is con)-.2 F -.15(ve)-.4 G 1.562 (nient if its def).15 F 1.562(ault ar)-.1 F 1.562 (gument is adjusted to re\215ect the ordinarily present)-.18 F(de)72 312.6 Q 3.99(vices. The)-.25 F 1.489 (companion document `Setting up UNIX' discusses which commands are lik) 3.99 F 1.489(ely to require)-.1 F(changes.)72 324.6 Q F2(Wher)72 348.6 Q 2.5(eC)-.18 G(ommands and Subr)-2.5 E(outines Li)-.18 E -.1(ve)-.1 G F3 2.178(The source \214les for commands and subroutines reside in se)97 364.2 R -.15(ve)-.25 G 2.178(ral subdirectories of the directory).15 F 2.5(/usr/src. These)72 376.2 R (subdirectories, and a general description of their contents, are)2.5 E 40.28(cmd Source)72 391.8 R(\214les for commands.)2.5 E 20.27 (libc/stdio Source)72 407.4 R (\214les making up the `standard i/o package'.)2.5 E 26.94 (libc/sys Source)72 423 R(\214les for the C system call interf)2.5 E (aces.)-.1 E 25.28(libc/gen Source)72 438.6 R(\214les for most of the r\ emaining routines described in section 3 of the manual.)2.5 E 29.17 (libc/crt Source)72 454.2 R .383 (\214les making up the C runtime support package, as in call sa)2.883 F -.15(ve)-.2 G .382(-return and long arith-).15 F(metic.)132 466.2 Q 26.39(libc/csu Source)72 481.8 R(for the C startup routines.)2.5 E -.05 (ga)72 497.4 S 32(mes Source).05 F .213(for \(some of\) the g)2.713 F 2.713(ames. No)-.05 F .213(great care has been tak)2.713 F .214 (en to try to mak)-.1 F 2.714(ei)-.1 G 2.714(to)-2.714 G -.15(bv)-2.714 G .214(ious ho).15 F(w)-.25 E(to compile these; treat it as a g)132 509.4 Q(ame.)-.05 E 31.38(libF77 Source)72 525 R(for the F)2.5 E (ortran 77 runtime library)-.15 E 2.5(,e)-.65 G(xclusi)-2.65 E .3 -.15 (ve o)-.25 H 2.5(fI).15 G(O.)-2.5 E 33.61(libI77 Source)72 540.6 R (for the F)2.5 E(ortran 77 IO runtime routines.)-.15 E 29.16 (libdbm Source)72 556.2 R(for the `data-base manager' package)2.5 E F1 (dbm)2.5 E F3(\(3\).)2.5 E 24.16(libfpsim Source)72 571.8 R (for the \215oating-point simulator routine.)2.5 E 39.16(libm Source)72 587.4 R(for the mathematical library)2.5 E(.)-.65 E 31.38 (libplot Source)72 603 R(for plotting routines.)2.5 E F2(Commands)72 627 Q F3 1.312(The re)97 642.6 R 1.312 (generation of most commands is straightforw)-.15 F 3.812(ard. The)-.1 F 1.311(`cmd' directory will contain either a)3.811 F .219(source \214le \ for the command or a subdirectory containing the set of \214les that ma\ k)72 654.6 R 2.719(eu)-.1 G 2.719(pt)-2.719 G .219(he command.)-2.719 F .219(If it is)5.219 F 2.5(as)72 666.6 S(ingle \214le the command)-2.5 E (cd /usr/src/cmd)108 684.6 Q(cmak)108 696.6 Q 2.5(ec)-.1 G(md_name)-2.5 E(suf)72 714.6 Q 1.09 (\214ces. \(Cmd_name is the name of the command you are playing with.\)) -.25 F 1.09(The result of the cmak)6.09 F 3.59(ec)-.1 G(om-)-3.59 E (mand will be an e)72 726.6 Q -.15(xe)-.15 G(cutable v).15 E 2.5 (ersion. If)-.15 F(you type)2.5 E EP %%Page: 2 2 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-2-)282.17 48 Q(cmak)108 84 Q 2.5<65ad>-.1 G (cp cmd_name)-2.5 E(the result will be copied to /bin \(or perhaps /etc\ or other places if appropriate\).)72 102 Q .086 (If the source \214les are in a subdirectory there will be a `mak)97 117.6 R .087(e\214le' \(see mak)-.1 F .087(e\(1\)\) to control the re) -.1 F(gener)-.15 E(-)-.2 E 2.5(ation. After)72 129.6 R (changing to the proper directory \(cd\(1\)\) you type one of the follo) 2.5 E(wing:)-.25 E(mak)72 145.2 Q 2.5(ea)-.1 G 23.44(ll The)-2.5 F (program is compiled and loaded; the e)2.5 E -.15(xe)-.15 G (cutable is left in the current directory).15 E(.)-.65 E(mak)72 160.8 Q 2.5(ec)-.1 G 26.5(pT)-2.5 G .493 (he program is compiled and loaded, and the e)-26.5 F -.15(xe)-.15 G .492(cutable is installed.).15 F(Ev)5.492 E .492(erything is cleaned) -.15 F(up afterw)132 172.8 Q(ards; for e)-.1 E (xample .o \214les are deleted.)-.15 E(mak)72 188.4 Q 2.5(ec)-.1 G 16.22 (mp The)-2.5 F .105(program is compiled and loaded, and the e)2.605 F -.15(xe)-.15 G .105(cutable is compared ag).15 F .106 (ainst the one in /bin.)-.05 F(Some of the mak)97 204 Q(e\214les ha)-.1 E .3 -.15(ve o)-.2 H(ther options. Print \(cat\(1\)\) the ones you are \ interested in to \214nd out.).15 E/F1 10/Times-Bold@0 SF(The Assembler) 72 228 Q F0 .225(The assembler consists of tw)97 243.6 R 2.725(oe)-.1 G -.15(xe)-2.875 G .225(cutable \214les: /bin/as and /lib/as2.).15 F .224 (The \214rst is the 0-th pass: it reads)5.225 F .441 (the source program, con)72 255.6 R -.15(ve)-.4 G .441(rts it to an int\ ermediate form in a temporary \214le `/tmp/atm0?', and estimates the).15 F 1.391(\214nal locations of symbols.)72 267.6 R 1.391(It also mak)6.391 F 1.391(es tw)-.1 F 3.891(oo)-.1 G 3.891(rt)-3.891 G 1.39 (hree other temporary \214les which contain the ordinary)-3.891 F .776 (symbol table, a table of temporary symbols \(lik)72 279.6 R 3.276(e1) -.1 G .776(:\) and possibly an o)-3.276 F -.15(ve)-.15 G(r\215o).15 E 3.277(wi)-.25 G .777(ntermediate \214le.)-3.277 F .777(The pro-)5.777 F 1.801(gram /lib/as2 acts as an ordinary multiple pass assembler with in\ put tak)72 291.6 R 1.8(en from the \214les produced by)-.1 F(/bin/as.)72 303.6 Q .805(The source \214les for /bin/as are named `/usr/src/cmd/as/\ as1?.s' \(there are 9 of them\); /lib/as2 is pro-)97 319.2 R 1.908 (duced from the source \214les `/usr/src/cmd/as/as2?.s'; the)72 331.2 R 4.408(yl)-.15 G(ik)-4.408 E -.25(ew)-.1 G 1.908(ise are 9 in number).25 F 6.907(.C)-.55 G 1.907(onsiderable care)-6.907 F .026(should be e)72 343.2 R -.15(xe)-.15 G .026 (rcised in replacing either component of the assembler).15 F 5.026(.R) -.55 G .027(emember that if the assembler is lost,)-5.026 F (the only recourse is to replace it from some backup storage; a brok)72 355.2 Q(en assembler cannot assemble itself.)-.1 E F1(The C Compiler)72 379.2 Q F0 .802(The C compiler consists of se)97 394.8 R -.15(ve)-.25 G 3.302(nr).15 G .802 (outines: `/bin/cc', which calls the phases of the compiler proper) -3.302 F(,)-.4 E .488(the compiler control line e)72 406.8 R .488 (xpander `/lib/cpp', the assembler \(`as'\), and the loader \(`ld'\).) -.15 F .489(The phases of the)5.488 F 2.799(Cc)72 418.8 S .298(ompiler \ are `/lib/c0', which is the \214rst phase of the compiler; `/lib/c1', w\ hich is the second phase of the)-2.799 F .097 (compiler; and `/lib/c2', which is the optional third phase optimizer)72 430.8 R 5.097(.T)-.55 G .097(he loss of the C compiler is as serious) -5.097 F(as that of the assembler)72 442.8 Q(.)-.55 E 1.469 (The source for /bin/cc resides in `/usr/src/cmd/cc.c'.)97 458.4 R 1.468 (Its loss alone \(or that of c2\) is not f)6.468 F 3.968(atal. If)-.1 F (needed, prog.c can be compiled by)72 470.4 Q(/lib/cpp prog.c >temp0)108 488.4 Q(/lib/c0 temp0 temp1 temp2)108 500.4 Q(/lib/c1 temp1 temp2 temp3) 108 512.4 Q(as \255 temp3)108 524.4 Q(ld \255n /lib/crt0.o a.out \255lc) 108 536.4 Q .303 (The source for the compiler proper is in the directory /usr/src/cmd/c.) 97 558 R .303(The \214rst phase \(/lib/c0\) is gen-)5.303 F 1.293(erate\ d from the \214les c00.c, ..., c05.c, which must be compiled by the C c\ ompiler)72 570 R 6.292(.T)-.55 G 1.292(here is also c0.h, a)-6.292 F (header \214le)72 582 Q/F2 10/Times-Italic@0 SF(included)2.5 E F0 (by the C programs of the \214rst phase.)2.5 E 1.6 -.8(To m)5 H(ak).8 E 2.5(ean)-.1 G .5 -.25(ew /)-2.5 H(lib/c0 use).25 E(mak)108 600 Q 2.5(ec) -.1 G(0)-2.5 E(Before installing the ne)72 618 Q 2.5(wc)-.25 G (0, it is prudent to sa)-2.5 E .3 -.15(ve t)-.2 H(he old one someplace.) .15 E 1.137(The second phase of C \(/lib/c1\) is generated from the sou\ rce \214les c10.c, ..., c13.c, the include-\214le)97 633.6 R (c1.h, and a set of object-code tables combined into table.o.)72 645.6 Q 1.6 -.8(To g)5 H(enerate a ne).8 E 2.5(ws)-.25 G(econd phase use)-2.5 E (mak)108 663.6 Q 2.5(ec)-.1 G(1)-2.5 E 1.059(It is lik)72 681.6 R -.25 (ew)-.1 G 1.059(ise prudent to sa).25 F 1.359 -.15(ve c)-.2 H 3.559(1b) .15 G 1.059(efore installing a ne)-3.559 F 3.559(wv)-.25 G 3.559 (ersion. In)-3.709 F -.1(fa)3.558 G 1.058 (ct in general it is wise to sa).1 F 1.358 -.15(ve t)-.2 H(he).15 E .17 (object \214les for the C compiler so that if disaster strik)72 693.6 R .17(es C can be reconstituted without a w)-.1 F .17(orking v)-.1 F .17 (ersion of)-.15 F(the compiler)72 705.6 Q(.)-.55 E EP %%Page: 3 3 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-3-)282.17 48 Q .817(In a similar manner)97 84 R 3.317(,t)-.4 G .816(he third phase of the C compiler \(/lib/c2\) is mad\ e up from the \214les c20.c and)-3.317 F(c21.c together with c2.h.)72 96 Q(Its loss is not critical since it is completely optional.)5 E .056 (The set of tables mentioned abo)97 111.6 R .356 -.15(ve i)-.15 H 2.556 (sg).15 G .056(enerated from the \214le table.s.)-2.556 F .057 (This `.s' \214le is not in f)5.056 F .057(act assem-)-.1 F .202 (bler source; it must be con)72 123.6 R -.15(ve)-.4 G .202 (rted by use of the).15 F/F1 10/Times-Italic@0 SF(cvopt)2.702 E F0 .201 (program, whose source and object are located in the C)2.701 F (directory)72 135.6 Q 5.307(.N)-.65 G .307(ormally this is tak)-5.307 F .307(en care of by mak)-.1 F .307(e\(1\). Y)-.1 F .307(ou might w)-1.1 F .308(ant to look at the mak)-.1 F .308(e\214le to see what it)-.1 F (does.)72 147.6 Q/F2 10/Times-Bold@0 SF(UNIX)72 171.6 Q F0 .033 (The source and object programs for UNIX are k)97 187.2 R .033 (ept in four subdirectories of)-.1 F F1(/usr/sys.)2.533 E F0 .033 (In the subdirec-)5.033 F(tory)72 199.2 Q F1(h)2.763 E F0 .263 (there are se)2.763 F -.15(ve)-.25 G .263 (ral \214les ending in `.h'; these are header \214les which are pick).15 F .263(ed up \(via `#include ...)-.1 F 2.763('\) as)-.7 F .041 (required by each system module.)72 211.2 R .041(The subdirectory)5.041 F F1(de)2.541 E(v)-.15 E F0 .041(consists mostly of the de)2.541 F .04 (vice dri)-.25 F -.15(ve)-.25 G .04(rs together with a).15 F(fe)72 223.2 Q 3.477(wo)-.25 G .977(ther things.)-3.477 F .977(The subdirectory)5.977 F F1(sys)3.477 E F0 .977(is the rest of the system.)3.477 F .977 (There are \214les of the form LIBx in the)5.977 F .732 (directories sys and de)72 235.2 R 2.032 -.65(v. T)-.25 H .732 (hese are archi).65 F -.15(ve)-.25 G 3.232(s\().15 G .732 (ar\(1\)\) which contain the object v)-3.232 F .731 (ersions of the routines in the)-.15 F(directory)72 247.2 Q(.)-.65 E (Subdirectory)97 262.8 Q F1(conf)3.402 E F0 .902 (contains the \214les which control de)3.402 F .902 (vice con\214guration of the system.)-.25 F F1(L.s)5.903 E F0 (speci\214es)3.403 E .017(the contents of the interrupt v)72 274.8 R (ectors;)-.15 E F1(c.c)2.516 E F0 .016 (contains the tables which relate de)2.516 F .016 (vice numbers to handler routines.)-.25 F 3.255(At)72 286.8 S .755 (hird \214le,)-3.255 F F1(mc)3.255 E(h.s)-.15 E F0 3.255(,c)C .755 (ontains all the machine-language code in the system.)-3.255 F 3.256(Af) 5.755 G .756(ourth \214le,)-3.256 F F1(mc)3.256 E(h0.s)-.15 E F0 3.256 (,i)C 3.256(sg)-3.256 G(ener)-3.256 E(-)-.2 E(ated by mkconf\(1\) and c\ ontains \215ags indicating what sort of tape dri)72 298.8 Q .3 -.15 (ve i)-.25 H 2.5(sa).15 G -.25(va)-2.7 G(ilable for taking crash dumps.) .25 E(There are tw)97 314.4 Q 2.5(ow)-.1 G (ays to recreate the system. Use)-2.6 E(cd /usr/sys/conf)108 332.4 Q (mak)108 344.4 Q 2.5(eu)-.1 G(nix)-2.5 E(if the libraries /usr/sys/de)72 362.4 Q (v/LIB2 and /usr/sys/sys/LIB1, and also c.o and l.o, are correct.)-.25 E (Use)5 E(cd /usr/sys/conf)108 380.4 Q(mak)108 392.4 Q 2.5(ea)-.1 G(ll) -2.5 E .133(to recompile e)72 410.4 R -.15(ve)-.25 G .133 (rything and recreate the libraries from scratch.).15 F .132 (This is needed, for e)5.132 F .132(xample, when a header)-.15 F .48 (included in se)72 422.4 R -.15(ve)-.25 G .48 (ral source \214les is changed.).15 F .48 (See `Setting Up UNIX' for other information about con\214gura-)5.48 F (tion and such.)72 434.4 Q 1.076(When the mak)97 450 R 3.576(ei)-.1 G 3.576(sd)-3.576 G 1.076(one, the ne)-3.576 F 3.576(ws)-.25 G 1.075 (ystem is present in the current directory as `unix'.)-3.576 F 1.075 (It should be)6.075 F(tested before destro)72 462 Q(ying the currently \ running `/unix', this is best done by doing something lik)-.1 E(e)-.1 E (mv /unix /ounix)108 480 Q(mv unix /unix)108 492 Q .331(If the ne)72 510 R 2.831(ws)-.25 G .331(ystem doesn')-2.831 F 2.831(tw)-.18 G .331 (ork, you can still boot `ounix' and come up \(see boot\(8\)\).)-2.931 F .331(When you ha)5.331 F .632 -.15(ve s)-.2 H(at-).15 E (is\214ed yourself that the ne)72 522 Q 2.5(ws)-.25 G(ystem w)-2.5 E (orks, remo)-.1 E .3 -.15(ve /)-.15 H(ounix.).15 E 2.494 -.8(To i)97 537.6 T .894(nstall a ne).8 F 3.394(wd)-.25 G -.25(ev)-3.394 G .894 (ice dri).25 F -.15(ve)-.25 G 1.694 -.4(r, c).15 H .893 (ompile it and put it into its library).4 F 5.893(.T)-.65 G .893 (he best w)-5.893 F .893(ay to put it into the)-.1 F (library is to use the command)72 549.6 Q(ar uv LIB2 x.o)108 567.6 Q .408(where x is the routine you just compiled.)72 585.6 R .408 (\(All the de)5.408 F .408(vice dri)-.25 F -.15(ve)-.25 G .408 (rs distrib).15 F .409(uted with the system are already in)-.2 F (the library)72 597.6 Q(.\))-.65 E(Ne)97 613.2 Q .628(xt, the de)-.15 F (vice')-.25 E 3.128(si)-.55 G .628(nterrupt v)-3.128 F .628 (ector must be entered in l.s.)-.15 F .627 (This is probably already done by the rou-)5.628 F 1.3 (tine mkconf\(1\), b)72 625.2 R 1.3(ut if the de)-.2 F 1.301 (vice is esoteric or nonstandard you will ha)-.25 F 1.601 -.15(ve t)-.2 H 3.801(om).15 G 1.301(assage l.s by hand.)-3.801 F(This)6.301 E(in)72 637.2 Q -.2(vo)-.4 G(lv).2 E .509 (es placing a pointer to a callout routine and the de)-.15 F(vice')-.25 E 3.009(sp)-.55 G .509(riority le)-3.009 F -.15(ve)-.25 G 3.009(li).15 G 3.009(nt)-3.009 G .509(he v)-3.009 F(ector)-.15 E 5.509(.U)-.55 G .508 (se some other)-5.509 F(de)72 649.2 Q .115(vice \(lik)-.25 F 2.615(et) -.1 G .115(he console\) as a guide.)-2.615 F .115(Notice that the entri\ es in l.s must be in order as the assembler does not)5.115 F 1.053 (permit mo)72 661.2 R 1.053(ving the location counter `.)-.15 F 3.553 ('b)-.7 G(ackw)-3.553 E 3.553(ards. The)-.1 F 1.052 (assembler also does not permit assignation of an)3.553 F .645 (absolute number to `.)72 673.2 R .645 (', which is the reason for the `. = ZER)-.7 F .646(O+100' subterfuge.) -.4 F .646(If a constant smaller than)5.646 F .25 (16\(10\) is added to the priority le)72 685.2 R -.15(ve)-.25 G .25 (l, this number will be a).15 F -.25(va)-.2 G .25 (ilable as the \214rst ar).25 F .25(gument of the interrupt rou-)-.18 F 2.5(tine. This)72 697.2 R(stratagem is used when se)2.5 E -.15(ve)-.25 G (ral similar de).15 E (vices share the same interrupt routine \(as in dl11')-.25 E(s\).)-.55 E .364(If you ha)97 712.8 R .664 -.15(ve t)-.2 H 2.864(om).15 G .364(assa\ ge l.s, be sure to add the code to actually transfer to the interrupt r\ outine. Ag)-2.864 F(ain)-.05 E .817(use the console as a guide. The app\ arent strangeness of this code is due to running the k)72 724.8 R .816 (ernel in separate)-.1 F EP %%Page: 4 4 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-4-)282.17 48 Q .692(I&D space.)72 84 R(The) 5.692 E/F1 10/Times-Italic@0 SF(call)3.192 E F0 .692(routine sa)3.192 F -.15(ve)-.2 G 3.192(sr).15 G -.15(eg)-3.192 G .693 (isters as required and prepares a C-style call on the actual interrupt) .15 F .112(routine named after the `jmp' instruction.)72 96 R .112 (When the routine returns,)5.112 F F1(call)2.612 E F0 .112 (restores the re)2.612 F .112(gisters and performs)-.15 F .348 (an rti instruction.)72 108 R .349(As an aside, note that e)5.348 F .349 (xternal names in C programs ha)-.15 F .649 -.15(ve a)-.2 H 2.849(nu).15 G .349(nderscore \(`_'\) prepended)-2.849 F(to them.)72 120 Q .128 (The second step which must be performed to add a de)97 135.6 R .128 (vice unkno)-.25 F .128(wn to mkconf is to add it to the con-)-.25 F .588(\214guration table /usr/sys/conf/c.c.)72 147.6 R .588 (This \214le contains tw)5.588 F 3.089(os)-.1 G .589 (ubtables, one for block-type de)-3.089 F .589(vices, and one for)-.25 F (character)72 159.6 Q .344(-type de)-.2 F 2.843(vices. Block)-.25 F(de) 2.843 E .343(vices include disks, DECtape, and magtape.)-.25 F .343 (All other de)5.343 F .343(vices are charac-)-.25 F 1.135(ter de)72 171.6 R 3.635(vices. A)-.25 F 1.135(line in each of these tables gi) 3.635 F -.15(ve)-.25 G 3.635(sa).15 G 1.135 (ll the information the system needs to kno)-3.635 F 3.636(wa)-.25 G 1.136(bout the)-3.636 F(de)72 183.6 Q(vice handler; the ordinal positio\ n of the line in the table implies its major de)-.25 E(vice number)-.25 E 2.5(,s)-.4 G(tarting at 0.)-2.5 E .096 (There are four subentries per line in the block de)97 199.2 R .095 (vice table, which gi)-.25 F .395 -.15(ve i)-.25 H .095 (ts open routine, close routine,).15 F(strate)72 211.2 Q .105 (gy routine, and de)-.15 F .106(vice table.)-.25 F .106 (The open and close routines may be none)5.106 F .106 (xistent, in which case the name)-.15 F(`nullde)72 223.2 Q .537 (v' is gi)-.25 F -.15(ve)-.25 G .536(n; this routine merely returns.).15 F .536(The strate)5.536 F .536(gy routine is called to do an)-.15 F 3.036(yI)-.15 G .536(/O, and the de)-3.036 F(vice)-.25 E (table contains status information for the de)72 235.2 Q(vice.)-.25 E -.15(Fo)97 250.8 S 3.301(rc).15 G .801(haracter de)-3.301 F .801(vices,\ each line in the table speci\214es a routine for open, close, read, an\ d write, and)-.25 F .97(one which sets and returns de)72 262.8 R .969 (vice-speci\214c status \(used, for e)-.25 F .969 (xample, for stty and gtty on type)-.15 F 3.469(writers\). If)-.25 F .01 (there is no open or close routine, `nullde)72 274.8 R .01(v' may be gi) -.25 F -.15(ve)-.25 G .01 (n; if there is no read, write, or status routine, `node).15 F(v')-.25 E (may be gi)72 286.8 Q -.15(ve)-.25 G 2.5(n. Node).15 F 2.5(vs)-.25 G (ets an error \215ag and returns.)-2.5 E .366 (The \214nal step which must be tak)97 302.4 R .366(en to install a de) -.1 F .365(vice is to mak)-.25 F 2.865(eas)-.1 G .365 (pecial \214le for it.)-2.865 F .365(This is done by)5.365 F .7 (mknod\(1\), to which you must specify the de)72 314.4 R .7 (vice class \(block or character\), major de)-.25 F .7 (vice number \(relati)-.25 F -.15(ve)-.25 G .236 (line in the con\214guration table\) and minor de)72 326.4 R .236 (vice number \(which is made a)-.25 F -.25(va)-.2 G .236 (ilable to the dri).25 F -.15(ve)-.25 G 2.735(ra).15 G 2.735(ta)-2.735 G (ppropri-)-2.735 E(ate times\).)72 338.4 Q(The documents `Setting up Un\ ix' and `The Unix IO system' may aid in comprehending these steps.)97 354 Q/F2 10/Times-Bold@0 SF(The Library libc.a)72 378 Q F0 .839(The lib\ rary /lib/libc.a is where most of the subroutines described in sections\ 2 and 3 of the manual)97 393.6 R(are k)72 405.6 Q 2.5(ept. This)-.1 F (library can be remade using the follo)2.5 E(wing commands:)-.25 E (cd /usr/src/libc)108 423.6 Q(sh compall)108 435.6 Q(sh mklib)108 447.6 Q(mv libc.a /lib/libc.a)108 459.6 Q (If single routines need to be recompiled and replaced, use)72 477.6 Q (cc \255c \255O x.c)108 495.6 Q(ar vr /lib/libc.a x.o)108 507.6 Q (rm x.o)108 519.6 Q(The abo)72 537.6 Q .3 -.15(ve c)-.15 H (an also be used to put ne).15 E 2.5(wi)-.25 G(tems into the library) -2.5 E 5(.S)-.65 G(ee ar\(1\), lorder\(1\), and tsort\(1\).)-5 E .009(T\ he routines in /usr/src/cmd/libc/csu \(C start up\) are not in libc.a. \ These are separately assembled and)97 553.2 R(put into /lib)72 565.2 Q 2.5(.T)-.4 G(he commands to do this are)-2.5 E(cd /usr/src/libc/csu)108 583.2 Q(as \255 x.s)108 595.2 Q(mv a.out /lib/x)108 607.2 Q (where x is the routine you w)72 625.2 Q(ant.)-.1 E F2(Other Libraries) 72 649.2 Q F0(Lik)97 664.8 Q -.25(ew)-.1 G .496 (ise, the directories containing the source for the other libraries ha) .25 F .797 -.15(ve \214)-.2 H .497(les compall \(that recom-).15 F (piles e)72 676.8 Q -.15(ve)-.25 G (rything\) and mklib \(that recreates the library\).).15 E F2(System T) 72 700.8 Q(uning)-.92 E F0 1.039(There are se)97 716.4 R -.15(ve)-.25 G 1.039(ral tunable parameters in the system. These set the size of v).15 F 1.038(arious tables and limits.)-.25 F(The)72 728.4 Q 3.036(ya)-.15 G .536 (re found in the \214le /usr/sys/h/param.h as manifests \(`#de\214ne') -3.036 F 3.036(s\). Their)-.55 F -.25(va)3.036 G .536 (lues are rather generous in).25 F EP %%Page: 5 5 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-5-)282.17 48 Q .643(the system as distrib)72 84 R 3.143(uted. Our)-.2 F .643 (typical maximum number of users is about 20, b)3.143 F .643 (ut there are man)-.2 F 3.142(yd)-.15 G(aemon)-3.142 E(processes.)72 96 Q .505(When an)97 111.6 R 3.005(yp)-.15 G .505(arameter is changed, it \ is prudent to recompile the entire system, as discussed abo)-3.005 F -.15(ve)-.15 G 5.505(.A).15 G(brief discussion of each follo)72 123.6 Q (ws:)-.25 E(NB)72 139.2 Q 30.93(UF This)-.1 F .371 (sets the size of the disk b)2.871 F(uf)-.2 E .371(fer cache. Each b) -.25 F(uf)-.2 E .37(fer is 512 bytes.)-.25 F .37(This number should be) 5.37 F .368(around 25 plus NMOUNT)132 151.2 R 2.868(,o)-.74 G 2.868(ra) -2.868 G 2.868(sb)-2.868 G .368(ig as can be if the abo)-2.868 F .669 -.15(ve n)-.15 H .369(umber of b).15 F(uf)-.2 E .369 (fers cause the sys-)-.25 F(tem to not \214t in memory)132 163.2 Q(.) -.65 E 29.17(NFILE This)72 178.8 R .243(sets the maximum number of open\ \214les. An entry is made in this table e)2.743 F -.15(ve)-.25 G .242 (ry time a \214le).15 F .085(is `opened' \(see open\(2\), creat\(2\)\).) 132 190.8 R .085 (Processes share these table entries across forks \(fork\(2\)\).)5.085 F (This number should be about the same size as NINODE belo)132 202.8 Q 1.3 -.65(w. \()-.25 H(It can be a bit smaller).65 E(.\))-.55 E 13.62 (NMOUNT This)72 218.4 R .687 (indicates the maximum number of mounted \214le systems. Mak)3.187 F 3.186(ei)-.1 G 3.186(tb)-3.186 G .686(ig enough that you)-3.186 F(don') 132 230.4 Q 2.5(tr)-.18 G(un out at incon)-2.5 E -.15(ve)-.4 G (nient times.).15 E 10.28(MAXMEM This)72 246 R 1.319 (sets an administrati)3.819 F 1.619 -.15(ve l)-.25 H 1.319 (imit on the amount of memory a process may ha).15 F -.15(ve)-.2 G 6.32 (.I).15 G 3.82(ti)-6.32 G 3.82(ss)-3.82 G(et)-3.82 E 1.286 (automatically if the amount of ph)132 258 R 1.286 (ysical memory is small, and thus should not need to be)-.05 F(changed.) 132 270 Q 8.05(MAXUPRC This)72 285.6 R 1.154 (sets the maximum number of processes that an)3.654 F 3.654(yo)-.15 G 1.155(ne user can be running at an)-3.654 F 3.655(yo)-.15 G(ne)-3.655 E .073(time. This should be set just lar)132 297.6 R .073 (ge enough that people can get w)-.18 F .073(ork done b)-.1 F .072 (ut not so lar)-.2 F .072(ge that)-.18 F 2.5(au)132 309.6 S (ser can hog all the processes a)-2.5 E -.25(va)-.2 G (ilable \(usually by accident!\).).25 E(NPR)72 325.2 Q 24.56(OC This)-.4 F .812(sets the maximum number of processes that can be acti)3.312 F -.15(ve)-.25 G 5.812(.I).15 G 3.312(td)-5.812 G .812 (epends on the demand)-3.312 F(pattern of the typical user; we seem to \ need about 8 times the number of terminals.)132 337.2 Q 19.18 (NINODE This)72 352.8 R 1.233(sets the size of the inode table. There i\ s one entry in the inode table for e)3.733 F -.15(ve)-.25 G 1.232 (ry open).15 F(de)132 364.8 Q .452(vice, current w)-.25 F .452 (orking directory)-.1 F 2.952(,s)-.65 G(tick)-2.952 E 2.952(yt)-.15 G -.15(ex)-2.952 G 2.952(ts).15 G -.15(eg)-2.952 G .453 (ment, open \214le, and mounted de).15 F 2.953(vice. Note)-.25 F .22 (that if tw)132 376.8 R 2.72(ou)-.1 G .22(sers ha)-2.72 F .52 -.15 (ve a \214)-.2 H .219 (le open there is still only one entry in the inode table. A reasonable) .15 F(rule of thumb for the size of this table is)132 388.8 Q(NPR)168 406.8 Q(OC + NMOUNT + \(number of terminals\))-.4 E 30.83(SSIZE The)72 428.4 R .064(initial size of a process stack. This may be made bigger i\ f commonly run processes ha)2.564 F -.15(ve)-.2 G(lar)132 440.4 Q (ge data areas on the stack.)-.18 E 28.05(SINCR The)72 456 R (size of the stack gro)2.5 E(wth increment.)-.25 E 21.95(NOFILE This)72 471.6 R(sets the maximum number of \214les that an)2.5 E 2.5(yo)-.15 G (ne process can ha)-2.5 E .3 -.15(ve o)-.2 H 2.5(pen. 20).15 F (is plenty)2.5 E(.)-.65 E 14.72(CANBSIZ This)72 487.2 R .124 (is the size of the type)2.624 F .124(writer canonicalization b)-.25 F (uf)-.2 E(fer)-.25 E 2.624(.I)-.55 G 2.623(ti)-2.624 G 2.623(si)-2.623 G 2.623(nt)-2.623 G .123(his b)-2.623 F(uf)-.2 E .123 (fer that erase and kill)-.25 F .245 (processing is done. Thus this is the maximum size of an input type)132 499.2 R .246(writer line. 256 is usually)-.25 F(plenty)132 511.2 Q(.) -.65 E 14.16(CMAPSIZ The)72 526.8 R .221 (number of fragments that memory can be brok)2.721 F .22 (en into. This should be big enough that it)-.1 F(ne)132 538.8 Q -.15 (ve)-.25 G 2.663(rr).15 G .163(uns out.)-2.663 F .164 (The theoretical maximum is twice the number of processes, b)5.163 F .164(ut this is a v)-.2 F(ast)-.25 E -.15(ove)132 550.8 S (restimate in practice.).15 E(50 seems enough.)5 E 15.27(SMAPSIZ Same)72 566.4 R(as CMAPSIZ e)2.5 E(xcept for secondary \(sw)-.15 E(ap\) memory) -.1 E(.)-.65 E 24.17(NCALL This)72 582 R .048(is the size of the callou\ t table. Callouts are entered in this table when some sort of inter) 2.548 F(-)-.2 E .192(nal system timing must be done, as in carriage ret\ urn delays for terminals. The number must)132 594 R (be big enough to handle all such requests.)132 606 Q 24.73(NTEXT The)72 621.6 R 2.333(maximum number of simultaneously e)4.833 F -.15(xe)-.15 G 2.333(cuting pure programs. This should be big).15 F (enough so as to not run out of space under hea)132 633.6 Q(vy load.)-.2 E 2.5(Ar)5 G(easonable rule of thumb is about)-2.5 E (\(number of terminals\) + \(number of stick)168 651.6 Q 2.5(yp)-.15 G (rograms\))-2.5 E 22.5(NCLIST The)72 673.2 R 2.012(number of clist se) 4.512 F 2.012(gments. A clist se)-.15 F 2.012(gment is 6 characters.) -.15 F 2.013(NCLIST should be big)7.012 F .57 (enough so that the list doesn')132 685.2 R 3.069(tb)-.18 G .569 (ecome e)-3.069 F .569(xhausted when the machine is b)-.15 F(usy)-.2 E 3.069(.T)-.65 G .569(he characters)-3.069 F 1.101(that ha)132 697.2 R 1.401 -.15(ve a)-.2 H(rri).15 E -.15(ve)-.25 G 3.601(df).15 G 1.102 (rom a terminal and are w)-3.601 F 1.102(aiting to be gi)-.1 F -.15(ve) -.25 G 3.602(nt).15 G 3.602(oap)-3.602 G 1.102(rocess li)-3.602 F 1.402 -.15(ve h)-.25 H 1.102(ere. Thus).15 F .095 (enough space should be left so that e)132 709.2 R -.15(ve)-.25 G .095 (ry terminal can ha).15 F .395 -.15(ve a)-.2 H 2.595(tl).15 G .095 (east one a)-2.595 F -.15(ve)-.2 G .095(rage line pending).15 F (\(about 30 or 40 characters\).)132 721.2 Q EP %%Page: 6 6 %%BeginPageSetup BP %%EndPageSetup /F0 10/Times-Roman@0 SF(-6-)282.17 48 Q 6.4(TIMEZONE The)72 84 R (number of minutes westw)2.5 E (ard from Greenwich. See `Setting Up UNIX'.)-.1 E(DSTFLA)72 99.6 Q 15.4 (GS)-.4 G(ee `Setting Up UNIX' section on time con)-15.4 E -.15(ve)-.4 G (rsion.).15 E(MSGB)72 115.2 Q 10.92(UFS The)-.1 F .125 (maximum number of characters of system error messages sa)2.625 F -.15 (ve)-.2 G .126(d. This is used as a circu-).15 F(lar b)132 127.2 Q(uf) -.2 E(fer)-.25 E(.)-.55 E 16.94(NCARGS The)72 142.8 R .783 (maximum number of characters in an e)3.283 F -.15(xe)-.15 G .782 (c\(2\) ar).15 F .782(glist. This number controls ho)-.18 F 3.282(wm) -.25 G(an)-3.282 E(y)-.15 E(ar)132 154.8 Q (guments can be passed into a process.)-.18 E (5120 is practically in\214nite.)5 E 44.17(HZ Set)72 170.4 R (to the frequenc)2.5 E 2.5(yo)-.15 G 2.5(ft)-2.5 G (he system clock \(e.g., 50 for a 50 Hz. clock\).)-2.5 E EP %%Trailer end %%EOF