Failed to compile Linux_2.6.x_VCP_Driver_Source in Ubuntu
-
I read the description of the environment it was modified CP210x driver for the 2.6.38 kernel (Ubuntu 11.04).However, I am now running Ubuntu 16.04, 4.13.0-35-generic.
See the error messages below. Is this driver still needed to program/use M5Stack. If yes, has anyone succeeded compiling it?make[1]: Entering directory '/usr/src/linux-headers-4.13.0-35-generic'
CC [M] /home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.o
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:165:12: error: ‘usb_serial_probe’ undeclared here (not in a function)
.probe = usb_serial_probe,
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:166:16: error: ‘usb_serial_disconnect’ undeclared here (not in a function)
.disconnect = usb_serial_disconnect,
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:181:13: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.ioctl = cp210x_ioctl,
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:181:13: note: (near initialization for ‘cp210x_device.ioctl’)
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:184:16: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.tiocmget = cp210x_tiocmget,
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:184:16: note: (near initialization for ‘cp210x_device.tiocmget’)
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:185:15: error: initialization from incompatible pointer type [-Werror=incompatible-pointer-types]
.tiocmset = cp210x_tiocmset,
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:185:15: note: (near initialization for ‘cp210x_device.tiocmset’)
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_get_config’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:321:3: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
dbg("%s - Unable to send config request, "
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_open’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:426:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_cleanup’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:459:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_close’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:472:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_get_termios’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:597:17: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
&tty->termios->c_cflag, &baud);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_get_termios_port’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:619:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_set_termios’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:752:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:757:14: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
tty->termios->c_cflag &= ~CMSPAR;
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:758:22: error: invalid type argument of ‘->’ (have ‘struct ktermios’)
cflag = tty->termios->c_cflag;
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_tiocmset_port’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:887:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_tiocmget’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:926:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_break_ctl’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:948:36: error: ‘struct usb_serial_port’ has no member named ‘number’
dbg("%s - port %d", func, port->number);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘cp210x_init’:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:1013:11: error: implicit declaration of function ‘usb_serial_register’ [-Werror=implicit-function-declaration]
retval = usb_serial_register(&cp210x_device);
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:1020:3: error: implicit declaration of function ‘usb_serial_deregister’ [-Werror=implicit-function-declaration]
usb_serial_deregister(&cp210x_device);
^
In file included from ./include/linux/module.h:18:0,
from /home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:21:
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c: In function ‘__check_debug’:
./include/linux/moduleparam.h:346:67: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
static inline type __always_unused *_check##name(void) { return(p); }
^
./include/linux/moduleparam.h:398:35: note: in expansion of macro ‘__param_check’
#define param_check_bool(name, p) _param_check(name, p, bool)
^
./include/linux/moduleparam.h:148:2: note: in expansion of macro ‘param_check_bool’
param_check##type(name, &(value));
^
./include/linux/moduleparam.h:128:2: note: in expansion of macro ‘module_param_named’
module_param_named(name, name, type, perm)
^
/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.c:1043:1: note: in expansion of macro ‘module_param’
module_param(debug, bool, S_IRUGO | S_IWUSR);
^
cc1: some warnings being treated as errors
scripts/Makefile.build:315: recipe for target '/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.o' failed
make[2]: *** [/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source/cp210x.o] Error 1
Makefile:1550: recipe for target 'module/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source' failed
make[1]: *** [module/home/esp32/Downloads/Linux_2.6.x_VCP_Driver_Source] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.13.0-35-generic'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2