From owner-freebsd-doc Fri Apr 28 21:39:08 1995 Return-Path: doc-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id VAA07587 for doc-outgoing; Fri, 28 Apr 1995 21:39:08 -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 VAA07580 for ; Fri, 28 Apr 1995 21:39:00 -0700 Received: from by ix4.ix.netcom.com (8.6.12/SMI-4.1/Netcom) id VAA29892; Fri, 28 Apr 1995 21:37:24 -0700 Date: Fri, 28 Apr 1995 21:37:24 -0700 Message-Id: <199504290437.VAA29892@ix4.ix.netcom.com> From: pvinci@ix.netcom.com (Paul Vinciguerra) Subject: having some troubles... To: doc@freebsd.org Sender: doc-owner@freebsd.org Precedence: bulk Well, I'm back working on config.sgml. Look at the following: &rsgq ,&lsqb don't work and [] work *sometimes* 8^) They don't work if ... [ ... .... ... ] sgmlformat doesn't work right ... compile config.sgml (attached) as -html and as -ascii then look at the CPU section... Where did the lines on the .txt version go? I'm also looking on feedback, feedback, feedback .... thanks, 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" Deleting support for unnecesary CPU's may make parts of the system faster.

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

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 These structures may be found in: /sys/conf/param.c It is important to note the difference between users and processes. If you are running a news server or a httpd server, you would consider each a single user regardless of how many connections each had. Each user would spawn a child process for each connection. Increasing the maxusers will not increase the number of connections. To increase the number of open connections, increase following options: options "CHILD_MAX=128" options "OPEN_MAX=128"

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: options "CHILD_MAX=128" options "OPEN_MAX=128" options MATH_EMULATE #Support for x87 emulation #options GPL_MATH_EMULATE #Support for x87 emualtion via options "COMPAT_43" options USER_LDT #allow user-level control of i386 ldt # These three options provide support for System V Interface options SYSVSHM options SYSVSEM options SYSVMSG options DDB options DODUMP options KTRACE #kernel tracing options DIAGNOSTIC options UCONSOLE options INET #Internet communications protocols options ISO options CCITT #X.25 network layer options NS #Xerox NS communications protocols options TPIP #ISO TP class 4 over IP options TPCONS #ISO TP class 0 over X.25 options NSIP #XNS over IP options EON #ISO CLNP over IP options LLC #X.25 link layer for Ethernets options HDLC #X.25 link layer for serial lines # Internet family options: options "TCP_COMPAT_42" #emulate 4.2BSD TCP bugs options GATEWAY #internetwork gateway options MROUTING # Multicast routing options IPFIREWALL #firewall options IPFIREWALL_VERBOSE #print information about options IPACCT #ipaccounting options ARP_PROXYALL # global proxy ARP options FFS #Fast filesystem options NFS #Network File System options NQNFS #Enable NQNFS lease checking 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 options QUOTA #enable disk quotas #options ALLOW_CONFLICT_DRQ #options ALLOW_CONFLICT_IOADDR #options ALLOW_CONFLICT_IRQ #options ALLOW_CONFLICT_MEMADDR options "AUTO_EOI_1" #options "AUTO_EOI_2" options BOUNCE_BUFFERS #options DUMMY_NOPS #options TUNE_1542 #options "PCVT_FREEBSD=210" # pcvt running on FreeBSD 2.1 #options XSERVER # include code for XFree86 #options FAT_CURSOR # start with block cursor options HARDFONTS options "MAXCONS=16" options FDSEEKWAIT="16" options COMCONSOLE #prefer serial console to video console options COM_MULTIPORT #code for some cards with shared IRQs options DSI_SOFT_MODEM #code for DSI Softmodems options PROBE_VERBOSE # 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 scbus0 #base SCSI code controller isa0 controller bt0 at isa? port "IO_BT0" bio irq ? vector btintr controller ahc0 at isa? bio irq ? vector ahcintr # port??? iomem? 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 nca0 at isa? port 0x1f88 bio irq 10 vector ncaintr controller nca1 at isa? port 0x1f84 controller nca2 at isa? port 0x1f8c controller nca3 at isa? port 0x1e88 controller nca4 at isa? port 0x350 bio irq 5 vector ncaintr controller sea0 at isa? bio irq 5 iomem 0xdc000 iosiz 0x2000 vector seaintr controller wds0 at isa? port 0x350 bio irq 15 drq 6 vector wdsintr controller wdc0 at isa? port "IO_WD1" bio irq 14 vector wdintr controller wdc1 at isa? port "IO_WD2" bio irq 15 vector wdintr controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 vector fdintr controller snd0 controller matcd0 at isa? port ? #controller matcd1 at isa? port ? #controller matcd2 at isa? port ? #controller matcd3 at isa? port ? controller pci0 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. # The `loop' pseudo-device is mandatory when networking is enabled. # The `ether' pseudo-device provides generic code to handle # The 'fddi' pseudo-device provides generic code to support FDDI. # The `sppp' pseudo-device serves a similar role for certain types # The `sl' pseudo-device implements the Serial Line IP (SLIP) service. # The `ppp' pseudo-device implements the Point-to-Point Protocol. # The `bpfilter' pseudo-device enables the Berkeley Packet Filter. Be # The `disc' pseudo-device implements a minimal network interface, # The `tun' pseudo-device implements the User Process PPP (iijppp) pseudo-device ether #Generic Ethernet pseudo-device fddi #Generic FDDI pseudo-device sppp #Generic Synchronous PPP pseudo-device loop #Network loopback device pseudo-device sl 2 #Serial Line IP pseudo-device ppp 2 #Point-to-point protocol pseudo-device bpfilter 4 #Berkeley packet filter pseudo-device disc #Discard device pseudo-device tun 1 #Tunnel driver(user process ppp) pseudo-device pty 16 #Pseudo ttys - can go as high as 64 pseudo-device speaker #Play IBM BASIC-style noises out your speaker pseudo-device log #Kernel syslog interface (/dev/klog) pseudo-device gzip #Exec gzipped a.out's pseudo-device vn #Vnode driver (turns a file into a device) pseudo-device snp 3 #Snoop device - to look at pty/vty/etc.. pseudo-device isdn pseudo-device ii 4 pseudo-device ity 4 pseudo-device itel 2 pseudo-device ispy 1

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.

Sample Entries PPP Support

If you're going to run PPP you need to add the following lines: pseudo-device ppp 2 #Point-to-point protocol or if it's synchronous PPP, use: pseudo-device sppp #Generic Synchronous PPP pseudo-device tun 1 #Tunnel driver(user process ppp) SLIP

If you're going to set up a SLIP server you need to add: pseudo-device sl 2 #Serial Line IP X

If you're going to run X, you need the following lines: options "PCVT_FREEBSD=210" # pcvt running on FreeBSD 2.1 options XSERVER # include code for XFree86 options FAT_CURSOR # start with block cursor pseudo-device pty 16 #Pseudo ttys - can go as high as 64

News/HTTPD Servers

If you're going to run a news or HTTPD server, you need to include each server as a single user. DO NOT increase maxusers to 100. Instead set the "CHLID_MAX= " and the "OPEN_MAX = " to t he expected maximum number of connections of the heaviest demanded server. Disk Quotas

To enable disk quotas, you need to add the line: optionsQUOTA You must then do the following to get a working kernel. 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 clean make depend make make install Firewall

Next Option

Next Option

Next Option

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