4.2. WinDriver Installation Process

4.2.1. Windows WinDriver Installation Instructions

[Note]
Driver installation on Windows requires administrator privileges.
  1. Run the WinDriver installation — WD1260.EXE — and follow the installation instructions.
  2. At the end of the installation, you may be prompted to reboot your computer.
[Note]
  • The WinDriver installation defines a WD_BASEDIR environment variable, which is set to point to the location of your WinDriver directory, as selected during the installation. This variable is used during the DriverWizard [5] code generation — it determines the default directory for saving your generated code and is used in the include paths of the generated project/make files.
  • If the installation fails with an ERROR_FILE_NOT_FOUND error, inspect the Windows registry to see if the RunOnce key exists in HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion. This registry key is required by Windows Plug-and-Play in order to properly install drivers using INF files. If the RunOnce key is missing, create it; then try installing the INF file again.

The following steps are for registered users only:

To register your copy of WinDriver with the license you received from Jungo, follow these steps:

  1. Start DriverWizard: Start | Programs | WinDriver | DriverWizard.
  2. Select the Register WinDriver option from the File menu, and insert the license string you received from Jungo.
  3. Click the Activate License button.
  4. To register source code that you developed during the evaluation period, refer to the documentation of WDU_Init() [B.4.1].

4.2.2. Linux WinDriver Installation Instructions

4.2.2.1. Preparing the System for Installation

In Linux, kernel modules must be compiled with the same header files that the kernel itself was compiled with. Since WinDriver installs kernel modules, it must compile with the header files of the Linux kernel during the installation process.

Therefore, before you install WinDriver for Linux, verify that the Linux source code and the file version.h are installed on your machine:

Install the Linux kernel source code:

  • If you have yet to install Linux, install it, including the kernel source code, by following the instructions for your Linux distribution.
  • If Linux is already installed on your machine, check whether the Linux source code was installed. You can do this by looking for 'linux' in the /usr/src directory. If the source code is not installed, either install it, or reinstall Linux with the source code, by following the instructions for your Linux distribution.

Install version.h:

  • The file version.h is created when you first compile the Linux kernel source code. Some distributions provide a compiled kernel without the file version.h. Look under /usr/src/linux/include/linux to see whether you have this file. If you do not, follow these steps:
    1. Become super user:
      $ su
    2. Change directory to the Linux source directory:
      # cd /usr/src/linux
    3. Type:
      # make xconfig
    4. Save the configuration by choosing Save and Exit.
    5. Type:
      # make dep
    6. Exit super user mode:
      # exit

To run GUI WinDriver applications (e.g., DriverWizard [5]; Debug Monitor [7.2]) you must also have version 6.0 of the libstdc++ library — libstdc++.so.6 — and version 12.0 of the libpng library — libpng12.so.0. If you do not have these files, install the relevant packages for your Linux distribution (e.g., libstdc++6 and libpng12-0). Also required is the libqtgui4 package.

Before proceeding with the installation, you must also make sure that you have a linux symbolic link. If you do not, create one by typing
/usr/src$ ln -s <target kernel> linux
For example, for the Linux 3.0 kernel type
/usr/src$ ln -s linux-3.0/ linux

4.2.2.2. Installation

  1. On your development Linux machine, change directory to your preferred installation directory, for example to your home directory:
    $ cd ~
    [Note]
    The path to the installation directory must not contain any spaces.
  2. Extract the WinDriver distribution file — WD1260LN.tgz or WD1260LNx86_64.tgz
    $ tar xvzf <file location>/WD1260LN[x86_64].tgz

    For example, to extract WD1260LN.tgz run this command:
    $ tar xvzf ~/WD1260LN.tgz

  3. Change directory to your WinDriver redist directory (the tar automatically creates a WinDriver directory):
    $ cd <WinDriver directory path>/redist
  4. Install WinDriver:
    1. <WinDriver directory>/redist$ ./configure
      [Note]
      • The configuration script creates a makefile based on the running kernel. You may select to use another installed kernel source, by executing the script with the --with-kernel-source=<path> option, where <path> is the full path to the kernel source directory — e.g., /usr/src/linux.
      • If the Linux kernel version is 2.6.26 or higher, the configuration script generates makefiles that use kbuild to compile the kernel modules. You can force the use of kbuild on earlier versions of Linux, by executing the configuration script with the --enable-kbuild flag.
      [Note]
      For a full list of the configuration script options, use the --help option:
      ./configure --help
    2. <WinDriver directory>/redist$ make
    3. Become super user:
      <WinDriver directory>/redist$ su
    4. Install the driver:
      <WinDriver directory>/redist# make install
  5. Create a symbolic link so that you can easily launch the DriverWizard GUI:
    $ ln -s <path to WinDriver>/wizard/wdwizard /usr/bin/wdwizard
  6. Change the read and execute permissions on the file wdwizard so that ordinary users can access this program.
  7. Change the user and group IDs and give read/write permissions to the device file /dev/windrvr1260, depending on how you wish to allow users to access hardware through the device. Due to security reasons, by default the device file is created with permissions only for the root user. Change the permissions by modifying your /etc/udev/permissions.d/50-udev.permissions file. For example, add the following line to provide read and write permissions:
    windrvr1260:root:root:0666
  8. Define a new WD_BASEDIR environment variable and set it to point to the location of your WinDriver directory, as selected during the installation. This variable is used in the make and source files of the WinDriver samples and generated DriverWizard [5] code, and is also used to determine the default directory for saving your generated DriverWizard projects. If you do not define this variable you will be instructed to do so when attempting to build the sample/generated code using the WinDriver makefiles.
  9. Exit super user mode:
    # exit
  10. You can now start using WinDriver to access your hardware and generate your driver code!
[Tip]
Use the WinDriver/util/wdreg script to load the WinDriver kernel module [9.3].

The following steps are for registered users only:

To register your copy of WinDriver with the license you received from Jungo, follow these steps:

  1. Start DriverWizard:
    $ <path to WinDriver>/wizard/wdwizard
  2. Select the Register WinDriver option from the File menu, and insert the license string you received from Jungo.
  3. Click the Activate License button.
  4. To register source code that you developed during the evaluation period, refer to the documentation of WDU_Init() [B.4.1].

4.2.2.3. Restricting Hardware Access on Linux

[Caution]

Since /dev/windrvr1260 gives direct hardware access to user programs, it may compromise kernel stability on multi-user Linux systems. Please restrict access to DriverWizard and the device file /dev/windrvr1260 to trusted users.

For security reasons the WinDriver installation script does not automatically perform the steps of changing the permissions on /dev/windrvr1260 and the DriverWizard application (wdwizard).