I have install the drive in ubuntu16.04 with USB2SER_Driver_Linux, but failed. Pls help .
the Log:
root@neusoft:/home/fuyongjie/Desktop/USB2SER# ./Install.sh ubuntu
Installing Freescale CDC driver on Ubuntu
Reading package lists... Done
Building dependency tree
Reading state information... Done
linux-headers-4.4.0-43-generic is already the newest version (4.4.0-43.63).
The following packages were automatically installed and are no longer required:
libstdc++-4.8-dev wx-common
Use 'apt autoremove' to remove them.
0 upgraded, 0 newly installed, 0 to remove and 10 not upgraded.
fixing code con old kernel versions
make -C /lib/modules/4.4.0-43-generic/build M=/home/fuyongjie/Desktop/USB2SER modules
make[1]: Entering directory '/usr/src/linux-headers-4.4.0-43-generic'
CC [M] /home/fuyongjie/Desktop/USB2SER/cdc-freescale.o
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_ctrl_msg’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:140:2: error: implicit declaration of function ‘dbg’ [-Werror=implicit-function-declaration]
dbg("acm_control_msg: rq: 0x%02x val: %#x len: %#x result: %d",
^
In file included from include/linux/mmdebug.h:4:0,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:60:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: At top level:
include/linux/bug.h:33:45: error: negative width in bit-field ‘<anonymous>’
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:831:3: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:102:12: note: in expansion of macro ‘VERIFY_OCTAL_PERMISSIONS’
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:47: note: in expansion of macro ‘__ATTR’
static struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,stor
^
In file included from include/linux/kobject.h:21:0,
from include/linux/cdev.h:4,
from include/linux/tty_driver.h:244,
from include/linux/tty.h:8,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:61:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:67: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
static struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:67: note: (near initialization for ‘pid_attribute.show’)
static struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:76: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,store_pid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:329:76: note: (near initialization for ‘pid_attribute.store’)
struct kobj_attribute pid_attribute = __ATTR(val_pid,0666,show_pid,store_pid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
In file included from include/linux/mmdebug.h:4:0,
from include/linux/gfp.h:4,
from include/linux/slab.h:14,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:60:
include/linux/bug.h:33:45: error: negative width in bit-field ‘<anonymous>’
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
^
include/linux/kernel.h:831:3: note: in expansion of macro ‘BUILD_BUG_ON_ZERO’
BUILD_BUG_ON_ZERO((perms) & 2) + \
^
include/linux/sysfs.h:102:12: note: in expansion of macro ‘VERIFY_OCTAL_PERMISSIONS’
.mode = VERIFY_OCTAL_PERMISSIONS(_mode) }, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:47: note: in expansion of macro ‘__ATTR’
static struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,stor
^
In file included from include/linux/kobject.h:21:0,
from include/linux/cdev.h:4,
from include/linux/tty_driver.h:244,
from include/linux/tty.h:8,
from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:61:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:67: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
static struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:67: note: (near initialization for ‘vid_attribute.show’)
static struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,stor
^
include/linux/sysfs.h:103:10: note: in definition of macro ‘__ATTR’
.show = _show, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:76: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,store_vid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:386:76: note: (near initialization for ‘vid_attribute.store’)
struct kobj_attribute vid_attribute = __ATTR(val_vid,0666,show_vid,store_vid);
^
include/linux/sysfs.h:104:11: note: in definition of macro ‘__ATTR’
.store = _store, \
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_rx_tasklet’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:588:27: warning: passing argument 1 of ‘tty_insert_flip_string’ from incompatible pointer type [-Wincompatible-pointer-types]
tty_insert_flip_string(tty, buf->base, buf->size);
^
In file included from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:64:0:
include/linux/tty_flip.h:32:19: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
static inline int tty_insert_flip_string(struct tty_port *port,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:589:25: warning: passing argument 1 of ‘tty_flip_buffer_push’ from incompatible pointer type [-Wincompatible-pointer-types]
tty_flip_buffer_push(tty);
^
In file included from /home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:64:0:
include/linux/tty_flip.h:13:13: note: expected ‘struct tty_port *’ but argument is of type ‘struct tty_struct *’
extern void tty_flip_buffer_push(struct tty_port *port);
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_tty_set_termios’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1013:29: error: incompatible types when initializing type ‘struct ktermios *’ using type ‘struct ktermios’
struct ktermios *termios = tty->termios;
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_write_buffers_free’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1115:3: error: implicit declaration of function ‘usb_buffer_free’ [-Werror=implicit-function-declaration]
usb_buffer_free(usb_dev, acm->writesize, wb->buf, wb->dmah);
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_write_buffers_alloc’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1135:13: error: implicit declaration of function ‘usb_buffer_alloc’ [-Werror=implicit-function-declaration]
wb->buf = usb_buffer_alloc(acm->dev, acm->writesize, GFP_KERNEL,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1135:11: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
wb->buf = usb_buffer_alloc(acm->dev, acm->writesize, GFP_KERNEL,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: In function ‘acm_probe’:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1401:6: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
buf = usb_buffer_alloc(usb_dev, ctrlsize, GFP_KERNEL, &acm->ctrl_dma);
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1434:12: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
rb->base = usb_buffer_alloc(acm->dev, readsize,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c: At top level:
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1895:12: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.ioctl = acm_tty_ioctl,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1895:12: note: (near initialization for ‘acm_ops.ioctl’)
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1901:15: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.tiocmget = acm_tty_tiocmget,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1901:15: note: (near initialization for ‘acm_ops.tiocmget’)
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1902:15: warning: initialization from incompatible pointer type [-Wincompatible-pointer-types]
.tiocmset = acm_tty_tiocmset,
^
/home/fuyongjie/Desktop/USB2SER/cdc-freescale.c:1902:15: note: (near initialization for ‘acm_ops.tiocmset’)
cc1: some warnings being treated as errors
scripts/Makefile.build:264: recipe for target '/home/fuyongjie/Desktop/USB2SER/cdc-freescale.o' failed
make[2]: *** [/home/fuyongjie/Desktop/USB2SER/cdc-freescale.o] Error 1
Makefile:1403: recipe for target '_module_/home/fuyongjie/Desktop/USB2SER' failed
make[1]: *** [_module_/home/fuyongjie/Desktop/USB2SER] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.0-43-generic'
Makefile:4: recipe for target 'all' failed
make: *** [all] Error 2
ERROR: compiling Freescale CDC module