PR: docs/150124
Fix/Update the instructions on "how to build a custom kernel". - The fact that you need the whole source tree for this is well hidden at the moment. - The instructions on how to extract the src tree from a CD are wrong (changed pathnames). - In order to extract the full src tree you would need 20 cat/tar commands. So remove that part. - While here do some additional rewording. Noticed by: Jared (blahbleh666 ett hotmail dott com)
This commit is contained in:
parent
b69ba5fede
commit
509fb09013
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=37042
1 changed files with 23 additions and 27 deletions
|
@ -266,6 +266,11 @@ following line in &man.loader.conf.5:
|
|||
<secondary>building / installing</secondary>
|
||||
</indexterm>
|
||||
|
||||
<note>
|
||||
<para>It is required to have the full &os; source tree installed
|
||||
to build the kernel.</para>
|
||||
</note>
|
||||
|
||||
<para>First, let us take a quick tour of the kernel build directory.
|
||||
All directories mentioned will be relative to the main
|
||||
<filename>/usr/src/sys</filename> directory, which is also
|
||||
|
@ -287,35 +292,26 @@ following line in &man.loader.conf.5:
|
|||
directory structure, with each supported device, file system, and
|
||||
option in its own subdirectory.</para>
|
||||
|
||||
<para>This chapter assumes that you are using the i386 architecture
|
||||
in the examples. If this is not the case for your situation,
|
||||
make appropriate adjustments to the path names for your system's
|
||||
architecture.</para>
|
||||
<para>The examples in this chapter assume that you are using the i386
|
||||
architecture. If your system has a different architecture you need
|
||||
to change the path names accordingly.</para>
|
||||
|
||||
<note>
|
||||
<para>If there is <emphasis>not</emphasis> a
|
||||
<filename>/usr/src/sys</filename> directory on your system,
|
||||
then the kernel source has not been installed. The easiest
|
||||
way to do this is by running
|
||||
<command>sysinstall</command> as
|
||||
<username>root</username>, choosing
|
||||
<para>If the directory <filename>/usr/src/</filename> does not
|
||||
exist on your system (or if it is empty), then the sources have
|
||||
not been installed. The easiest way to install the full source
|
||||
tree is is to run <command>sysinstall</command> as
|
||||
<username>root</username>, and then choosing
|
||||
<guimenuitem>Configure</guimenuitem>, then
|
||||
<guimenuitem>Distributions</guimenuitem>, then
|
||||
<guimenuitem>src</guimenuitem>, then
|
||||
<guimenuitem>base</guimenuitem> and
|
||||
<guimenuitem>sys</guimenuitem>. If you have an aversion to
|
||||
<application>sysinstall</application> and you have access to
|
||||
an <quote>official</quote> &os; CDROM, then you can also
|
||||
install the source from the command line:</para>
|
||||
<guimenuitem>src</guimenuitem>, and finally
|
||||
<guimenuitem>All</guimenuitem>. If it does not exist, you should
|
||||
also create a symlink to <filename>/usr/src/sys/</filename>:</para>
|
||||
|
||||
<screen>&prompt.root; <userinput>mount /cdrom</userinput>
|
||||
&prompt.root; <userinput>mkdir -p /usr/src/sys</userinput>
|
||||
&prompt.root; <userinput>ln -s /usr/src/sys /sys</userinput>
|
||||
&prompt.root; <userinput>cat /cdrom/src/ssys.[a-d]* | tar -xzvf -</userinput>
|
||||
&prompt.root; <userinput>cat /cdrom/src/sbase.[a-d]* | tar -xzvf -</userinput></screen>
|
||||
<screen>&prompt.root; <userinput>ln -s /usr/src/sys/ /sys/</userinput></screen>
|
||||
</note>
|
||||
|
||||
<para>Next, move to the
|
||||
<para>Next, change to the
|
||||
<filename><replaceable>arch</replaceable>/conf</filename> directory
|
||||
and copy the <filename>GENERIC</filename> configuration file to the
|
||||
name you want to give your kernel. For example:</para>
|
||||
|
@ -392,6 +388,11 @@ following line in &man.loader.conf.5:
|
|||
<procedure>
|
||||
<title>Building a Kernel</title>
|
||||
|
||||
<note>
|
||||
<para>It is required to have the full &os; source tree installed
|
||||
to build the kernel.</para>
|
||||
</note>
|
||||
|
||||
<step>
|
||||
<para>Change to the <filename
|
||||
class="directory">/usr/src</filename> directory:</para>
|
||||
|
@ -412,11 +413,6 @@ following line in &man.loader.conf.5:
|
|||
</step>
|
||||
</procedure>
|
||||
|
||||
<note>
|
||||
<para>It is required to have full &os; source tree to build the
|
||||
kernel.</para>
|
||||
</note>
|
||||
|
||||
<tip>
|
||||
<para>By default, when you build a custom kernel,
|
||||
<emphasis>all</emphasis> kernel modules will be rebuilt as well.
|
||||
|
|
Loading…
Reference in a new issue