ubuntu下安装expresscard转USB驱动【失败】

来源:互联网 发布:4g网络覆盖 编辑:程序博客网 时间:2024/04/28 22:07

折腾了一天最后放弃了,去京东买了力特的usb转232. 记下来以后在研究吧。


运行环境:ubuntu 10.04.3 LTS

                    Linux 2.6.32-35-generic


我用的是MOGE(魔羯)的MC579, expresscard转232. 之前一直在window下用+虚拟机运行Linux,做开发时要不停的切换,实在麻烦。下面是当时做的些尝试:

先在MOGE提供的驱动光盘里找到了一个Linux下的驱动,按照readme里的步骤,解压,make,出错:

rm -f *.mod.c *.o *.ko .*.cmd *.symvers
make -C /lib/modules/2.6.32-35-generic/build/  SUBDIRS=/home/qie/soft/MCS9901_Linux/starex modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.32-35-generic'
  CC [M]  /home/qie/soft/MCS9901_Linux/starex/9900.o
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘serial9900_start_tx’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:498: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘check_modem_status’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:611: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘receive_chars’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:622: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘transmit_chars’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:708: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘transmit_chars_dma_stop_done’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:753: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘transmit_chars_dma_done’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:769: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘receive_chars_dma_done’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:852: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘serial9900_handle_port’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:957: error: ‘struct uart_port’ has no member named ‘info’
/home/qie/soft/MCS9901_Linux/starex/9900.c: In function ‘serial9900_probe’:
/home/qie/soft/MCS9901_Linux/starex/9900.c:2062: error: ‘SA_SHIRQ’ undeclared (first use in this function)
/home/qie/soft/MCS9901_Linux/starex/9900.c:2062: error: (Each undeclared identifier is reported only once
/home/qie/soft/MCS9901_Linux/starex/9900.c:2062: error: for each function it appears in.)
make[2]: *** [/home/qie/soft/MCS9901_Linux/starex/9900.o] Error 1
make[1]: *** [_module_/home/qie/soft/MCS9901_Linux/starex] Error 2
make[1]: Leaving directory `/usr/src/linux-headers-2.6.32-35-generic'
make: *** [default] Error 2

google一下发现原因是驱动和内核版本不匹配,去linux源码里在serial_core.h找到了struct uart_port,果然没有info.

于是去MOSCHIP官网下最新的99xx的驱动,www.moschip.com,make,出现跟刚才一样的错误。看了一下release note只支持到2.6.31,坑爹......

于是乎照着网上一牛人给出的patch老老实实的改驱动源码。链接如下:http://izto.org/mcs9865/mcs9865-2.6.31.6.patch  http://izto.org/mcs9865/mcs9865-26316-26364.patch

make, make install, successful!

then........

插上expresscard,ls /dev/,什么也没有发生.....没有看到传说中的ttyDx设备。

泪奔至京东买了个usb转232......