![]() | |
|
Since (windrvr6.o/.ko) is a kernel module, it must be recompiled for every kernel version on which it is loaded.
To facilitate recompilation, we supply the following components, which are all provided under the WinDriver/redist directory, unless specified otherwise. You need to distribute these components along with your driver source/object code.
configure: a configuration script that creates makefile from makefile.in and runs configure.wd (see below).
![]() | |
If the Linux kernel is version 2.6.26 or higher,
configure generates makefiles that use
kbuild to compile the kernel modules. You can force the use of
kbuild on earlier versions of Linux, by
passing the --enable-kbuild flag to
configure. The files that use kbuild
include .kbuild in their names.
|
![]() | |
|
When you configure WinDriver for compilation, be sure to exclude USB
support:
|
kbuild, and then installs the module.
Copy the hardware control application/shared object that you created with WinDriver to the target.
If your hardware control application/shared object uses
libwdapi1021.so (as is the case for the
sample and generated DriverWizard WinDriver projects), copy this file from the
WinDriver/lib directory on the development machine to the
target's library directory – /usr/lib for
32-bit x86 or 32-bit PowerPC targets, or
/usr/lib64 for 64-bit x86 targets.
If you are distributing a 32-bit application/shared object to a target
64-bit platform [A.2]
– copy libwdapi1021_32.so from
the WinDriver/lib directory to your distribution package,
rename the copy to libwdapi1021.so, and
copy the renamed file to the target's /usr/lib
directory.
Since your hardware control application/shared object does not have to be matched against the kernel version number, you are free to distribute it as binary code (if you wish to protect your source code from unauthorized copying) or as source code. Note that under the license agreement with Jungo you may not distribute the source code of the libwdapi1021.so shared object.
![]() | |
| If you select to distribute your source code, make sure you do not distribute your WinDriver license string, which is used in the code. |
This section lists the components that must be distributed together with your driver source/object code, to enable recompilation of a Kernel PlugIn module (kp_xxx_module.o/.ko).
Kernel PlugIn modules must be recompiled for every kernel version on which they
are to be loaded. Therefore, you must supply the various Kernel PlugIn
component files to your customers so that they can recompile the Kernel PlugIn.
You can use the configure.kp script that DriverWizard created for
you, during generation of the Kernel PlugIn, to build Kernel PlugIn modules for
distribution.
![]() | |
| You may need to modify the configure.kp script – especially the file paths in it. |
When building the Kernel PlugIn (using the make
command [12.7.3]), before distribution,
the object code for the WinDriver Kernel PlugIn module is created in the
LINUX.<KERNEL_VER>.<CPU> directory.
A different type of *.a file is generated,
depending upon the gcc version used for its compilation. For building the
Kernel PlugIn on the target machine, the .a
file type must be compatible with the target kernel:
![]() | |
| It is recommended to generate and distribute all of the types of .a object code files, to ensure compatibility with various target environments. |
Copy the Kernel PlugIn *.a object files from the LINUX.<KERNEL_VER>.<CPU> directory to the WinDriver/lib directory, for distribution.
The following components, generated by DriverWizard, are provided in the WinDriver/redist directory:
![]() | |
|
kbuild,
and then installs the module.
The following components, generated by DriverWizard, are provided in the WinDriver/lib directory:
The following components are provided in the WinDriver/redist directory:
![]() | |
| These files must be in the same directory as configure.kp configuration script and the generated makefile.kp file. If the files are moved, modify the configuration script to refer to their new location. |
The following components are provided in the WinDriver/include directory:
Distribute the Kernel PlugIn components to the target machine and then build the Kernel PlugIn module there. For example, run the following commands on the target machine, from the redist directory:
To generate the Kernel PlugIn makefile:
$ ./configure.kp --disable-usb-support
To build the Kernel PlugIn module:
$ make -f makefile.kp
A LINUX.<KERNEL_VER>.<CPU>.KP directory is created, containing the newly compiled module: kp_xxx_module.o/.ko.
![]() | |
| When using kbuild, make sure that there is a copy of the Module.symvers file in the same directory as the configure.kp script and the generated makefile.kp file. Module.symvers is generated during compilation of the WinDriver kernel module. |
To install the Kernel PlugIn module:
# make install -f makefile.kp
![]() | |
| Installation of a Kernel PlugIn must be performed with super user (root) privileges. |