home *** CD-ROM | disk | FTP | other *** search
/ InfoMagic Source Code 1993 July / THE_SOURCE_CODE_CD_ROM.iso / bsd_srcs / share / doc / smm / 02.config / 4.t < prev    next >
Encoding:
Text File  |  1991-04-17  |  16.9 KB  |  443 lines

  1. .\" Copyright (c) 1983 The Regents of the University of California.
  2. .\" All rights reserved.
  3. .\"
  4. .\" Redistribution and use in source and binary forms, with or without
  5. .\" modification, are permitted provided that the following conditions
  6. .\" are met:
  7. .\" 1. Redistributions of source code must retain the above copyright
  8. .\"    notice, this list of conditions and the following disclaimer.
  9. .\" 2. Redistributions in binary form must reproduce the above copyright
  10. .\"    notice, this list of conditions and the following disclaimer in the
  11. .\"    documentation and/or other materials provided with the distribution.
  12. .\" 3. All advertising materials mentioning features or use of this software
  13. .\"    must display the following acknowledgement:
  14. .\"    This product includes software developed by the University of
  15. .\"    California, Berkeley and its contributors.
  16. .\" 4. Neither the name of the University nor the names of its contributors
  17. .\"    may be used to endorse or promote products derived from this software
  18. .\"    without specific prior written permission.
  19. .\"
  20. .\" THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
  21. .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
  22. .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
  23. .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
  24. .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
  25. .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
  26. .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
  27. .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
  28. .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
  29. .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  30. .\" SUCH DAMAGE.
  31. .\"
  32. .\"    @(#)4.t    6.3 (Berkeley) 4/17/91
  33. .\"
  34. .\".ds RH "Configuration File Syntax
  35. .ne 2i
  36. .NH
  37. CONFIGURATION FILE SYNTAX
  38. .PP
  39. In this section we consider the specific rules used in writing
  40. a configuration file.  A complete grammar for the input language
  41. can be found in Appendix A and may be of use if you should have
  42. problems with syntax errors.
  43. .PP
  44. A configuration file is broken up into three logical pieces:
  45. .IP \(bu 3
  46. configuration parameters global to all system images 
  47. specified in the configuration file,
  48. .IP \(bu 3
  49. parameters specific to each
  50. system image to be generated, and
  51. .IP \(bu 3
  52. device specifications.
  53. .NH 2
  54. Global configuration parameters
  55. .PP
  56. The global configuration parameters are the type of machine,
  57. cpu types, options, timezone, system identifier, and maximum users.
  58. Each is specified with a separate line in the configuration file.
  59. .IP "\fBmachine\fP \fItype\fP"
  60. .br
  61. The system is to run on the machine type specified.  No more than
  62. one machine type can appear in the configuration file.  Legal values
  63. are
  64. .B vax
  65. and
  66. \fBsun\fP.
  67. .IP "\fBcpu\fP ``\fItype\fP''"
  68. .br
  69. This system is to run on the cpu type specified.
  70. More than one cpu type specification
  71. can appear in a configuration file.
  72. Legal types for a
  73. .B vax
  74. machine are
  75. \fBVAX8600\fP, \fBVAX780\fP, \fBVAX750\fP,
  76. \fBVAX730\fP
  77. and
  78. \fBVAX630\fP (MicroVAX II).
  79. The 8650 is listed as an 8600, the 785 as a 780, and a 725 as a 730.
  80. .IP "\fBoptions\fP \fIoptionlist\fP"
  81. .br
  82. Compile the listed optional code into the system. 
  83. Options in this list are separated by commas.
  84. Possible options are listed at the top of the generic makefile.
  85. A line of the form ``options FUNNY,HAHA'' generates global ``#define''s
  86. \-DFUNNY \-DHAHA in the resultant makefile.
  87. An option may be given a value by following its name with ``\fB=\fP'',
  88. then the value enclosed in (double) quotes.
  89. The following are major options are currently in use:
  90. COMPAT (include code for compatibility with 4.1BSD binaries),
  91. INET (Internet communication protocols),
  92. NS (Xerox NS communication protocols),
  93. and
  94. QUOTA (enable disk quotas).
  95. Other kernel options controlling system sizes and limits
  96. are listed in Appendix D;
  97. options for the network are found in Appendix E.
  98. There are additional options which are associated with certain
  99. peripheral devices; those are listed in the Synopsis section
  100. of the manual page for the device.
  101. .IP "\fBmakeoptions\fP \fIoptionlist\fP"
  102. .br
  103. Options that are used within the system makefile
  104. and evaluated by
  105. .I make
  106. are listed as
  107. .IR makeoptions .
  108. Options are listed with their values with the form
  109. ``makeoptions name=value,name2=value2.''
  110. The values must be enclosed in double quotes if they include numerals
  111. or begin with a dash.
  112. .IP "\fBtimezone\fP \fInumber\fP [ \fBdst\fP [ \fInumber\fP ] ]"
  113. .br
  114. Specifies the timezone used by the system.  This is measured in the
  115. number of hours your timezone is west of GMT.  
  116. EST is 5 hours west of GMT, PST is 8.  Negative numbers
  117. indicate hours east of GMT. If you specify
  118. \fBdst\fP, the system will operate under daylight savings time.
  119. An optional integer or floating point number may be included
  120. to specify a particular daylight saving time correction algorithm;
  121. the default value is 1, indicating the United States.
  122. Other values are: 2 (Australian style), 3 (Western European),
  123. 4 (Middle European), and 5 (Eastern European).  See
  124. \fIgettimeofday\fP\|(2) and \fIctime\fP\|(3) for more information.
  125. .IP "\fBident\fP \fIname\fP"
  126. .br
  127. This system is to be known as
  128. .IR name .
  129. This is usually a cute name like ERNIE (short for Ernie Co-Vax) or
  130. VAXWELL (for Vaxwell Smart).
  131. This value is defined for use in conditional compilation,
  132. and is also used to locate an optional list of source files specific
  133. to this system.
  134. .IP "\fBmaxusers\fP \fInumber\fP"
  135. .br
  136. The maximum expected number of simultaneously active user on this system is
  137. .IR number .
  138. This number is used to size several system data structures.
  139. .NH 2
  140. System image parameters
  141. .PP
  142. Multiple bootable images may be specified in a single configuration
  143. file.  The systems will have the same global configuration parameters
  144. and devices, but the location of the root file system and other
  145. system specific devices may be different.  A system image is specified
  146. with a ``config'' line:
  147. .IP
  148. \fBconfig\fP\ \fIsysname\fP\ \fIconfig-clauses\fP
  149. .LP
  150. The
  151. .I sysname
  152. field is the name given to the loaded system image; almost everyone
  153. names their standard system image ``vmunix''.  The configuration clauses
  154. are one or more specifications indicating where the root file system
  155. is located and the number and location of paging devices.
  156. The device used by the system to process argument lists during
  157. .IR execve (2)
  158. calls may also be specified, though in practice this is almost
  159. always selected by
  160. .I config
  161. using one of its rules for selecting default locations for
  162. system devices.
  163. .PP
  164. A configuration clause is one of the following
  165. .IP
  166. .nf
  167. \fBroot\fP [ \fBon\fP ] \fIroot-device\fP
  168. \fBswap\fP [ \fBon\fP ] \fIswap-device\fP [ \fBand\fP \fIswap-device\fP ] ...
  169. \fBdumps\fP [ \fBon\fP ] \fIdump-device\fP
  170. \fBargs\fP [ \fBon\fP ] \fIarg-device\fP
  171. .LP
  172. (the ``on'' is optional.)  Multiple configuration clauses
  173. are separated by white space; 
  174. .I config
  175. allows specifications to be continued across multiple lines
  176. by beginning the continuation line with a tab character.
  177. The ``root'' clause specifies where the root file system
  178. is located, the ``swap'' clause indicates swapping and paging
  179. area(s), the ``dumps'' clause can be used to force system dumps
  180. to be taken on a particular device, and the ``args'' clause
  181. can be used to specify that argument list processing for
  182. .I execve
  183. should be done on a particular device.
  184. .PP
  185. The device names supplied in the clauses may be fully specified
  186. as a device, unit, and file system partition; or underspecified
  187. in which case
  188. .I config
  189. will use builtin rules to select default unit numbers and file
  190. system partitions.  The defaulting rules are a bit complicated
  191. as they are dependent on the overall system configuration.
  192. For example, the swap area need not be specified at all if 
  193. the root device is specified; in this case the swap area is
  194. placed in the ``b'' partition of the same disk where the root
  195. file system is located.  Appendix B contains a complete list
  196. of the defaulting rules used in selecting system configuration
  197. devices.
  198. .PP
  199. The device names are translated to the
  200. appropriate major and minor device
  201. numbers on a per-machine basis.  A file,
  202. ``/sys/conf/devices.machine'' (where ``machine''
  203. is the machine type specified in the configuration file),
  204. is used to map a device name to its major block device number.
  205. The minor device number is calculated using the standard 
  206. disk partitioning rules: on unit 0, partition ``a'' is minor device
  207. 0, partition ``b'' is minor device 1, and so on; for units
  208. other than 0, add 8 times the unit number to get the minor
  209. device.
  210. .PP
  211. If the default mapping of device name to major/minor device
  212. number is incorrect for your configuration, it can be replaced
  213. by an explicit specification of the major/minor device.
  214. This is done by substituting
  215. .IP
  216. \fBmajor\fP \fIx\fP \fBminor\fP \fIy\fP
  217. .LP
  218. where the device name would normally be found.  For example,
  219. .IP
  220. .nf
  221. \fBconfig\fP vmunix \fBroot\fP \fBon\fP \fBmajor\fP 99 \fBminor\fP 1
  222. .fi
  223. .PP
  224. Normally, the areas configured for swap space are sized by the system
  225. at boot time.  If a non-standard size is to be used for one
  226. or more swap areas (less than the full partition),
  227. this can also be specified.  To do this, the
  228. device name specified for a swap area should have a ``size''
  229. specification appended.  For example,
  230. .IP
  231. .nf
  232. \fBconfig\fP vmunix \fBroot\fP \fBon\fP hp0 \fBswap\fP \fBon\fP hp0b \fBsize\fP 1200
  233. .fi
  234. .LP
  235. would force swapping to be done in partition ``b'' of ``hp0'' and
  236. the swap partition size would be set to 1200 sectors.  A swap area
  237. sized larger than the associated disk partition is trimmed to the
  238. partition size.
  239. .PP
  240. To create a generic configuration, only the clause ``swap generic''
  241. should be specified; any extra clauses will cause an error.
  242. .NH 2
  243. Device specifications
  244. .PP
  245. Each device attached to a machine must be specified
  246. to
  247. .I config
  248. so that the system generated will know to probe for it during
  249. the autoconfiguration process carried out at boot time.  Hardware
  250. specified in the configuration need not actually be present on
  251. the machine where the generated system is to be run.  Only the
  252. hardware actually found at boot time will be used by the system.
  253. .PP
  254. The specification of hardware devices in the configuration file
  255. parallels the interconnection hierarchy of the machine to be
  256. configured.  On the VAX, this means that a configuration file must
  257. indicate what MASSBUS and UNIBUS adapters are present, and to
  258. which \fInexi\fP they might be connected.* 
  259. .FS
  260. * While VAX-11/750's and VAX-11/730 do not actually have 
  261. nexi, the system treats them as having 
  262. .I "simulated nexi"
  263. to simplify device configuration.
  264. .FE
  265. Similarly, devices
  266. and controllers must be indicated as possibly being connected
  267. to one or more adapters.  A device description may provide a
  268. complete definition of the possible configuration parameters
  269. or it may leave certain parameters undefined and make the system
  270. probe for all the possible values.  The latter allows a single
  271. device configuration list to match many possible physical
  272. configurations.  For example, a disk may be indicated as present
  273. at UNIBUS adapter 0, or at any UNIBUS adapter which the system
  274. locates at boot time.  The latter scheme, termed 
  275. .IR wildcarding ,
  276. allows more flexibility in the physical configuration of a system;
  277. if a disk must be moved around for some reason, the system will
  278. still locate it at the alternate location.
  279. .PP
  280. A device specification takes one of the following forms:
  281. .IP
  282. .nf
  283. \fBmaster\fP \fIdevice-name\fP \fIdevice-info\fP
  284. \fBcontroller\fP \fIdevice-name\fP \fIdevice-info\fP [ \fIinterrupt-spec\fP ]
  285. \fBdevice\fP \fIdevice-name\fP \fIdevice-info\fP \fIinterrupt-spec\fP
  286. \fBdisk\fP \fIdevice-name\fP \fIdevice-info\fP
  287. \fBtape\fP \fIdevice-name\fP \fIdevice-info\fP
  288. .fi
  289. .LP
  290. A ``master'' is a MASSBUS tape controller; a ``controller'' is a
  291. disk controller, a UNIBUS tape controller, a MASSBUS adapter, or
  292. a UNIBUS adapter.  A ``device'' is an autonomous device which
  293. connects directly to a UNIBUS adapter (as opposed to something
  294. like a disk which connects through a disk controller).  ``Disk''
  295. and ``tape'' identify disk drives and tape drives connected to
  296. a ``controller'' or ``master.''
  297. .PP
  298. The
  299. .I device-name
  300. is one of the standard device names, as
  301. indicated in section 4 of the UNIX Programmers Manual,
  302. concatenated with the
  303. .I logical
  304. unit number to be assigned the device (the 
  305. .I logical
  306. unit number may be different than the
  307. .I physical
  308. unit number indicated on the front of something
  309. like a disk; the
  310. .I logical
  311. unit number is used to refer to the UNIX device, not
  312. the physical unit number).  For example, ``hp0'' is logical
  313. unit 0 of a MASSBUS storage device, even though it might
  314. be physical unit 3 on MASSBUS adapter 1.
  315. .PP
  316. The
  317. .I device-info
  318. clause specifies how the hardware is
  319. connected in the interconnection hierarchy.  On the VAX,
  320. UNIBUS and MASSBUS adapters are connected to the internal
  321. system bus through
  322. a \fInexus\fP.
  323. Thus, one of the following
  324. specifications would be used:
  325. .IP
  326. .ta 1.5i 2.5i 4.0i
  327. .nf
  328. \fBcontroller\fP    mba0    \fBat\fP \fBnexus\fP \fIx\fP
  329. \fBcontroller\fP    uba0    \fBat\fP \fBnexus\fP \fIx\fP
  330. .fi
  331. .LP
  332. To tie a controller to a specific nexus, ``x'' would be supplied
  333. as the number of that nexus; otherwise ``x'' may be specified as
  334. ``?'', in which
  335. case the system will probe all nexi present looking
  336. for the specified controller.
  337. .PP
  338. The remaining interconnections on the VAX are:
  339. .IP \(bu 3
  340. a controller
  341. may be connected to another controller (e.g. a disk controller attached
  342. to a UNIBUS adapter),
  343. .IP \(bu 3
  344. a master is always attached to a controller (a MASSBUS adapter),
  345. .IP \(bu 3
  346. a tape is always attached to a master (for MASSBUS
  347. tape drives),
  348. .IP \(bu 3
  349. a disk is always attached to a controller, and
  350. .IP \(bu 3
  351. devices
  352. are always attached to controllers (e.g. UNIBUS controllers attached
  353. to UNIBUS adapters).
  354. .LP
  355. The following lines give an example of each of these interconnections:
  356. .IP
  357. .ta 1.5i 2.5i 4.0i
  358. .nf
  359. \fBcontroller\fP    hk0    \fBat\fP uba0 ...
  360. \fBmaster\fP    ht0    \fBat\fP mba0 ...
  361. \fBdisk\fP    hp0    \fBat\fP mba0 ...
  362. \fBtape\fP    tu0    \fBat\fP ht0 ...
  363. \fBdisk\fP    rk1    \fBat\fP hk0 ...
  364. \fBdevice\fP    dz0    \fBat\fP uba0 ...
  365. .fi
  366. .LP
  367. Any piece of hardware which may be connected to a specific
  368. controller may also be wildcarded across multiple controllers.
  369. .PP
  370. The final piece of information needed by the system to configure
  371. devices is some indication of where or how a device will interrupt.
  372. For tapes and disks, simply specifying the \fIslave\fP or \fIdrive\fP
  373. number is sufficient to locate the control status register for the
  374. device.
  375. \fIDrive\fP numbers may be wildcarded
  376. on MASSBUS devices, but not on disks on a UNIBUS controller.
  377. For controllers, the control status register must be
  378. given explicitly, as well the number of interrupt vectors used and
  379. the names of the routines to which they should be bound. 
  380. Thus the example lines given above might be completed as:
  381. .IP
  382. .ta 1.5i 2.5i 4.0i
  383. .nf
  384. \fBcontroller\fP    hk0    \fBat\fP uba0 \fBcsr\fP 0177440    \fBvector\fP rkintr
  385. \fBmaster\fP    ht0    \fBat\fP mba0 \fBdrive\fP 0
  386. \fBdisk\fP    hp0    \fBat\fP mba0 \fBdrive\fP ?
  387. \fBtape\fP    tu0    \fBat\fP ht0 \fBslave\fP 0
  388. \fBdisk\fP    rk1    \fBat\fP hk0 \fBdrive\fP 1
  389. \fBdevice\fP    dz0    \fBat\fP uba0 \fBcsr\fP 0160100    \fBvector\fP dzrint dzxint
  390. .fi
  391. .PP
  392. Certain device drivers require extra information passed to them
  393. at boot time to tailor their operation to the actual hardware present.
  394. The line printer driver, for example, needs to know how many columns
  395. are present on each non-standard line printer (i.e. a line printer
  396. with other than 80 columns).  The drivers for the terminal multiplexors
  397. need to know which lines are attached to modem lines so that no one will
  398. be allowed to use them unless a connection is present.  For this reason,
  399. one last parameter may be specified to a
  400. .IR device ,
  401. .I flags
  402. field.  It has the syntax
  403. .IP
  404. \fBflags\fP \fInumber\fP
  405. .LP
  406. and is usually placed after the
  407. .I csr
  408. specification.  The
  409. .I number
  410. is passed directly to the associated driver.  The manual pages
  411. in section 4 should be consulted to determine how each driver
  412. uses this value (if at all).
  413. Communications interface drivers commonly use the flags
  414. to indicate whether modem control signals are in use.
  415. .PP
  416. The exact syntax for each specific device is given in the Synopsis
  417. section of its manual page in section 4 of the manual.
  418. .NH 2
  419. Pseudo-devices
  420. .PP
  421. A number of drivers and software subsystems
  422. are treated like device drivers without any associated hardware.
  423. To include any of these pieces, a ``pseudo-device'' specification
  424. must be used.  A specification for a pseudo device takes the form
  425. .IP
  426. .DT
  427. .nf
  428. \fBpseudo-device\fP    \fIdevice-name\fP [ \fIhowmany\fP ]
  429. .fi
  430. .PP
  431. Examples of pseudo devices are
  432. \fBpty\fP, the pseudo terminal driver (where the optional
  433. .I howmany
  434. value indicates the number of pseudo terminals to configure, 32 default),
  435. and \fBloop\fP, the software loopback network pseudo-interface.
  436. Other pseudo devices for the network include
  437. \fBimp\fP (required when a CSS or ACC imp is configured)
  438. and \fBether\fP (used by the Address Resolution Protocol
  439. on 10 Mb/sec Ethernets).
  440. More information on configuring each of these can also be found
  441. in section 4 of the manual.
  442.