- No category
advertisement
All files needed to compile a new kernel mode driver are in AcqirisLinux/linuxdriverpci for Linux kernels 2.4, or AcqirisLinux/linux2.6driverpci for Linux kernels 2.6.
To compile the driver, the header files of the Linux kernel need to be installed. Furthermore, depending on the Linux distribution, the kernel source files may need to be installed too.
Compiling for Linux kernels 2.6
The makefile will try to guess where the kernel headers are located. If it fails, see the instructions inside the makefile itself to specify manually where these kernel header files are located.
To compile a new kernel module, use the following commands:
cd linux2.6driverpci
make clean all
make install to generate a new kernel module from scratch to copy the kernel module where it should reside
(this last command require super user privileges).
In the end, the loadable kernel module should be present in the system's loadable kernel modules directory. You can verify that it is present by running:
ls -l /lib/modules/$(uname -r)/extra/acqrsPCI.ko
For Debian users, in order to compile the kernel module on a system, the kernel packages that match the current kernel-image must be installed. For instance, on a Debian ‘etch’ 4.0 system 686 the required packages are:
linux-image-2.6-686
linux-image-2.6.18-4-686
linux-headers-2.6-686
linux-headers-2.6.18-4
linux-headers-2.6.18-4-686
linux-kbuild-2.6.18
Note that this version of the loadable kernel module had been tested on Linux kernel versions up to 2.6.18. However, starting with kernel 2.6.17, a few kernel functions relating to the device classes are no longer available to proprietary modules. Thus automatic creation of the /dev/acqrsPCI node has to be done manually in the /etc/rc.local file (see below).
Compiling for Linux kernels 2.4
The makefile will try to guess where they are located. If it fails, see the instructions inside the makefile itself to specify manually where these kernel header files are located.
The path variable INCLUDEDIR in the makefile has to point to the correct kernel header files. The default is
INCLUDEDIR=/usr/src/linux-2.4
. This path usually is a link to the actual header files (driver source). To compile for a new kernel, issue the following commands:
cd linuxdriverpci
make clean
Make
drv-install rem
drv-install add to remove all *.o files in AcqirisLinux/linuxdriverpci. to generate a new kernel mode driver acqrsPCI.o and also copy it to the directory AcqirisLinux/lib/module where the install script (drv_install) can access it. to remove the previous installed kernel mode driver. to install the new driver.
In the end, the loadable kernel module should be present in the system's loadable kernel modules directory. You can verify that it is present by running:
ls -l /lib/modules/$(uname -r)/ACQIRIS/acqrsPCI.o.
2.2.2. Loading the Linux device driver
To install the device driver and the load script to the system, you have to get super user privileges and execute the driver install script by typing, cd AcqirisLinux
./drv-install add
You can check that the driver is loaded properly with lsmod.
/sbin/lsmod | grep acqrsPCI
User Manual: Agilent Acqiris Averagers Page 11 of 44
advertisement
Related manuals
advertisement
Table of contents
- 10 Using a compiled kernel module
- 10 Compiling the kernel module
- 11 Compiling for Linux kernels 2.6
- 11 Compiling for Linux kernels 2.4
- 12 Loading the module into the kernel
- 12 Creating the device driver node
- 30 Operating Temperature
- 30 Relative Humidity
- 30 Dimensions
- 30 Safety
- 30 EMC Immunity
- 30 EMC Emissions
- 30 Required Airflow