Z-Com XG-762N manual Building the device driver, Package Extraction, Build and install the driver

Models: XG-762N

1 17
Download 17 pages 51.72 Kb
Page 3
Image 3
2. Building the device driver

2. Building the device driver

In this section, we will describe how to build our XG-762N Linux driver under the Linux operating system.

2.1 Package Extraction

tar zxvf XG-762NLnxDrv_xxxx.tar.gz

# 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 XG-762N. If you doesn¡¯t have specified request, both of them will be installed.

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 #KERNEL_SOURCE=/usr/src/linux-2.6.7

#if the kernel is 2.4.x, turn on this KERN_24=y KERNEL_SOURCE=/usr/src/linux-2.4.20-8

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 XG-762N, you can issue :

3

Page 3
Image 3
Z-Com XG-762N Building the device driver, Package Extraction, Build and install the driver, Install individual driver