Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 28 Apr 1995 21:37:24 -0700
From:      pvinci@ix.netcom.com (Paul Vinciguerra)
To:        doc@freebsd.org
Subject:   having some troubles...
Message-ID:  <199504290437.VAA29892@ix4.ix.netcom.com>

next in thread | raw e-mail | index | archive | help
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  ... [ ... <em> .... </em> ... ]

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 ---------------------------------
<!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="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>
Deleting support for unnecesary CPU's may make parts of the system 
faster.
</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>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>
These structures may be found in: <tt>/sys/conf/param.c
</tt> <newline><newline>
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 
<tt>maxusers</tt> will not increase the number of connections. To 
increase the number of open connections, increase following 
options:<verb>

	options		"CHILD_MAX=128"
	options		"OPEN_MAX=128"
</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>
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
</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><newline>
device <em> device-name device-info interrupt-spec</em><newline>
disk <em> device-name device-info</em><newline>
tape <em> device-name device-info</em><newline></tt></quote>
<verb>
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
</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>#  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       


</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>
    <sect>
      <heading>Sample Entries</heading>
      <sect1>
	<heading>PPP Support</heading>
	<p>

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

</verb>

      </sect1>
      <sect1>
	<heading>SLIP</heading>
	<p>
        If you're going to set up a SLIP server you need to add:
<verb>
pseudo-device	sl	2		#Serial Line IP

</verb>
      </sect1>
      <sect1>
	<heading>X</heading>
	<p>If you're going to run X, you need the following lines:
<verb>
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
</verb></p></sect1>
      <sect1>
	<heading>News/HTTPD Servers</heading>
	<p>If you're going to run a news or HTTPD server, you need to 
include each server as a single user.  DO NOT increase 
<tt>maxusers</tt> to 100.  Instead set the <tt>"CHLID_MAX=  "</tt> and 
the <tt>"OPEN_MAX =  "</tt> to t
he expected maximum number of connections of the heaviest demanded 
server.
      </sect1>
<sect1>
	<heading>Disk Quotas</heading>
	<p>
To enable disk quotas, you need to add the line:<verb>
optionsQUOTA
</verb> You must then do the following to get a working kernel.
<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 clean
	make depend
	make 
	make install

</verb>

</sect1>
<sect1>
	<heading>Firewall</heading>
	<p></sect1>
<sect1>
	<heading>Next Option</heading>
	<p></sect1>
<sect1>
	<heading>Next Option</heading>
	<p></sect1>
<sect1>
	<heading>Next Option</heading>
	<p></sect1>

</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>





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199504290437.VAA29892>