![使用新的 USB 串行驱动程序编译自定义内核时出错](https://linux22.com/image/59480/%E4%BD%BF%E7%94%A8%E6%96%B0%E7%9A%84%20USB%20%E4%B8%B2%E8%A1%8C%E9%A9%B1%E5%8A%A8%E7%A8%8B%E5%BA%8F%E7%BC%96%E8%AF%91%E8%87%AA%E5%AE%9A%E4%B9%89%E5%86%85%E6%A0%B8%E6%97%B6%E5%87%BA%E9%94%99.png)
我尝试为我的内核 3.13.0-40-generic 编译驱动程序。我也尝试用这个驱动程序编译自定义内核,但都失败了。
驱动程序的名称是 vizzini for Linux 2.6.18-3.4.x。我已经从那里下载了这里。
错误是:
/home/usuario/Descargas/xr21v141x-lnx2.6.18-to-3.4-pak/vizzini.c:137:26: error: ‘usb_serial_probe’ undeclared here (not in a function)
.probe = usb_serial_probe,
^
/home/usuario/Descargas/xr21v141x-lnx2.6.18-to-3.4-pak/vizzini.c: In function ‘vizzini_set_termios’:
/home/usuario/Descargas/xr21v141x-lnx2.6.18-to-3.4-pak/vizzini.c:419:29: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
cflag = tty->termios->c_cflag;
^
In file included from include/linux/printk.h:236:0,
from include/linux/kernel.h:13,
from /home/usuario/Descargas/xr21v141x-lnx2.6.18-to-3.4-pak/vizzini.c:42:
/home/usuario/Descargas/xr21v141x-lnx2.6.18-to-3.4-pak/vizzini.c: In function ‘vizzini_out_callback’:
/home/usuario/Descargas/xr21v141x-lnx2.6.18-to-3.4-pak/vizzini.c:804:72: error: ‘struct usb_serial_port’ has no member named ‘number’
if (debug) dev_dbg(&port->dev, "%s - port %d\n", __func__, port->number);
^
我检查了该功能是静态的并在 usb-serial.c 中声明在第 697 行。
有谁能够帮助我?
感谢致敬!。
答案1
我使用的是 <3.4 内核的驱动程序,而我有 3.13。我已经下载了新的驱动程序。我看到“3.1.3”...