To build this module (any modules) you shall have installed the following items:

  • linux source code
  • linux headers
  • gcc
  • make

After you have installed these items, login as root in a terminal window (you can also use the sudo -s command in a terminal window)

gg1@work:$ sudo -s

[sudo] password for gg1: ********

root@work:#

now you shall modify the airprime.c code:

root@work:# cd /usr/src/linux-source-2.6.24/drivers/usb/serial/

root@work:#

Open the airprime source file with a text editor (i.e. gedit)

root@work:/usr/src/linux-source-2.6.24/drivers/usb/serial# gedit airprime.c

Search for the structure usb_device_id, and as the first line of the struct add the following line:

{ USB_DEVICE(0x1c9e, 0x6061) }, /* ALCATEL ONE TOUCH X020 */ now you should have something like this: static struct usb_device_id id_table [] = { { USB_DEVICE(0x1c9e, 0x6061) }, /* ALCATEL ONE TOUCH X020 */ .......................................................... .......................................................... .......................................................... .......................................................... { }, };

Save the file and exit from gedit. Now you are ready to build and install the module:

root@work:# make -C /lib/modules/`uname -r`/build M=`pwd`

root@work:# depmod -a

root@work:# cp airprime.ko /lib/modules/`uname -r`/kernel/drivers/usb/serial/

root@work:# modprobe airprime

Now you should have the ttyUSB devices in the /dev directory:

root@work:# ls -l /dev/ttyUSB*

crw-rw---- 1 root dialout 4, 10 2008-11-08 16:57 /dev/ttyUSB0

crw-rw---- 1 root dialout 4, 11 2008-11-08 16:57 /dev/ttyUSB1

crw-rw---- 1 root dialout 4, 12 2008-11-08 16:57 /dev/ttyUSB2

crw-rw---- 1 root dialout 4, 13 2008-11-08 16:57 /dev/ttyUSB3

crw-rw---- 1 root dialout 4, 14 2008-11-08 16:57 /dev/ttyUSB4

crw-rw---- 1 root dialout 4, 15 2008-11-08 16:57 /dev/ttyUSB5

crw-rw---- 1 root dialout 4, 16 2008-11-08 16:57 /dev/ttyUSB6