next up previous contents
Next: 13. Dynamically Loading Your Up: 12. Writing a Kernel Previous: 12.7 Compile Your Kernel   Contents

Subsections


12.8 Install Your Kernel PlugIn Driver


12.8.1 On Windows

  1. Copy the driver file (xxx.sys) to the target platform's drivers directory: %windir%$\backslash$system32$\backslash$drivers (e.g., C:$\backslash$WINNT$\backslash$system32$\backslash$drivers - on Windows 2000, or C:$\backslash$Windows$\backslash$system32$\backslash$drivers - on Windows XP/Server2003/Vista).

    ****************************************************************************************
      NOTE
      If your Kernel PlugIn driver is intended for Windows 98/Me, develop the driver on a Windows 2000/XP/Server 2003/Vista host PC (see note in section 12.7).
    ****************************************************************************************

  2. Register/load your driver, using the wdreg.exe (or wdreg_gui.exe) utility - on Windows 2000/XP/Server 2003/Vista, or using the wdreg16.exe utility - on Windows 98/Me:

    ****************************************************************************************
      NOTES
     
    • In the following instructions, 'KP_NAME' stands for your Kernel PlugIn driver's name, without the .sys extension.
    • For Windows 98/Me, replace references to 'wdreg' below with 'wdreg16' (see section 13.2.2 for more information regarding the WDREG utility.)
    ****************************************************************************************

    To install your driver, run:
    WinDriver$\backslash$util> wdreg -name KP_NAME install

****************************************************************************************
  NOTE
  Kernel PlugIn drivers, with the exception of SYS drivers on Windows 98/Me, are dynamically loadable, and thus do not require a reboot in order to load.
****************************************************************************************


12.8.2 On Linux

  1. Change directory to your Kernel PlugIn driver directory.

    For example, when installing the sample KP_PCI driver, run:
    cd WinDriver/samples/pci_diag/kp_pci

    When installing a driver created using the Kernel PlugIn files generated by the DriverWizard, run the following command, where <path> represents the path to your generated DriverWizard project directory (e.g. /home/user/WinDriver/wizard/my_projects/my_kp/):
    cd <path>/kermode/

  2. Run the following command to install your Kernel PlugIn driver:
    make install


12.8.3 On Solaris

****************************************************************************************
  NOTE
  Installation of the Kernel PlugIn Driver should be performed by the system administrator logged in as root, or with root privileges (become a super user).
****************************************************************************************

  1. Change directory to your Kernel PlugIn directory.

    When installing the sample KP_PCI driver, run:
    # cd WinDriver/samples/pci_diag/kp_pci

    When installing a driver created using the Kernel PlugIn files generated by DriverWizard, run the following command, where <path> represents the path to your generated DriverWizard project directory (e.g. /home/user/WinDriver/wizard/my_projects/my_kp/):
    # cd <path>/kermode

  2. Copy the the kp_pci.conf configuration file to the target's kernel/drv/ directory.

    The sample KP_PCI Kernel PlugIn configuration file is located directly under the sample's kp_pci / directory, therefore when installing the sample driver run:
    # cp kp_pci.conf /kernel/drv

    The generated DriverWizard Kernel PlugIn configuration file is located under the project's kermode/solaris sub-directory, therefore when installing a generated Kernel PlugIn driver run:
    # cp solaris/kp_pci.conf /kernel/drv

  3. Change directory to your Kernel PlugIn Solaris sub-directory.

    For the sample KP_PCI driver, run:
    # cd SOLARIS

    When installing a driver created using the Kernel PlugIn files generated by DriverWizard, run:
    # cd solaris

  4. Copy your Kernel PlugIn driver to the target's drivers directory.

    For example to copy the sample KP_PCI driver:

    On 64-bit platforms run:
    # cp kp_pci /kernel/drv/sparcv9

    On 32-bit platforms run:
    # cp kp_pci /kernel/drv

  5. Install the driver by running:
    # make install

****************************************************************************************
  NOTE
  The following commands are also useful when installing a driver on Solaris:
  • modinfo - lists the loaded kernel modules.
  • rem_drv - removes the kernel module.
****************************************************************************************


next up previous contents
Next: 13. Dynamically Loading Your Up: 12. Writing a Kernel Previous: 12.7 Compile Your Kernel   Contents