2. Building the device driver
In this section, we will describe how to build our
2.1 Package Extraction
tar zxvf
# where xxxx is the version number, such as 2_0_0_0
The first thing one should do is to uncompress this package by tar. After untaring this package, you can see the source files. One should change directory into this directory for proceeding the next step.
2.2 Build and install the driver
The package contains drivers for
Under the extracted directory, there is a Makefile in it. Because our driver can support for kernel 2.4 and kernel 2.6, there are two sets of rule in the Makefile. One has to modify the Makefile according to the path of ¡°kernel s ource tree¡±and the version of the kernel in your system. In the Makefile, you may see the following statements,
#if the kernel is 2.6.x, turn on this #KERN_26=y
#if the kernel is 2.4.x, turn on this KERN_24=y
If you want to build the kernel under the kernel of 2.4.x, one has to set the variable KERN_24=y and comment the KERN_26=y like that as the example above and modify the variable KERNEL_SOURCE to the path which you install the kernel source. After doing these things, one just need to type the ¡°make¡±, and the driver module will be generated and installed.
2.3 Install individual driver
If you only need driver of
3