Pointed Q 4.1 to Handbook section on kernel building
Submitted by: Doug White <dwhite@gdi.uoregon.edu>
This commit is contained in:
parent
0d73182d8a
commit
a744b4c437
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=2821
1 changed files with 3 additions and 64 deletions
|
@ -1,4 +1,4 @@
|
|||
<!-- $Id: kernelconfig.sgml,v 1.1 1997-11-03 08:53:48 max Exp $ -->
|
||||
<!-- $Id: kernelconfig.sgml,v 1.2 1998-05-19 01:46:05 jkh Exp $ -->
|
||||
<!-- The FreeBSD Documentation Project -->
|
||||
|
||||
<sect>
|
||||
|
@ -10,69 +10,8 @@
|
|||
<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>Not at all! Check out the <url url="../handbook/kernelconfig.html"
|
||||
name="kernel config section of the Handbook">.
|
||||
|
||||
<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
|
||||
|
|
Loading…
Reference in a new issue