From owner-freebsd-doc Tue Apr 11 21:46:47 1995 Return-Path: doc-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id VAA27144 for doc-outgoing; Tue, 11 Apr 1995 21:46:47 -0700 Received: from ix4.ix.netcom.com (ix4.ix.netcom.com [199.182.120.7]) by freefall.cdrom.com (8.6.10/8.6.6) with ESMTP id VAA27138 for ; Tue, 11 Apr 1995 21:46:46 -0700 Received: from by ix4.ix.netcom.com (8.6.12/SMI-4.1/Netcom) id VAA16213; Tue, 11 Apr 1995 21:45:00 -0700 Date: Tue, 11 Apr 1995 21:45:00 -0700 Message-Id: <199504120445.VAA16213@ix4.ix.netcom.com> From: PVinci@ix.netcom.com (Paul Vinciguerra) Subject: config.sgml ... any suggestions? To: doc@freebsd.org Sender: doc-owner@freebsd.org Precedence: bulk Enclosed find config.sgml. It still needs to be updated with the info from the 2.1 LINT, which I just grabbed. I'm looking for suggestions on making the options and hardware sections more manageable. Is this what you're looking for? Paul ---- config.sgml ----
Building the kernel with config Paul Vinciguerra V1.0, April 8, 1995 This document explains the the process of reconfiguring the kernel. Introduction

The GENERIC kernel shipped as a starting point for most users to be able to get their systems up and running under FreeBSD 2.1. Most users rebuild their kernels to: Add support for new hardware Remove drivers to reduce the size of the kernel and free up RAM. Add additional functionality to the system.(eg. PPP or SLIP support) In order to rebuild the kernel you must have the srcdist installed. What goes in the config file?

Global parameters

A system configuration file must contains the following:

Machine Type

machine "type"

The machine type indicates the type of system on which FreeBSD will run.

The machine type tells the system that it can find the data files in "/sys/type". This entry should not be changed.

machine "i386"

CPU Type

The CPU type indicates the type or types of CPU's that the kernel will run on.

The kernel can be built to run on a single CPU type cpu "I586_CPU" and would need to be recompiled to run on a '486 or '386 system.

.. or a single kernel can be built to run on any of multiple CPU's cpu "I386_CPU" cpu "I486_CPU" cpu "I586_CPU"

System Identification

ident name The system identification is a moniker attached to the system, and is often the machine on which the system is to run. For example, the FreeBSD.org system is named "freefall" and by placing the entry ident FREEFALL in the configuration file would create a global #define FREEFALL and would include compilation of all the FREEFALL specific changes found in the source code to be included in the kernel.

This entry is GENERIC by default. ident GENERIC

Timezone number [dst [number]]

The timezone entry is used to define the information returned by the gettimeofday(2) system call. This value is specified as the number of hours East or West of GMT. The timezone specification may also be used to indicate the type of daylight savings time rules to be applied. timezone 5 dst # EST Daylight Savings or timezone 8 # PST The integer or floating point number following the dst entry specifies a dst correction algorithm. The default value is 1 indicating the U.S. Other values are: 2 Australian style 3 Western European 4 Middle European 5 Eastern European See dettimeofday(2) and ctime(3) for more information.

Maxusers number

This entry specifies the expected number of simultaneously active users on the system. This number is used to determine the size of the system data structures. maxusers 10

Config section

The config directive determines the location of root file system as well as other key file systems. config kernel root [on] root-device swap [on] swap-device and swap-device .. dumps[on] dump-device args [on] arg-devide The default entry of: config kernel root on wd0 swap on wd0 and wd1 and sd0 and sd1 dumps on wd0 states that the root partition is on device wd0; swapping is on device(s) wd0, wd1, sd0, sd1; dumps occur on wd0.

Options

The options directive instructs the compiler to include optional code in the kernel. For example: # One of these is mandatory: options FFS #Fast filesystem options NFS #Network File System # The rest are optional: options "CD9660" #ISO 9660 filesystem options FDESC #File descriptor filesystem options KERNFS #Kernel filesystem options LFS #Log filesystem options MFS #Memory File System options MSDOSFS #MS DOS File System options NULLFS #NULL filesystem options PORTAL #Portal filesystem options PROCFS #Process filesystem options UMAPFS #UID map filesystem options UNION #Union filesystem # # Disk quotas are supported when this option is enabled. If you # change the value of this option, you must do a `make clean' in your # kernel compile directory in order to get a working kernel. # options QUOTA #enable disk quotas Device Specification

Each device installed (or attached to) the system must be specified to config so that the devices will be probed at boot time. Devices not currently installed in the hardware may be specified so that the kernel generated will support those devices at a later date. a device specifiaction takes on of the following forms: controller device-name device-info [interrupt-spec] device device-name device-info interrupt-spec disk device-name device-info tape device-name device-info controller bt0 at isa? port "IO_BT0" bio irq ? vector btintr controller ahb0 at isa? bio irq ? vector ahbintr controller aha0 at isa? port "IO_AHA0" bio irq ? drq 5 vector ahaintr controller uha0 at isa? port "IO_UHA0" bio irq ? drq 5 vector uhaintr controller aic0 at isa? port 0x340 bio irq 11 vector aicintr controller pas0 at isa? port 0x1f88 controller pas1 at isa? port 0x1f84 controller pas2 at isa? port 0x1f8c controller pas3 at isa? port 0x1e88 controller sea0 at isa? bio irq 5 iomem 0xdc000 iosiz 0x2000 vector seaintr controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr disk wd0 at wdc0 drive 0 disk wd1 at wdc0 drive 1 controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr disk wd2 at wdc1 drive 0 disk wd3 at wdc1 drive 1 controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr disk fd0 at fdc0 drive 0 disk fd1 at fdc0 drive 1 tape ft0 at fdc0 drive 2 device lpt0 at isa? port "IO_LPT3" tty irq 7 vector lptintr device mse0 at isa? port 0x23c tty irq 5 vector mseintr device psm0 at isa? port "IO_KBD" tty irq 12 vector psmintr device sio0 at isa? port "IO_COM1" tty irq 4 vector siointr device ed0 at isa? port 0x280 net irq 5 iomem 0xd8000 vector edintr device ie0 at isa? port 0x360 net irq 7 iomem 0xd0000 vector ieintr device is0 at isa? port 0x280 net irq 10 drq 7 vector isintr device ep0 at isa? port 0x300 net irq 10 vector epintr device el0 at isa? port 0x300 net irq 9 vector elintr device le0 at isa? port 0x300 net irq 5 iomem 0xd0000 vector le_intr device ze0 at isa? port 0x300 net irq 5 iomem 0xd8000 vector zeintr device lnc0 at isa? XXX FILL ME IN device snd5 at isa? port 0x330 irq 6 vector mpuintr device snd4 at isa? port 0x220 irq 15 drq 6 vector gusintr device snd3 at isa? port 0x388 irq 10 drq 6 vector pasintr device snd2 at isa? port 0x220 irq 7 drq 1 vector sbintr device snd6 at isa? port 0x220 irq 7 drq 5 vector sbintr device snd7 at isa? port 0x300 device snd1 at isa? port 0x388 device pca0 at isa? tty device mcd0 at isa? port 0x300 bio irq 10 vector mcdintr device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr device ctx0 at isa? port 0x230 iomem 0xd0000 device apm0 at isa? options APM controller pci0 device ncr0 device de0 This section is usually the largest section of the configuration file.

Pseudo-devices

The system has a number of associated Pseudo devices. Pseudo devices are drivers which add functionality, but have no direct hardware associated with them. Examples of pseudo devices are pty, loop, ether, PPP. pseudo-device ether #Generic Ethernet pseudo-device loop #Network loop back device pseudo-device sl 2 #Serial Line IP pseudo-device ppp 2 #Point-to-point protocol pseudo-device bpfilter 4 #Berkeley packet filter

Rebuilding the kernel

The system assumes that the source tree is located at /sys. Since the tree is located at /usr/src/sys, we need to create a symbolic link from your sources (/usr/src/sys) to (/sys) ln -s /usr/src/sys/ /sys At this point, you need to modify your configuration file, usually GENERIC as follows: cd /sys/i386/conf vi GENERIC (to edit your configuration) Refer to the file LINT for all the configuration options config GENERIC cd ../../compile/GENERIC make depend make make install Note: This process renames /kernel to /kernel.old before installing the new kernel. If there are problems with the new kernel you can still reboot the old kernel by specifying /kernel.old at boot time. New in 2.1: If you only need to change hardware settings, you can use the dset command.

New in 2.1: If you only need to change hardware settings, you can use the dset command.