Date: Tue, 11 Apr 1995 21:45:00 -0700 From: PVinci@ix.netcom.com (Paul Vinciguerra) To: doc@freebsd.org Subject: config.sgml ... any suggestions? Message-ID: <199504120445.VAA16213@ix4.ix.netcom.com>
index | next in thread | raw e-mail
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 ----
<!doctype linuxdoc public "-//Linux//DTD linuxdoc//EN">
<linuxdoc><article>
<titlepag><title>Building the kernel with config</title>
<author><name>Paul Vinciguerra</name></author>
<date>V1.0, April 8, 1995</date>
<abstract>This document explains the the process of reconfiguring the
kernel.
</abstract></titlepag>
<toc>
<sect><heading>Introduction</heading><p>
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:<newline>
<itemize>
<item>Add support for new hardware</item>
<item>Remove drivers to reduce the size of the kernel and free
up RAM.</item>
<item>Add additional functionality to the system.(eg. PPP or
SLIP support)</item>
</itemize>
In order to rebuild the kernel you must have the srcdist installed.
</sect>
<sect><heading>What goes in the config file?</heading><p></p>
<sect1><heading>Global parameters</heading><p>
A system configuration file must contains the following:
<itemize>
<item> <ref id="machine" name="Machine Type"></item>
<item> <ref id="cpu" name="CPU Type"></item>
<item> <ref id="sysid" name="System Identification"></item>
<item> <ref id="tz" name="Timezone"></item>
<item> <ref id="maxusers" name="Maximum number of users"></item>
</itemize></p>
<sect2><heading>Machine Type<label id="machine"></heading><p>
machine <em>"type"</em></p><p>
The machine type indicates the type of system on which FreeBSD will
run.</p> <p>The
machine type tells the system that it can find the data files in
"/sys/<em>type</em>". This entry
should not be changed.</p> <p>
<verb>
machine "i386"
</verb>
</p></sect2>
<sect2> <heading>CPU Type<label id="cpu"></heading><p>
The CPU type indicates the type or types of CPU's that the kernel will
run on.</p> <p>
The kernel can be built to run on a single CPU type
<verb>
cpu "I586_CPU"
</verb> and would need to be recompiled to run on a '486 or '386
system.</p>
<p>
.. or a single kernel can be built to run on any of multiple CPU's
<verb>
cpu "I386_CPU"
cpu "I486_CPU"
cpu "I586_CPU"
</verb>
</p></sect2>
<sect2><heading>System Identification<label id="sysid"></heading><p>
ident <em>name</em>
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
<verb>
ident FREEFALL
</verb>
in the configuration file would create a global <tt>#define FREEFALL
</tt>
and would include compilation of all the FREEFALL specific changes found
in the source code to
be included in the kernel.</p> <p>
This entry is <tt>GENERIC</tt> by default.
<verb>
ident GENERIC
</verb>
</p><p></p> </sect2>
<sect2>
<heading>Timezone <em>number</em> [dst [number]]
<label id="tz"></heading>
<p>
The timezone entry is used to define the information returned by the
<em>gettimeofday(2)</em> 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.
<verb>
timezone 5 dst # EST Daylight Savings
</verb>
or
<verb>
timezone 8 # PST
</verb>
The integer or floating point number following the dst entry specifies a
dst correction algorithm.
The default value is 1 indicating the U.S.<newline>
Other values are:
<verb>
2 Australian style
3 Western European
4 Middle European
5 Eastern European
</verb>
See <em>dettimeofday</em>(2) and <em>ctime</em>(3) for more information.
</p>
</sect2>
<sect2><heading>Maxusers <em>number</em><label
id="maxusers"></heading><p>
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.
<verb>
maxusers 10
</verb></p>
</sect2></sect1>
<sect1><heading>Config section</heading><p>
The config directive determines the location of root file system as well
as other key file systems.
<quote>
config <em>kernel</em> <newline>
root [on] <em>root-device</em><newline>
swap [on] <em>swap-device</em> and <em>swap-device</em>
..<newline>
dumps[on] <em>dump-device</em><newline>
args [on] <em>arg-devide</em><newline>
</quote>
The default entry of:
<verb>
config kernel root on wd0 swap on wd0 and wd1 and sd0 and sd1
dumps on
wd0</verb>
states that the root partition is on device wd0; swapping is on
device(s) wd0, wd1, sd0, sd1;
dumps occur on wd0.</p></sect1>
<sect1><heading> Options</heading><p>
The options directive instructs the compiler to include optional code in
the kernel. For
example:<newline><verb>
# 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
</verb>
<sect1><heading>Device Specification</heading><p>
Each device installed (or attached to) the system must be specified to
<em>config</em> 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:
<quote><tt>
controller <em> device-name device-info [interrupt-spec]</em>
device <em> device-name device-info interrupt-spec</em>
disk <em> device-name device-info</em>
tape <em> device-name device-info</em></tt></quote>
<verb>
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
</verb>This section is usually the largest section of the configuration
file.
</p></sect1>
<sect1><heading>Pseudo-devices</heading><p>
The system has a number of associated <em>Pseudo devices</em>. Pseudo
devices are
drivers which add functionality, but have no direct hardware associated
with them. Examples of
pseudo devices are pty, loop, ether, PPP.
<verb>
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
</verb>
</p>
</sect1>
</sect>
<sect><heading>Rebuilding the kernel</heading><p>
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)
<verb>
ln -s /usr/src/sys/ /sys
</verb>
At this point, you need to modify your configuration file, usually
GENERIC as follows:
<verb>
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
</verb>
<bf>Note:</bf><newline>
This process renames <tt>/kernel</tt> to <tt>/kernel.old</tt> before
installing the new
kernel.<newline>
If there are problems with the new kernel you can still reboot the old
kernel by specifying
<tt>/kernel.old</tt> at boot time.<newline>
<bf>New in 2.1:</bf><newline>
If you only need to change hardware settings, you can use the
<em>dset</em>
command.<newline>
</p>
</sect>
<footnote>
<bf>New in 2.1:</bf>
If you only need to change hardware settings, you can use the
<em>dset</em>
command.</footnote>
</article>
</linuxdoc>
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504120445.VAA16213>
