diff options
Diffstat (limited to 'handbook/kernelconfig.sgml')
-rw-r--r-- | handbook/kernelconfig.sgml | 106 |
1 files changed, 62 insertions, 44 deletions
diff --git a/handbook/kernelconfig.sgml b/handbook/kernelconfig.sgml index 18989c5758..2a007d001a 100644 --- a/handbook/kernelconfig.sgml +++ b/handbook/kernelconfig.sgml @@ -1,4 +1,4 @@ -<!-- $Id: kernelconfig.sgml,v 1.1.2.2 1996-01-31 14:32:22 mpp Exp $ --> +<!-- $Id: kernelconfig.sgml,v 1.1.2.3 1996-06-19 20:27:58 jkh Exp $ --> <!-- The FreeBSD Documentation Project --> <!-- <!DOCTYPE linuxdoc PUBLIC '-//FreeBSD//DTD linuxdoc//EN'> --> <chapt><heading>Configuring the FreeBSD Kernel<label id="kernelconfig"></heading> @@ -44,7 +44,7 @@ </itemize></p> - <sect><heading>Building and Installing a Custom Kernel</heading> + <sect><heading>Building and Installing a Custom Kernel<label id="kernelconfig:building"></heading> <p>First, let us take a quick tour of the kernel build directory. All directories mentioned will be relative to @@ -77,7 +77,7 @@ </verb></tscreen> Traditionally, this name is in all capital letters and, if you are maintaining multiple FreeBSD machines with - different hardware, it's a good idea to name it after + different hardware, it is a good idea to name it after your machine's hostname. We will call it MYKERNEL for the purpose of this example. @@ -89,24 +89,32 @@ you're just starting out, the only editor available will probably be <tt>vi</tt>, which is too complex to explain here, but is covered well in many books in the <ref - id="bibliography" name="bibliography">. Feel free to change the comment - lines at the top to reflect your configuration or the - changes you've made to differentiate it from GENERIC. + id="bibliography" name="bibliography">. Feel free to change the + comment lines at the top to reflect your configuration or the + changes you have made to differentiate it from GENERIC. - If you've build a kernel under SunOS or some other BSD + If you have build a kernel under SunOS or some other BSD operating system, much of this file will be very familiar - to you. If you're coming from some other operating + to you. If you are coming from some other operating system such as DOS, on the other hand, the GENERIC configuration file might seem overwhelming to you, so follow the descriptions in the <ref id="kernelconfig:config" name="Configuration File"> section slowly and carefully. - When you're finished, type the following to compile and + <quote><em/Note:/ If you are trying to upgrade your kernel from an + older version of FreeBSD, you will probably have to get a new + version of <tt>config(8)</tt> from the same place you got the new + kernel sources. It is located in <tt>/usr/src/usr.sbin</tt>, so + you will need to download those sources as well. Re-build and install + it before running the next commands.</quote> + + When you are finished, type the following to compile and install your kernel: <tscreen><verb> # /usr/sbin/config MYKERNEL # cd ../../compile/MYKERNEL +# make depend # make # make install </verb></tscreen> @@ -120,7 +128,7 @@ to recover in case your new kernel <ref id="kernelconfig:noboot" name="does not boot">. - <quote><em/Note:/ If you've added any new devices (such + <quote><em/Note:/ If you have added any new devices (such as sound cards) you may have to add some <ref id="kernelconfig:nodes" name="device nodes"> to your <tt>/dev</tt> directory before you can use them.</quote> @@ -136,9 +144,27 @@ GENERIC, although some related keywords have been grouped together in a single section (such as Networking) even though they are actually scattered throughout the GENERIC - file. An exhaustive list of options is present in the - LINT configuration file, located in the same directory as - GENERIC. + file. An exhaustive list of options and more detailed explanations + of the device lines is present in the LINT configuration file, + located in the same directory as GENERIC. If you are in doubt as to + the purpose or necessity of a line, check first in LINT. + + <p>The kernel is currently being moved to a better organization + of the option handling. Traditionally, each option in the + config file was simply converted into a <tt>-D</tt> switch + for the <tt>CFLAGS</tt> line of the kernel Makefile. Naturally, + this caused a creaping optionism, with nobody really knowing + which option has been referenced in what files. + + <p>In the new scheme, every <tt>#ifdef</tt> that is intended to + be dependant upon an option gets this option out of an + <tt>opt_<em>foo</em>.h</tt> declaration file created in the + compile directory by <tt>config</tt>. The list of valid options + for <tt>config</tt> lives in two files: options that do nott + depend on the architecture are listed in + <tt>/sys/conf/options</tt>, architecture-dependant ones + in <tt>/sys/<em>arch</em>/conf/options.<em>arch</em></tt>, + with <em>arch</em> being for example <tt>i386</tt>. <sect1><heading>Mandatory Keywords</heading> @@ -184,7 +210,7 @@ this from GENERIC to whatever you named your kernel, in this example, MYKERNEL. The value you put in <tt>ident</tt> will print when you boot up - the kernel, so it's useful to give a kernel a + the kernel, so it is useful to give a kernel a different name if you want to keep it separate from your usual kernel (if you want to build an experimental kernel, for example). Note that, as @@ -193,7 +219,7 @@ contains any numbers. Since this name is passed to the C compiler as a - <tt>-D</tt> switch, don't use names like <tt> + <tt>-D</tt> switch, do not use names like <tt> DEBUG</tt>, or something that could be confused with another machine or CPU name, like <tt>vax</tt>. @@ -205,7 +231,7 @@ you expect to have on your machine. However, under normal circumstances, you will want to set <tt>maxusers</tt> to at least four, especially if - you're using X Windows or compiling software. The + you are using X Windows or compiling software. The reason is that the most important table set by <tt>maxusers</tt> is the maximum number of processes, which is set to <bf><tt>20 + 16 * @@ -310,7 +336,7 @@ Windows, which many graphics-intensive programs (such as the movie player XAnim, and Linux DOOM) will automatically take advantage of for extra - speed. If you use X Windows, you'll definitely + speed. If you use X Windows, you will definitely want to include this. <tag>options SYSVSEM</tag> @@ -387,8 +413,6 @@ is a pretend filesystem mounted on /proc which allows programs like <tt>ps(1)</tt> to give you more information on what processes are running. - <-- XXX why? it's perfectly working as LKM. joerg --> - Leave it in. <tag>options MFS</tag> @@ -481,7 +505,7 @@ <tt>wdc1</tt> is a secondary IDE controller where you might have a third or fourth hard drive, or an IDE CD-ROM. Comment out the lines which do not - apply (if you have a SCSI hard drive, you'll + apply (if you have a SCSI hard drive, you will probably want to comment out all six lines, for example). @@ -495,11 +519,9 @@ <tag>device npx0 at isa? port ``IO_NPX'' irq 13 vector npxintr</tag> - <p><tt>npx0</tt> is the interface to the - math coprocessor. If you have one then make sure - you've commented out <ref id="kernelconfig:mathemu" - name="MATH_EMULATE"> above. If you do not have a - math coprocessor, you can comment this out. + <p><tt>npx0</tt> is the interface to the floating point math + unit in FreeBSD, either the hardware co-processor or the + software math emulator. It is <em/NOT/ optional. <tag>device wt0 at isa? port 0x300 bio irq 5 drq 1 vector wtintr</tag> @@ -603,11 +625,11 @@ <p>This causes the kernel to pause 15 seconds before probing each SCSI device in your system. If you only have IDE hard - drives, you can ignore this, otherwise you'll + drives, you can ignore this, otherwise you will probably want to lower this number, perhaps to 5 seconds, to speed up booting. Of course if you do this, and FreeBSD has trouble recognizing your SCSI - devices, you'll have to raise it back up. + devices, you will have to raise it back up. <tag>controller scbus0</tag> @@ -775,7 +797,7 @@ <p>The next lines enable support for various Ethernet cards. If you do not have a network card, you can - comment out all of these lines. Otherwise, you'll + comment out all of these lines. Otherwise, you will want to leave in support for your particular Ethernet card(s): @@ -847,7 +869,7 @@ </descrip> <quote><em/Note:/ With certain cards (notably the - NE2000) you'll have to change the port and/or IRQ + NE2000) you will have to change the port and/or IRQ since there is no ``standard'' location for these cards.</quote> @@ -924,7 +946,7 @@ <p>This is the first section containing lines that are not in the GENERIC kernel. To include sound card - support, you'll have to copy the appropriate lines from + support, you will have to copy the appropriate lines from the LINT kernel (which contains support for <em>every</em> device) as follows: @@ -1019,12 +1041,10 @@ <tag>pseudo-device gzip</tag> <p><tt>gzip</tt> allows you to run FreeBSD programs - that have been compressed with <tt>gzip</tt>. This - is really only useful when you need to compress - FreeBSD programs to fit on a boot floppy. You will - probably never need to compress programs on your - hard drive in this fashion, so you'll probably want - to comment out this line. + that have been compressed with <tt>gzip</tt>. The + programs in <tt>/stand</tt> are compressed so it + is a good idea to have this option in your kernel.</p> + <tag>pseudo-device log</tag> <p><tt>log</tt> is used for logging of kernel error @@ -1034,7 +1054,7 @@ <tag>pseudo-device pty <em>number</em><label id="kernelconfig:ptys"></tag> <p><tt>pty</tt> is a ``pseudo-terminal'' or simulated - login port. It's used by incoming <bf>telnet</bf> + login port. It is used by incoming <bf>telnet</bf> and <bf>rlogin</bf> sessions, xterm, and some other applications such as emacs. The <em>number</em> indicates the number of <tt>pty</tt>s to create. @@ -1068,7 +1088,7 @@ <p>This section describes some miscellaneous hardware devices supported by FreeBSD. Note that none of these - lines are included in the GENERIC kernel, you'll have + lines are included in the GENERIC kernel, you will have to copy them from this handbook or the LINT kernel (which contains support for <em>every</em> device): @@ -1086,7 +1106,7 @@ script that plays some simple songs, and <tt>/usr/games/piano</tt> which lets you play songs using the keyboard as a simple piano (this file - only exists if you've installed the <em>games</em> + only exists if you have installed the <em>games</em> package). Also, the excellent text role-playing game NetHack (in the ports collection) can be configured to use this device to play songs when @@ -1154,7 +1174,7 @@ controller wcd0 <p>If the <tt>config</tt> command fails when you give it your kernel - description, you've probably made a simple error + description, you have probably made a simple error somewhere. Fortunately, <tt>config</tt> will print the line number that it had trouble with, so you can quickly skip to it with <tt>vi</tt>. For example, if @@ -1174,9 +1194,7 @@ config: line 17: syntax error kernel description, but not severe enough for <tt>config</tt> to catch it. Again, look over your configuration, and if you still cannot resolve the - problem, send mail to <tt><htmlurl - url="mailto:questions@freebsd.org" - name="questions@FreeBSD.ORG"></tt> with your kernel + problem, send mail to the &a.questions with your kernel configuration, and it should be diagnosed very quickly. @@ -1226,7 +1244,7 @@ config: line 17: syntax error <tag>Kernel works, but <tt>ps</tt> does not work any more!</tag> - <p>If you've installed a different version + <p>If you have installed a different version of the kernel from the one that the system utilities have been built with, for example, an experimental ``2.2.0'' kernel on a 2.1.0-RELEASE system, many |