Online Book Reader

Home Category

UNIX System Administration Handbook - Evi Nemeth [150]

By Root 2772 0
device ed0 on the ISA bus at I/O address 0x360. It uses interrupt 10. It’s more typical that some keywords can be left out. Here’s another Ethernet card, this time on the PCI bus:

device de0

Thanks to the wonders of PCI, we are not required to specify all the gory details.

The most effective way to organize your declarations is to pair related devices. If you have a controller, put the devices attached to it nearby. For example, if you have an IDE controller, put your IDE disk and CD-ROM declarations right after it. That way it’s easier to visualize the dependencies.

The pseudo-device keyword


Theoretically, pseudo-device drivers are programs that act like device drivers but don’t have any real hardware to back them up. We say “theoretically” because some kernel options that masquerade as pseudo-devices do not act like device drivers at all, at least from the user’s point of view. The syntax for pseudo-device lines is

pseudo-device device-name number-of-instances

device-name is the name of the pseudo-device and number-of-instances is an optional integer telling how many of the imaginary devices the driver should pretend are present. Many drivers do not use the instance count.

There are only a few pseudo-devices, but most of them are obligatory for correct operation of the system. Some systems have a number of nonstandard pseudo-devices that support windowing systems, extra keyboards, or auxiliary displays. Consult the manuals of your system to learn how to deal with these, or just include all the pseudo-devices from your generic configuration file for a more festive atmosphere.

Some common pseudo-devices are:

pty

PTYs are pseudo-terminals. They mimic terminals, but instead of having an actual terminal on one end, they are connected to a UNIX process. PTYs are used heavily by programs such as ssh, xterm, telnet, and rlogin, and they are also used by a few standard utilities such as script to do input processing.

loop

The loop driver simulates an interface to a network that contains only the local host. It allows stand-alone machines to use network software, and it also provides a standard way for a machine to address packets to itself. It is required if you specify the INET option.

See Chapter 13 for more information about interfaces and addressing.

A sample FreeBSD configuration file


Let’s look at a configuration file for a simple kernel which we’ll call EXAMPLE:

machine "i386"

cpu "I386_CPU"

cpu "I486_CPU"

cpu "I586_CPU"

cpu "I686_CPU"

ident EXAMPLE

maxusers 32

The first few lines specify that we are building a kernel for Intel PCs and that the kernel should support all the different CPU types specified. This section also identifies the configuration with the name EXAMPLE. The maxusers line sets the kernel tables up for approximately 32 simultaneous users and 532 simultaneous processes.

...

options INET # Internet: TCP/IP

options "CD9660" # ISO 9660 CD-ROM filesystem

options FFS # (FFS) Local filesystem

options NFS # Network filesystem

...

This is just a snippet from the options section of the configuration file. Our sample kernel is configured with support for Internet (IP) networking, local filesystems, the ISO-9660 filesystem (used most commonly on CD-ROMs), and NFS.

config kernel root on wd0

The default root device is the first IDE hard disk.

controller isa0

controller pnp0

controller eisa0

controller pci0

These lines declare the various buses supported by the system: ISA, EISA, and PCI. The second line declares Plug and Pray support for ISA devices (pnp0).

controller atkbdc0 at isa? port IO_KBD tty

device atkbd0 at isa? tty irq 1

device psm0 at isa? tty irq 12

device vga0 at isa? port ? conflicts

# splash screen/screen saver

pseudo-device splash

# syscons is the default console driver, resembling a SCO console

device sc0 at isa? tty

This section declares all items needed to get a console on your machine. It declares the keyboard and its controller, the mouse, the display card, and the console itself.

# Floppy drives

controller

Return Main Page Previous Page Next Page

®Online Book Reader