Здравствуйте!Есть машинка под CentOS 5.1 с воткнутой мультипортовкой MOXA C32010T/PCI. Но к сожалению не удается скомпилировать драйвер для указанной карты.
[root@router-as mxdrv]# uname -a
Linux router-as 2.6.18-53.1.14.el5 #1 SMP Wed Mar 5 11:36:49 EST 2008 i686 i686 i386 GNU/Linux[root@router-as mxdrv]# lspci -v
...
01:01.0 Serial controller: Moxa Technologies Co Ltd Intellio C320 Turbo PCI (rev 02) (prog-if 80)
Flags: medium devsel, IRQ 193
I/O ports at d400 [disabled] [size=128]
Memory at dfff8000 (32-bit, non-prefetchable) [disabled] [size=16K]Исходники драйвера взял c сайта производителя http://www.moxa.com/drivers/C320T/Linux/v5.5/mxdrv.tgz
[root@router-as mxdrv]# make
...
cd driver;\
make
make[1]: Entering directory `/root/tmp/moxa/mxdrv/driver'
cc -DLINUX moxaload.c -o moxaload
moxaload.c: In function ‘main’:
moxaload.c:105: warning: incompatible implicit declaration of built-in function ‘exit’
moxaload.c: In function ‘errexit’:
moxaload.c:482: warning: incompatible implicit declaration of built-in function ‘exit’
strip moxaload
make -C /lib/modules/2.6.18-53.1.14.el5/build SUBDIRS=/root/tmp/moxa/mxdrv/driver modules
make[2]: Entering directory `/usr/src/kernels/2.6.18-53.1.14.el5-i686'
CC [M] /root/tmp/moxa/mxdrv/driver/moxa.o
/root/tmp/moxa/mxdrv/driver/moxa.c:295: error: expected ‘)’ before string constant
/root/tmp/moxa/mxdrv/driver/moxa.c:296: error: expected ‘)’ before string constant
/root/tmp/moxa/mxdrv/driver/moxa.c:297: error: expected ‘)’ before string constant
/root/tmp/moxa/mxdrv/driver/moxa.c:298: error: expected ‘)’ before string constant
/root/tmp/moxa/mxdrv/driver/moxa.c:299: error: expected ‘)’ before string constant
/root/tmp/moxa/mxdrv/driver/moxa.c:300: error: expected ‘)’ before string constant
/root/tmp/moxa/mxdrv/driver/moxa.c:421: warning: initialization from incompatible pointer type
/root/tmp/moxa/mxdrv/driver/moxa.c: In function ‘moxa_init’:
/root/tmp/moxa/mxdrv/driver/moxa.c:522: error: ‘TTY_DRIVER_NO_DEVFS’ undeclared (first use in this function)
/root/tmp/moxa/mxdrv/driver/moxa.c:522: error: (Each undeclared identifier is reported only once
/root/tmp/moxa/mxdrv/driver/moxa.c:522: error: for each function it appears in.)
/root/tmp/moxa/mxdrv/driver/moxa.c:541: warning: assignment from incompatible pointer type
/root/tmp/moxa/mxdrv/driver/moxa.c: In function ‘moxa_ioctl’:
/root/tmp/moxa/mxdrv/driver/moxa.c:1288: error: implicit declaration of function ‘verify_area’
/root/tmp/moxa/mxdrv/driver/moxa.c: In function ‘receive_data’:
/root/tmp/moxa/mxdrv/driver/moxa.c:1797: error: ‘struct tty_struct’ has no member named ‘flip’
/root/tmp/moxa/mxdrv/driver/moxa.c:1805: error: ‘struct tty_struct’ has no member named ‘flip’
/root/tmp/moxa/mxdrv/driver/moxa.c:1806: error: ‘struct tty_struct’ has no member named ‘flip’
/root/tmp/moxa/mxdrv/driver/moxa.c:1807: error: ‘struct tty_struct’ has no member named ‘flip’
/root/tmp/moxa/mxdrv/driver/moxa.c:1824: error: ‘struct tty_struct’ has no member named ‘flip’
/root/tmp/moxa/mxdrv/driver/moxa.c:1825: error: ‘struct tty_struct’ has no member named ‘flip’
/root/tmp/moxa/mxdrv/driver/moxa.c:1826: error: ‘struct tty_struct’ has no member named ‘flip’
make[3]: *** [/root/tmp/moxa/mxdrv/driver/moxa.o] Error 1
make[2]: *** [_module_/root/tmp/moxa/mxdrv/driver] Error 2
make[2]: Leaving directory `/usr/src/kernels/2.6.18-53.1.14.el5-i686'
make[1]: *** [module] Error 2
make[1]: Leaving directory `/root/tmp/moxa/mxdrv/driver'
make: *** [moxa] Error 2Поиск в гугле вразумительных результатов не дал (либо плохо искал).
Буду благодарен за любую помощь.
>make[2]: Entering directory `/usr/src/kernels/2.6.18-53.1.14.el5-i686'
> CC [M] /root/tmp/moxa/mxdrv/driver/moxa.o
>/root/tmp/moxa/mxdrv/driver/moxa.c:295: error: expected ‘)’ before string constantЧто в этой строчке?
>Буду благодарен за любую помощь.
Пишите в саппорт MOXA -- там помогут.
>>make[2]: Entering directory `/usr/src/kernels/2.6.18-53.1.14.el5-i686'
>> CC [M] /root/tmp/moxa/mxdrv/driver/moxa.o
>>/root/tmp/moxa/mxdrv/driver/moxa.c:295: error: expected ‘)’ before string constant
>
>Что в этой строчке?
>292 # if (LINUX_VERSION_CODE > VERSION_CODE(2,1,11))
293 MODULE_AUTHOR("William Chen");
294 MODULE_DESCRIPTION("MOXA Intellio Family Multiport Board Device Driver");
295 MODULE_PARM(type, "1-4i");
296 MODULE_PARM(baseaddr, "1-4i");
297 MODULE_PARM(numports, "1-4i");
298 MODULE_PARM(ttymajor, "i");
299 MODULE_PARM(calloutmajor,"i");
300 MODULE_PARM(verbose,"i");
301 #ifdef MODULE_LICENSE
302 MODULE_LICENSE("GPL");
303 #endif
304 # endif>>Буду благодарен за любую помощь.
>
>Пишите в саппорт MOXA -- там помогут.
>Здравствуйте!
>
>Есть машинка под CentOS 5.1 с воткнутой мультипортовкой MOXA C32010T/PCI. Но к
>сожалению не удается скомпилировать драйвер для указанной карты.
>Решил проблему. На сайте выложен старый драйвер. Инженер поддержки выслал исходники свежего драйвера 5.5.15, который поддерживает ядра до 2.6.20, на что я попросил обновить драйвер в downloads разделе сайта www.moxa.com