Museum

Home

Lab Overview

Retrotechnology Articles

Online Manuals

⇒ master(4) — A/UX 3.0.1

Media Vault

Software Library

Restoration Projects

Artifacts Sought

Related Articles

autoconfig(1M)




master(4) master(4)
NAME master - master kernel-configuration file format DESCRIPTION master contains files that are used by autoconfig(1M) to get device information needed to make a new kernel. By default, master files are located in /etc/master.d. Master files contain up to three lines of information ordered as follows: device-identifier dependency-statement device-specification Device Identifier The device identifier is required for slot device drivers. Each slot card stores a board ID number and a version number in its ROM. The device identifier is used to specify a particular slot card and, optionally, a range of version numbers, as shown here: id board-id [ vernum ] The value of board-id is an integer that matches the board ID that is stored in a slot card's ROM. For example, a board-id value of 8 corresponds to the Apple EtherTalk NB Card. The value of vernum is an optional number or number range. If present, vernum is compared with the slot card's version number. If the comparison fails, autoconfig terminates. The value of vernum can be specified as follows: number Specifies that the slot card's version number must match number. number- Specifies that the slot card's version number must be less than or equal to number. -number Specifies that the slot card's version number must be greater than or equal to number. number1-number2 Specifies that the slot card's version number must be within the range indicated by number1-number2. If vernum is not specified, autoconfig does not check the slot card's version number. January 1992 1



master(4) master(4)
Dependency Statements You can use dependency statements to specify modules that must be included or excluded in the resulting kernel for the module to work properly. Dependency statements can have several forms: include namelist exclude namelist if filename include namelist if filename exclude namelist if expression include namelist if expression exclude namelist The terms exclude, expression if, include, filename, and namelist, have the following meanings: exclude Specifies that autoconfig is to exclude modules specified in namelist from the resulting kernel. expression Specifies an expression constructed from filenames and operators. If the expression evaluates to TRUE, the modules specified in namelist are included in the resulting kernel. If the expression evaluates to FALSE, the modules specified in namelist are excluded. The following operators, listed from highest to lowest priority, can be used to construct expression: ! NOT & AND | OR Parentheses can be used to override the default priority. The following examples use parentheses to demonstrate the default priority of the operators: a | b & c is equivalent to a | (b & c) !a & b is equivalent to (!a) & b filename Specifies the name of a master file in the current directory of autoconfig. To specify this master file, use a period (.). If filename exists, the modules specified in namelist are included in the resulting kernel. If filename does not exist, the modules specified in namelist are excluded. if Specifies that if the following filename or expression argument evaluates to TRUE, autoconfig is to include or exclude the modules listed in namelist. 2 January 1992



master(4) master(4)
include Specifies that autoconfig is to include the modules specified in namelist in the resulting kernel. namelist Specifies a comma-separated list of module names. Device Specification The device specification provides information that autoconfig must have to produce a complete and working kernel. A device specification is made up of the following six fields in this order: flags vectors prefix major-number maximum-devices interrupt-priority-level All of field must appear on a single line in the master file, separated by one or more blanks or tabs. Here is a description of each field: flags The flags field can have one or more of the following values: a Causes autoconfig to create prefixcnt and prefixaddr data structures for this module. The value of prefix is discussed later in this section. b Causes autoconfig to create an entry in the block device switch table for this module. c Causes autoconfig to create an entry in the character device switch table for this module. l Causes autoconfig to create a line discipline switch entry for this module. m Causes autoconfig to create a Streams entry for this module. n Tells autoconfig that this module uses a TCP/IP network interface. popt Tells autoconfig that this module has an initialization routine. In response, autoconfig generates code that calls the initialization routine during system startup at a point specified January 1992 3



master(4) master(4)
by opt, which can be any of the following characters: f Calls the initialization routine first, before any other initialization occurs and before interrupts are enabled. s Calls the initialization routine after any pf modules are enabled, but before interrupts are enabled. n Calls the initialization routine after any pf and ps modules are enabled, but before interrupts are enabled. 0 Calls the initialization routine after enabling interrupts. 1 Calls the initialization routine after any p0 modules are enabled, but before /etc/init is started. If you do not use the p flag, autoconfig generates code to call the initialization routine as if you had specified pn. s Tells autoconfig that this module is a software module, that does not drive a hardware device. The only flag that you can use with the s flag is the p flag. Sopt Tells autoconfig that the module has one or more special routines, specified by opt. The value of opt can be one or more of the following characters: e Tells autoconfig that this module contains a special routine called prefixexit that is to be called whenever a user process that has opened this device driver makes an exit(2) system call. f Tells autoconfig that this module contains a special routine called prefixfork that is to be called whenever a user process that has opened this device driver makes a fork(2) system call. x Tells autoconfig that this module contains a special routine called prefixexec that is to be called whenever a user process that has opened this device driver makes an exec(2) 4 January 1992



master(4) master(4)
system call. The value of prefix is discussed later in this section. t Tells autoconfig that this module is a character device driver that requires a tty structure. You can use the t flag only in conjunction with the c flag. vopt Causes autoconfig to link this driver to the interrupt vector mechanism. Currently, the only valid value of opt is s, which tells the kernel to decode slot-based interrupts and call the interrupt routine of this driver when the card generates an interrupt. x Tells autoconfig that this module is a Streams module. The only flag that you can use with the x flag is the p flag. vectors Indicates the number of interrupt vectors that a particular controller can generate. For hardware device drivers, the value of vectors must be a nonzero integer. For drivers that receive slot interrupts, this number is 1 because each controller can generate only one interrupt. For software modules, which do not drive a hardware device, this value should be a hyphen (-). prefix Specifies the prefix used in the driver's open, close, read, write, ioctl, print, select, and strategy routines. For example, if the driver's open routine is called bddopen, the prefix is bdd. The value of prefix must be between three and eight characters long. Only alphanumeric characters and the underscore character (_) are valid. For consistency, prefix should also be the name of the master file. major-number Specifies the device driver's major number. This value should be a hyphen (-). When you specify a hyphen, autoconfig assigns the first available major number to the device. Letting autoconfig assign the major number guarantees a unique major number for each device driver and prevents conflict between two or more device drivers. maximum-devices Specifies the maximum number of devices that the controller supports. Use a hyphen (-) for software modules or a nonzero integer for hardware device January 1992 5



master(4) master(4)
drivers. interrupt-priority-level Specifies the highest-priority interrupt level used by the controller. For software modules, this value should be a hyphen (-). For slot-based devices, all of which interrupt at spl1, this value should be 1. EXAMPLES The following master file, named bdd, is for a block device driver: if . include SCSI bca - bdd - 2 1 The if . include SCSI dependency statement forces the inclusion of another module, Small Computer System Interface (SCSI) on which this device depends. The b and c flags indicate that the driver is used as both a block and a character device driver, so autoconfig creates entries for this device in both the block device and character device switch tables. The a flag tells autoconfig to create the data structures bddcnt and bddaddr. Because this device receives interrupts from the SCSI subsystem, the hyphen (-) in the second field tells autoconfig that this device does not receive interrupts directly. The third field specifies that the device's prefix is bdd. The fourth field contains a hyphen, which causes autoconfig to assign the device driver's major number. The 2 in the fifth field indicates that there are two devices per controller, and the 1 in the sixth field indicates that the device's interrupt level is spl1. FILES /etc/master.d Directory containing master files SEE ALSO autoconfig(1M) in A/UX System Administrator's Reference Building A/UX Device Drivers, which is available from APDA 6 January 1992

Typewritten Software • bear@typewritten.org • Edmonds, WA 98026