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
helllo
i wanan thank you for the idea to make the connection better with the HSDPA devices but as the usbserial module is missing in the ubuntu 9.04 the airprime module is also missed in the kernel 2.6.33 and 2.6.28 i hope you suggest any kernel support the EXT4 and has the airprime module
thank you very much
Optimus
hello ^^' it's me again
i'm so sorry for desturbing but i found some troubles
when i put
# make -C /lib/modules/`uname -r`/build M=`pwd`
this is the result :
make: entrant dans le répertoire « /usr/src/linux-headers-2.6.33-020633-generic »
CC [M] /home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.o
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:19:26: erreur: linux/config.h : Aucun fichier ou dossier de ce type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c: In function ‘port_release’:
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:550: erreur: ‘struct device’ has no member named ‘bus_id’
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:792:55: erreur: la macro « INIT_WORK » a reçu 3 arguments, mais elle n'en prend que 2
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c: In function ‘usb_serial_probe’:
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:792: erreur: ‘INIT_WORK’ undeclared (first use in this function)
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:792: erreur: (Each undeclared identifier is reported only once
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:792: erreur: for each function it appears in.)
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:818: attention : passing argument 6 of ‘usb_fill_bulk_urb’ from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:842: attention : passing argument 6 of ‘usb_fill_bulk_urb’ from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:866: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:894: attention : passing argument 6 of ‘usb_fill_int_urb’ from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:925: erreur: ‘struct device’ has no member named ‘bus_id’
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:925: erreur: ‘struct device’ has no member named ‘bus_id’
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:926: erreur: ‘struct device’ has no member named ‘bus_id’
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c: Hors de toute fonction :
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1010: attention : initialization from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1013: attention : initialization from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1015: erreur: unknown field ‘read_proc’ specified in initializer
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1015: attention : initialization from incompatible pointer type
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c: In function ‘usb_serial_init’:
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1044: erreur: ‘struct tty_driver’ has no member named ‘devfs_name’
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1050: erreur: ‘TTY_DRIVER_NO_DEVFS’ undeclared (first use in this function)
/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.c:1074: erreur: implicit declaration of function ‘info’
make[1]: *** [/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial/usb-serial.o] Erreur 1
make: *** [_module_/home/optimus/Bureau/linux-2.6.17/drivers/usb/serial] Erreur 2
make: quittant le répertoire « /usr/src/linux-headers-2.6.33-020633-generic »
so please !! if you have any answer for this 🙁
If this will be the only error, then you are quite happy.
linux/config.h could have a new name linux/autoconf.h. So you can edit the module
source and change the include lines or you can create a symlink from
autoconf.h to config.h.
I hope tris helps
no it's the same problem :S the config.h & autoconf.h was missing in 2.6.33 but i've copy them !! and the module has no config.h or autoconf.h in his include lines
and what usb-serial.c is doing here ???
if you have any other idea please
thank you very much
Now i’m out to spend my holyday… I’ve seen something interesting regarding kernel 2.6.33:
https://patchwork.kernel.org/patch/72714/
http://www.linuxhq.com/kernel/v2.6/33/Makefile
Let me know if these links help you.
no it didn't 🙁 i try lot of things but nothing has work , can you share the airprime.ko if it's possible to work for me even it was not build in my pc ???
anyway i'll let you enjoy your holiday ^^ then if you have a time please try to do it
thank you very much