Managing and Developing Dynamically Loadable Kernel Modules
Managing and Developing Dynamically Loadable Kernel Modules
Managing Dynamically Loadable Kernel Modules
Chapter 12508
are installed on the system. Furthermore, the format of such information
is subject to change. Using the kmsystem(1M) and kmtune(1M)
commands to modify the planned configuration prior to a whole kernel
configuration or a module configuration will avoid corruption of the
configuration files, and will ensure that the correct files are updated.
CAUTION Avoid editing the system files; doing so is not forward-compatible and
increases the chance of introducing configuration errors.
In addition, a configured, bootable kernel is no longer composed of a
single file. Each new kernel configured with the config(1M) or
mk_kernel(1M) command is composed of several files, including the
main kernel file, the loadable images for DLKMs, a symbol table file, and
a kernel-specific KRS file. All component files of the kernel are essential
for the kernel to boot and run properly. The kmupdate(1M) command
understands the organization of these files and prepares a directory
structure accessible to the boot loader that allows a newly generated
kernel to boot and run properly.
A whole kernel configuration must be followed by a kernel update step
initiated via the kmupdate(1M) command (or config -u) in order to be
able to successfully boot the new kernel.
Because of these effects, it is best to configure any type of kernel module
using the tools described in this section.
CAUTION Avoid copying or moving kernel files; doing so may result in corrupting
the running kernel, or any other configured kernel on the system.
See kmsystem(1M), kmtune(1M), mk_kernel(1M), config(1M), and
kmupdate(1M) for more information.
DLKM Procedures
This section explains how to configure, load, and unload DLKM-enabled
kernel modules. Procedural information is shown in two different ways.
The first is a summary and the second provides the details.
1. DLKM Procedural Flowchart