usb转4串口芯片 linux驱动,【官方发布】CH9344 USB转四串口芯片Linux驱动

如果修改makefile

把KERNELDIR := /lib/modules/$(shell uname -r)/build

改成:KERNELDIR ?=$(KERNEL_DIR)

则编译报错:

build driver module: ch9344

rm -rf *.mk .tmp_versions Module.symvers *.mod.c *.o *.ko .*.cmd Module.markers modules.order

make -C /home/vm/rk/project/firefly-sdk/rk3328_drv/../kernel  M=/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344

make[1]: Entering directory '/home/vm/rk/project/firefly-sdk/kernel'

LD      /home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/built-in.o

CC [M]  /home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.o

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c: In function 'ch934x_tty_ioctl':

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:1395:16: warning: unused variable 'flags' [-Wunused-variable]

error, forbidden warning:ch934x.c:1395

unsigned long flags;

^~~~~

At top level:

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:2202:12: warning: 'ch934x_reset_resume' defined but not used [-Wunused-function]

error, forbidden warning:ch934x.c:2202

static int ch934x_reset_resume(struct usb_interface *intf)

^~~~~~~~~~~~~~~~~~~

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:2142:12: warning: 'ch934x_suspend' defined but not used [-Wunused-function]

error, forbidden warning:ch934x.c:2142

static int ch934x_suspend(struct usb_interface *intf, pm_message_t message)

^~~~~~~~~~~~~~

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:1158:13: warning: 'ch934x_tty_unthrottle' defined but not used [-Wunused-function]

error, forbidden warning:ch934x.c:1158

static void ch934x_tty_unthrottle(struct tty_struct *tty)

^~~~~~~~~~~~~~~~~~~~~

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:1148:13: warning: 'ch934x_tty_throttle' defined but not used [-Wunused-function]

error, forbidden warning:ch934x.c:1148

static void ch934x_tty_throttle(struct tty_struct *tty)

^~~~~~~~~~~~~~~~~~~

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:219:12: warning: 'ch934x_cmd_in' defined but not used [-Wunused-function]

error, forbidden warning:ch934x.c:219

static int ch934x_cmd_in(struct ch934x *ch934x,

^~~~~~~~~~~~~

/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.c:154:12: warning: 'ch934x_control_out' defined but not used [-Wunused-function]

error, forbidden warning:ch934x.c:154

static int ch934x_control_out(struct ch934x *ch934x, u8 request,

^~~~~~~~~~~~~~~~~~

scripts/Makefile.build:283: recipe for target '/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.o' failed

make[2]: *** [/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344/ch934x.o] Error 1

Makefile:1479: recipe for target '_module_/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344' failed

make[1]: *** [_module_/home/vm/rk/project/firefly-sdk/rk3328_drv/ch9344] Error 2

make[1]: Leaving directory '/home/vm/rk/project/firefly-sdk/kernel'

Makefile:5: recipe for target 'default' failed

make: *** [default] Error 2

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值