Add a section about using modules.
PR: 87445 Reviewed by: brueffer, remko
This commit is contained in:
parent
c3a59abed8
commit
12df008bb1
Notes:
svn2git
2020-12-08 03:00:23 +00:00
svn path=/head/; revision=32612
1 changed files with 47 additions and 0 deletions
|
@ -210,6 +210,53 @@ ath_hal(4) - Atheros Hardware Access Layer (HAL)</programlisting>
|
|||
a custom kernel should appear less daunting.</para>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="kernelconfig-modules">
|
||||
<title>Kernel Drivers, Subsystems, and Modules</title>
|
||||
<indexterm>
|
||||
<primary>kernel</primary>
|
||||
<secondary>drivers / modules / subsystems</secondary>
|
||||
</indexterm>
|
||||
|
||||
<para>Before building a custom kernel, consider the reasons for
|
||||
doing so. If there is a need for specific hardware support,
|
||||
it may already exist as a module.</para>
|
||||
|
||||
<para>Kernel modules exist in the
|
||||
<filename role="directory">/boot/kernel</filename> directory
|
||||
and may be dynamically loaded into the running kernel using
|
||||
&man.kldload.8;. Most, if not all kernel drivers have a
|
||||
specific module and manual page. For example, the last section
|
||||
noted the <devicename>ath</devicename> wireless Ethernet driver.
|
||||
This device has the following information in its manual
|
||||
page:</para>
|
||||
|
||||
<programlisting>Alternatively, to load the driver as a module at boot time, place the
|
||||
following line in &man.loader.conf.5:
|
||||
|
||||
if_ath_load="YES"</programlisting>
|
||||
|
||||
<para>As instructed, adding the <literal>if_ath_load="YES"</literal>
|
||||
line to the <filename>/boot/loader.conf</filename> file will
|
||||
enable loading this module dynamically at boot time.</para>
|
||||
|
||||
<para>In some cases; however, there is no associated module. This
|
||||
is mostly true for certain subsystems and very important drivers,
|
||||
for instance, the fast file system (<acronym>FFS</acronym>) is a
|
||||
required option in the kernel. As is network support (INET).
|
||||
Unfortunately the only way to tell if a driver is required is to
|
||||
check for the module itself.</para>
|
||||
|
||||
<warning>
|
||||
<para>It is considerably easy to remove built in support for a
|
||||
device or option and have a broken kernel. For example, if
|
||||
the &man.ata.4; driver is pulled from the kernel configuration
|
||||
file, a system using <acronym>ATA</acronym> disk drivers may
|
||||
not boot without the line added to
|
||||
<filename>loader.conf</filename>. When in doubt, check for
|
||||
the module and then just leave support in the kernel.</para>
|
||||
</warning>
|
||||
</sect1>
|
||||
|
||||
<sect1 id="kernelconfig-building">
|
||||
<title>Building and Installing a Custom Kernel</title>
|
||||
<indexterm>
|
||||
|
|
Loading…
Reference in a new issue