Tengo un problema al compilar driver.
andres_5:
Hola, tengo un problema al compilar mi driver de una tarjeta de puerto de series y de puertos paralelos(la tarjeta pci) me venia un disco con el drive sin compilar, y tendria que compilarlo yo, normalmente vienen las indicaciones del fabricante, pero en este caso por mas que lo sigo, no lo consigo hacer funcionar, os copio mi codigo aver si llegais a algo en claro.
Código
andres@andres-desktop:~$ sudo -s
[sudo] password for andres:
root@andres-desktop:~# cd Escritorio/
root@andres-desktop:~/Escritorio# cd MCS9865/
root@andres-desktop:~/Escritorio/MCS9865# make
rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/2.6.32-29-generic/build/ SUBDIRS=/home/andres/Escritorio/MCS9865 modules
make[1]: se ingresa al directorio «/usr/src/linux-headers-2.6.32-29-generic»
CC [M] /home/andres/Escritorio/MCS9865/mcs9865.o
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘serial9865_start_tx’:
/home/andres/Escritorio/MCS9865/mcs9865.c:498: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘check_modem_status’:
/home/andres/Escritorio/MCS9865/mcs9865.c:611: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘receive_chars’:
/home/andres/Escritorio/MCS9865/mcs9865.c:622: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘transmit_chars’:
/home/andres/Escritorio/MCS9865/mcs9865.c:708: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘transmit_chars_dma_stop_done’:
/home/andres/Escritorio/MCS9865/mcs9865.c:753: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘transmit_chars_dma_done’:
/home/andres/Escritorio/MCS9865/mcs9865.c:769: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘receive_chars_dma_done’:
/home/andres/Escritorio/MCS9865/mcs9865.c:852: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘serial9865_handle_port’:
/home/andres/Escritorio/MCS9865/mcs9865.c:957: error: ‘struct uart_port’ has no member named ‘info’
/home/andres/Escritorio/MCS9865/mcs9865.c: In function ‘serial9865_probe’:
/home/andres/Escritorio/MCS9865/mcs9865.c:2068: error: ‘SA_SHIRQ’ undeclared (first use in this function)
/home/andres/Escritorio/MCS9865/mcs9865.c:2068: error: (Each undeclared identifier is reported only once
/home/andres/Escritorio/MCS9865/mcs9865.c:2068: error: for each function it appears in.)
make[2]: *** [/home/andres/Escritorio/MCS9865/mcs9865.o] Error 1
make[1]: *** [_module_/home/andres/Escritorio/MCS9865] Error 2
make[1]: se sale del directorio «/usr/src/linux-headers-2.6.32-29-generic»
make: *** [default] Error 2
andres@andres-desktop:~$
Espero que sea alguna pamplina, y que me podais ayudar, un saludo y gracias de antemano.
leogtz:
¿Consultaste bien el archivo README o el INSTALL?
Tal vez tengas que linkear una libreria.
andres_5:
adjunto el contenido de readme.txt:
Código:
The Following files will be there with the tar of the Driver:
mcs9865.c
mcs9865.h
mcs9865-isa.c
mcs9865-isa.h
Makefile
README
mcs9865
Building the Driver:
--------------------
Change to the folder with the Starex source files. And run the following Command:
$ make
Once the driver is compliles the loadable module mcs9865.ko will be created in the same folder.
** '$' --this symbol represent the shell prompt on linux
Loading the Driver:
-------------------
To load the driver use the following command:
$ insmod mcs9865.ko
$ insmod mcs9865-isa.ko
** '$' --this symbol represent the shell prompt on linux
Unloading the Driver:
---------------------
To unload the driver use the following command:
$rmmod mcs9865
$rmmod mcs9865-isa
** '$' --this symbol represent the shell prompt on linux
Installing the Driver:
----------------------
To install the driver use the following command:
make install
Uninstalling the Driver:
------------------------
To un-install the driver use the following command:
make uninstall
Note: only baud rates upto 3.0Mbps are implemented in the current driver.
Feature Configuration:
----------------------
This driver comes with a static array uart_9865_contxts[ ] for all the 16 ports features in the 9865.c file.
Where u can set the features like:
-DMA in RX
-DMA in TX
-enable/disable Flow control
-Flow control type
-RX fifo trigger level
-TX fifo trigger level
-x-on character
-x-off character
An example array setting for PORT 0 which will be recognised as /dev/ttyD0:
//Port 0 --**This represents that this setting is for port 0 which will be recognised as /dev/ttyD0
{
.rx_dma_en = 0,
.tx_dma_en = 0,
.uart_mode = MCS9865_RS232_MODE,
.en_flow_control = 0,
.flow_ctrl_type = MCS9865_XON_XOFF_HW_FLOWCONTROL,
.rxfifotrigger = 64,
.txfifotrigger = 64,
.x_on = SERIAL_DEF_XON,
.x_off = SERIAL_DEF_XOFF,
},
To change it to different modes like RS232 and RS422, we have to fille the .uart_mode with corresponding //UART mode defined in header files. for example for setting it to RS422 mode, we have to fill .uart_mode=MCS9865_RS422_MODE.
Kernels:
--------
This driver is currently developed and tested on 2.6.11 linux kernel and above
Limitations:
------------
This driver supports a maximum of 16 serial devices. This can be modified as required
Steps for setting parallel port :
---------------------------------
1. rmmod lp
2. rmmod parport_pc
2. insmod /usr/lib/modules/2.6.15/kernel/drivers/parport/parport_pc io=0xb000 irq=10.
Note: Here, the io and irq should be noted from lspci -v.
Saludos y gracias por comentar
leogtz:
¿Después de hacer el make como root se crea "mcs9865.ko"?
andres_5:
he estado toqueteando y descargandome una version nueva en la pagina del fabricante he conseguido crear el .ko, pero luego cuando intento instalar no me deja, pero bueno... os dejo lo que me dice aver...
Código:
andres@andres-desktop:~$ sudo -s
[sudo] password for andres:
Sorry, try again.
[sudo] password for andres:
Sorry, try again.
[sudo] password for andres:
root@andres-desktop:~# cd Escritorio
root@andres-desktop:~/Escritorio# cd MCS9865_V1
bash: cd: MCS9865_V1: No existe el fichero o el directorio
root@andres-desktop:~/Escritorio# cd MCS9865_V1.0.0.9/
root@andres-desktop:~/Escritorio/MCS9865_V1.0.0.9# make
rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/2.6.32-29-generic/build/ SUBDIRS=/home/andres/Escritorio/MCS9865_V1.0.0.9 modules
make[1]: se ingresa al directorio «/usr/src/linux-headers-2.6.32-29-generic»
CC [M] /home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865.o
/home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865.c: In function ‘receive_chars’:
/home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865.c:644: warning: comparison of distinct pointer types lacks a cast
/home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865.c:718: warning: comparison of distinct pointer types lacks a cast
CC [M] /home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865-isa.o
Building modules, stage 2.
MODPOST 2 modules
CC /home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865-isa.mod.o
LD [M] /home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865-isa.ko
CC /home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865.mod.o
LD [M] /home/andres/Escritorio/MCS9865_V1.0.0.9/mcs9865.ko
make[1]: se sale del directorio «/usr/src/linux-headers-2.6.32-29-generic»
root@andres-desktop:~/Escritorio/MCS9865_V1.0.0.9# ^C
root@andres-desktop:~/Escritorio/MCS9865_V1.0.0.9# make install
cp mcs9865.ko mcs9865-isa.ko /lib/modules/2.6.32-29-generic/kernel/drivers/serial/
depmod -A
chmod +x mcs9865
cp mcs9865 /etc/init.d/
ln -s /etc/init.d/mcs9865 /etc/rc.d/rc3.d/Smcs9865 || true
ln: creando el enlace simbólico «/etc/rc.d/rc3.d/Smcs9865»: No existe el fichero o el directorio
ln -s /etc/init.d/mcs9865 /etc/rc.d/rc5.d/Smcs9865 || true
ln: creando el enlace simbólico «/etc/rc.d/rc5.d/Smcs9865»: No existe el fichero o el directorio
modprobe mcs9865
modprobe mcs9865-isa
root@andres-desktop:~/Escritorio/MCS9865_V1.0.0.9#
En verdad no tengo ni ideas si ha conseguido instalar los drivers, pero por lo uqe veo de que no exise fichero o direcctorios me da mala sensacion.
Un saludo y gracias.
Navegación
[#] Página Siguiente