13.3. Linux Dynamic Driver Loading

[Note]
The following commands must be executed with root privileges.
[Note]
wdreg is provided in the WinDriver/util directory.
[Tip]
To automatically load WinDriver on each boot, add the following line to the target's Linux boot file (for example, /etc/rc.local):
<path to wdreg> windrvr1260

13.3.1. Dynamically Loading/Unloading Your Kernel PlugIn Driver

If you used WinDriver to develop a Kernel PlugIn driver [11], you must load this driver only after loading the generic WinDriver driver — windrvr1260.o/.ko.
When unloading the drivers, unload your Kernel PlugIn driver before unloading windrvr1260.o/.ko.

Kernel PlugIn drivers are dynamically loadable — i.e., they can be loaded and unloaded without reboot. Use the following commands to dynamically load or unload your Kernel PlugIn driver.

[Note]
The following commands must be executed with root privileges.

[Note]
xxx in the commands signifies your selected Kernel PlugIn driver project name.

  • To dynamically load your Kernel PlugIn driver, run this command:
    # /sbin/insmod <path to kp_xxx_module.o/.ko>
    [Note]
    When building the Kernel PlugIn driver on the development machine, the Kernel PlugIn driver module is created in your Kernel PlugIn project's kermode/linux/LINUX.<kernel version>.<CPU> directory (see Section 12.7.2, Step 4).
    When building the driver on a target distribution machine, the driver module is normally created in an xxx_installation/redist/LINUX.<kernel version>.<CPU>.KP directory (see Section 14.3.3, Step 2).
  • To dynamically unload your Kernel PlugIn, run this command:
    # /sbin/rmmod kp_xxx_module

[Tip]
To automatically load your Kernel PlugIn driver on each boot, add the following line to the target's Linux boot file (for example, /etc/rc.local), after the WinDriver driver module (windrvr1260) load command (replace <path to kp_xxx_module.o/.ko> with the path to your Kernel PlugIn driver module):
/sbin/insmod <path to kp_xxx_module.o/.ko>