diff options
Diffstat (limited to 'FAQ/kernelconfig.sgml')
| -rw-r--r-- | FAQ/kernelconfig.sgml | 157 |
1 files changed, 157 insertions, 0 deletions
diff --git a/FAQ/kernelconfig.sgml b/FAQ/kernelconfig.sgml new file mode 100644 index 0000000000..c04f252ab1 --- /dev/null +++ b/FAQ/kernelconfig.sgml @@ -0,0 +1,157 @@ +<!-- $Id: kernelconfig.sgml,v 1.1 1997-11-03 08:53:48 max Exp $ --> +<!-- The FreeBSD Documentation Project --> + + <sect> + <heading>Kernel Configuration<label id="kernelconfig"></heading> + + <sect1> + <heading> + I'd like to customize my kernel. Is it difficult? + <label id="make-kernel"> + </heading> + + <p>Not at all! First, you need either the complete <tt/srcdist/ or, at + the minimum, the <tt/kerndist/ loaded on your system. This provides the + necessary sources for building the kernel, as, unlike most commercial + UNIX vendors, we have a policy of <bf/NOT/ shipping our kernel code in + binary object form. + + <p>Shipping the source takes a bit more space, but it also means + that you can refer to the actual kernel sources in case of + difficulty or to further your understanding of what's + <bf/really/ happening. + + <p>Once you have the <tt/kerndist/ or <tt/srcdist/ loaded, do the + following as root: + + <enum> + <item> <tt>cd /usr/src/sys/i386/conf</tt> + <item> <tt/cp GENERIC MYKERNEL/ + <item> <tt/vi MYKERNEL/ + <item> <tt/config MYKERNEL/ + <item> <tt>cd ../../compile/MYKERNEL</tt> + <item> <tt/make depend/ + <item> <tt/make all/ + <item> <tt/make install/ + <item> <tt/reboot/ + </enum> + + <p>Step 2 may not be necessary if you already have a kernel + configuration file from a previous release of FreeBSD 2.X. - + simply bring your old one over and check it carefully for any + drivers that may have changed boot syntax or been rendered + obsolete. + + <p>A good kernel config file to look into is <tt/LINT/, which + contains entries for <bf/all/ possible kernel options and + documents them fairly well. The <tt/GENERIC/ kernel config file + is used to build the initial release you probably loaded (unless + you upgraded in-place) and contains entries for the most common + configurations. It's a pretty good place to start from. + + <p>If you don't need to make any changes to <tt/GENERIC/, you can + also skip step 3, where you customize the kernel for your + configuration. Step 8 should only be undertaken if steps 6 and 7 + succeed. This will copy the new kernel image to + <tt>/kernel</tt> and <bf/BACK UP YOUR OLD ONE IN/ + <tt>/kernel.old</tt>! It's very important to remember this in + case the new kernel fails to work for some reason - you can still + select <tt>/kernel.old</tt> at the boot prompt to boot the old + one. When you reboot, the new kernel will boot by default. + + <p>If the compile in step 7 falls over for some reason, then it's + recommended that you start from step 4 but substitute + <tt/GENERIC/ for <tt/MYKERNEL/. If you can generate a + <tt/GENERIC/ kernel, then it's likely something in your special + configuration file that's bad (or you've uncovered a bug!). If + the build of the <tt/GENERIC/ kernel does <bf/NOT/ succeed, then + it's very likely that your sources are somehow corrupted. + + <p>Finally, if you need to see your original boot messages again to + compile a new kernel that's better tailored to your hardware, try + the <htmlurl url="http://www.freebsd.org/cgi/man.cgi?dmesg" + name="dmesg"> command. It should print out all the boot-time + messages printed by your old kernel, some of which may be quite + helpful in configuring the new one. + + <p><bf/NOTE:/ I recommend making a dated snapshot of your kernel + in <tt/kernel.YYMMDD/ after you get it all working, that way if + you do something dire the next time you play with your configuration + you can boot that kernel instead of having to go all the way back + to <tt/kernel.GENERIC/. This is particularly important if you're + now booting off a controller that isn't supported in the GENERIC + kernel (yes, personal experience). + + <sect1> + <heading> + My kernel compiles fail because <tt/_hw_float/ is missing. + </heading> + + <p>Let me guess. You removed <htmlurl + url="http://www.freebsd.org/cgi/man.cgi?npx(4)" name="npx0"> from your + kernel configuration file because you don't have a math co-processor, + right? Wrong! :-) The <tt/npx0/ is <bf/MANDATORY/. Even if you don't + have a mathematic co-processor, you <bf/must/ include the <tt/npx0/ + device. + + <sect1> + <heading>Interrupt conflicts with multi-port serial code.</heading> + + <p><bf/Q./ When I compile a kernel with multi-port serial code, it + tells me that only the first port is probed and the rest skipped due to + interrupt conflicts. How do I fix this? + + <p><bf/A./ The problem here is that FreeBSD has code built-in to keep + the kernel from getting trashed due to hardware or software + conflicts. The way to fix this is to leave out the IRQ settings + on all but one port. Here is a example: + + <verb> + # + # Multiport high-speed serial line - 16550 UARTS + # + device sio2 at isa? port 0x2a0 tty irq 5 flags 0x501 vector siointr + device sio3 at isa? port 0x2a8 tty flags 0x501 vector siointr + device sio4 at isa? port 0x2b0 tty flags 0x501 vector siointr + device sio5 at isa? port 0x2b8 tty flags 0x501 vector siointr + </verb> + + <sect1> + <heading>How do I enable support for QIC-40/80 drives?</heading> + + <p>You need to uncomment the following line in the generic config + file (or add it to your config file), add a ``<tt/flags 0x1/'' + on the <htmlurl url="http://www.freebsd.org/cgi/man.cgi?fdc(4)" + name="fdc"> line and recompile. + + <verb> +controller fdc0 at isa? port "IO_FD1" bio irq 6 drq 2 flags 0x1 vector fdintr +disk fd0 at fdc0 drive 0 ^^^^^^^^^ +disk fd1 at fdc0 drive 1 +#tape ft0 at fdc0 drive 2 +^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ + </verb> + + <p>Next, you create a device called <tt>/dev/ft0</tt> by going into + <tt>/dev</tt> and run the following command: + + <verb> + sh ./MAKEDEV ft0 + </verb> + + <p>for the first device. <tt/ft1/ for a second one and so on. + + <p>You will have a device called <tt>/dev/ft0</tt>, which you can + write to through a special program to manage it called + ``<tt/ft/'' - see the man page on <htmlurl + url="http://www.freebsd.org/cgi/man.cgi?ft" name="ft"> + for further details. + + <p>Versions previous to <tt/-current/ also had some trouble dealing + with bad tape media; if you have trouble where <tt/ft/ seems to + go back and forth over the same spot, try grabbing the latest + version of <tt/ft/ from <tt>/usr/src/sbin/ft</tt> in + <tt/-current/ and try that. + + </sect> + |
