我尝试在我的linux机器上安装CP210x驱动程序失败了。我机器上当前版本的内核是2.6.18。
虽然我听说过,所有内核> 2.6.12预先加载了CP210驱动程序,当我尝试时,我无法找到一个,
modprobe cp210x
它返回了一个错误。
因此,当我尝试从Silabs安装Cp210x驱动程序时,我不断结束以下错误,
make -C /lib/modules/2.6.18-194.8.1.el5/build
M=/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source modules
make-3.79.1-p7[1]: Entering directory `/usr/src/kernels/2.6.18-194.8.1.el5-x86_64'
CC [M] /users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.o
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:45: warning: 'struct ktermios' declared inside parameter list
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:45: warning: its scope is only this definition or declaration, which is probably not what you want
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:47: warning: 'struct ktermios' declared inside parameter list
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:175: error: unknown field 'usb_driver' specified in initializer
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:175: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:178: error: unknown field 'bulk_in_size' specified in initializer
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:178: warning: missing braces around initializer
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:178: warning: (near initialization for 'cp210x_device.driver_list')
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:178: warning: initialization makes pointer from integer without a cast
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:179: error: unknown field 'bulk_out_size' specified in initializer
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:179: warning: initialization makes pointer from integer without a cast
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:180: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:181: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:182: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:183: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:184: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:185: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:186: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:188: error: unknown field 'release' specified in initializer
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:188: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:189: error: unknown field 'dtr_rts' specified in initializer
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:190: warning: initialization from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: In function 'cp210x_open':
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:446: warning: passing argument 1 of 'usb_serial_generic_open' from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:446: warning: passing argument 2 of 'usb_serial_generic_open' from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: In function 'cp210x_close':
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:453: error: too few arguments to function 'usb_serial_generic_close'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:455: error: 'struct usb_serial' has no member named 'disc_mutex'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:456: error: 'struct usb_serial' has no member named 'disconnected'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:459: error: 'struct usb_serial' has no member named 'disc_mutex'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: In function 'cp210x_get_termios':
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:535: error: implicit declaration of function 'tty_encode_baud_rate'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: At top level:
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:702: warning: 'struct ktermios' declared inside parameter list
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:703: error: conflicting types for 'cp210x_change_speed'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:45: error: previous declaration of 'cp210x_change_speed' was here
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: In function 'cp210x_change_speed':
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:706: error: 'struct termios' has no member named 'c_ospeed'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:720: error: dereferencing pointer to incomplete type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: At top level:
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:729: warning: 'struct ktermios' declared inside parameter list
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:730: error: conflicting types for 'cp210x_set_termios'
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:47: error: previous declaration of 'cp210x_set_termios' was here
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: In function 'cp210x_set_termios':
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:741: error: dereferencing pointer to incomplete type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:743: warning: passing argument 3 of 'cp210x_change_speed' from incompatible pointer type
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c: In function '__check_debug':
/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.c:1019: warning: return from incompatible pointer type
make-3.79.1-p7[2]: *** [/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source/cp210x.o] Error 1
make-3.79.1-p7[1]: *** [_module_/users/phunchik/Desktop/Linux_3.x.x_VCP_Driver_Source] Error 2
make-3.79.1-p7[1]: Leaving directory `/usr/src/kernels/2.6.18-194.8.1.el5-x86_64'
make-3.79.1-p7: *** [all] Error 2 **
如果有人可以帮我修复此错误或建议更新内核的方法
,那就太好了答案 0 :(得分:0)
您的驱动程序似乎需要Linux_3.x.x
作为目录名称的建议。
有关信息,Linux 3.x.x
等效至Linux 2.6.40+
。所以你至少 22个版本。
要升级内核,只需使用您的分发升级系统(apt-get
,aptitude
,yum
,...)。
您也可以手动构建新内核,但要困难得多。
答案 1 :(得分:0)
我认为你刚刚下载了错误的驱动程序。 2.6内核的一个在这里:
http://www.silabs.com/Support%20Documents/Software/Linux_2.6.x_VCP_Driver_Source.zip
HTH