Managing and Developing Dynamically Loadable Kernel Modules

Managing and Developing Dynamically Loadable Kernel Modules
Managing Dynamically Loadable Kernel Modules
Chapter 12 515
immediate update will also load the new module.
Step 2. To update the image of a dynamically configured loadable module at
system shutdown (an asynchronous update), execute the following
kmupdate command:
/usr/sbin/kmupdate -M
module_name
-a
If you do not specify the -i or -a option, kmupdate will attempt to
update the specified loadable module immediately. If the module cannot
be updated immediately (for example, the current module is in use and
cannot be unloaded), the module will be updated at system shutdown.
Loading a Dynamically Configured Loadable Module Into the HP-UX
Kernel
To load a dynamically configured loadable module, use the -L option of
the kmadmin command. The load operation initiated by the kmadmin -L
command performs all tasks associated with link editing the module to
the running kernel and making the module accessible to the system.
NOTE All dynamically loadable modules need to be registered before they can
be demand or autoloaded into the running kernel. The kmupdate
command carries out this task.
Specifically, the load operation performs the following tasks:
Verifies that the specified loadable module is registered.
Checks what other modules the loadable module depends on and
automatically loads any such module that is not currently loaded
Allocates space in active memory for the specified loadable module
Loads the specified loadable module from the disk and link edits it
into the running kernel
Relocates the loadable module’s symbols and resolves any references
the module makes to external symbols
Calls the module’s _load() entry point to do any module-specific
initialization and setup
Logically connects the module to the rest of the kernel, which is often
accomplished with the help of module type-specific installation