Managing and Developing Dynamically Loadable Kernel Modules
Managing and Developing Dynamically Loadable Kernel Modules
Managing Dynamically Loadable Kernel Modules
Chapter 12514
5. Generates several C output files (including a makefile named
config.mod) describing the system configuration
6. Generates the module’s registration information in KRS format.
7. Executes the makefile to configure the dynamically loadable module
8. Places the generated dynamically loadable module image files under
the kernel function set directory associated with the running kernel.
To configure a loadable module for dynamic loading and register it with
the running kernel, execute this config command:
/usr/sbin/config -M
module_name
-u
This results in the generation of a loadable image. The -u option forces
config to call the kmupdate command, which causes the system to move
the newly generated image into place and register it with the running
kernel.
Upon completing this configuration procedure, the DLKM is ready to
load on any of its Supported Loading Phases. If the module specifies
runtime (RUN) as a supported loading phase, the module is ready to load
immediately; you do not have to wait for a reboot.
Registering a Dynamically Configured Loadable Module With the HP-
UX Kernel
For a DLKM module configured as dynamically loadable, use the
kmupdate command to update its image and register it with the kernel.
Updating a dynamically configured loadable module’s image means
moving its image into place and registering it with the kernel either
immediately or later, at system shutdown. Once a module is registered
with the kernel, you can view the configured loading phase using
kmadmin -Q
module_name
.
Call kmupdate after first calling config. If you include the -u option in
the config invocation, there is no need to invoke kmupdate separately.
The config -M -u command automatically invokes kmupdate.
Step 1. To update the image of a dynamically configured loadable module
immediately, execute this kmupdate command:
/usr/sbin/kmupdate -M
module_name
-i
If a module by the same module name was already registered with the
running kernel, an immediate update will unregister the old module and
register the new module. In addition, if the old module was loaded, the