Skip to content

可能需要适配新的内核 #4

Description

@blackt3a

xxxx@xxxx-virtual-machine:/Downloads/CH341SER_LINUX/driver$ make
make -C /lib/modules/6.5.0-35-generic/build M=/home/xxxx/Downloads/CH341SER_LINUX/driver
make[1]: Entering directory '/usr/src/linux-headers-6.5.0-35-generic'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: x86_64-linux-gnu-gcc-12 (Ubuntu 12.3.0-1ubuntu1
22.04) 12.3.0
You are using: gcc-12 (Ubuntu 12.3.0-1ubuntu1~22.04) 12.3.0
CC [M] /home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.o
/home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.c:1095:20: error: initialization of ‘void (*)(struct tty_port , bool)’ {aka ‘void ()(struct tty_port , _Bool)’} from incompatible pointer type ‘void ()(struct tty_port *, int)’ [-Werror=incompatible-pointer-types]
1095 | .dtr_rts = ch341_port_dtr_rts,
| ^~~~~~~~~~~~~~~~~~
/home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.c:1095:20: note: (near initialization for ‘ch341_port_ops.dtr_rts’)
cc1: some warnings being treated as errors
make[3]: *** [scripts/Makefile.build:251: /home/xxxx/Downloads/CH341SER_LINUX/driver/ch341.o] Error 1
make[2]: *** [/usr/src/linux-headers-6.5.0-35-generic/Makefile:2039: /home/xxxx/Downloads/CH341SER_LINUX/driver] Error 2
make[1]: *** [Makefile:234: __sub-make] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-6.5.0-35-generic'
make: *** [Makefile:5: default] Error 2

我是在ubuntu22上编译的有如上报错,查资料说是新内核的指针类型不匹配,需要修改源码,在我写的时候还没解决。

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions