[Kernel/Drive] 系统无法编译和安装开源驱动
Product Feedback 204 views · 8 replies
Tofloor
poster avatar
150******05
deepin
2022-01-13 12:19
Author

deepin系统无法编译和安装开源驱动CH341SER_LINUX.ZIP

这是prusa i3 3D打印机驱动

ReplyFavoriteView the author
All Replies
msan
Moderator
2022-01-13 15:21
#1
ReplyView the author
deepinuser17
deepin
2022-01-13 16:44
#2

发一下出错信息

ReplyView the author
150******05
deepin
2022-01-14 03:54
#3
deepinuser17

发一下出错信息

There was an error creating the child process for this terminal.
Failed to execute child process "/data/home/iii/CH341SER_LINUX/CH341SER_LINUX/Makefile"(可执行文件格式错误)!

编译报错是是缺少一堆系统调用文件像init.h等

ReplyView the author
deepinuser17
deepin
2022-01-14 17:21
#4

CH341SER_LINUX.ZIP里的源代码太老了,不支持内核5.x。

最新版的支持内核5.14. 试了一下,该本在内核5.15下,可以顺利编译。

$ make
make -C /lib/modules/5.15.1-amd64-desktop/build  M=/tmp/src/CH34x-Driver-Linux  
make[1]: Entering directory '/usr/src/linux-headers-5.15.1-amd64-desktop'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Uos 8.3.0.6-1+dde) 8.3.0
  You are using:           gcc (Uos 8.3.0.3-3+rebuild) 8.3.0
  CC [M]  /tmp/src/CH34x-Driver-Linux/ch34x.o
  MODPOST /tmp/src/CH34x-Driver-Linux/Module.symvers
  CC [M]  /tmp/src/CH34x-Driver-Linux/ch34x.mod.o
  LD [M]  /tmp/src/CH34x-Driver-Linux/ch34x.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.15.1-amd64-desktop'

从这个链接下载最新版本: https://github.com/gorgiaxx/CH34x-Driver-Linux

对内核5.x的支持是一个月之前才加上的。

下载命令:


git clone https://github.com/gorgiaxx/CH34x-Driver-Linux

cd CH34x-Driver-Linux
make
ReplyView the author
150******05
deepin
2022-01-16 08:25
#5
deepinuser17

CH341SER_LINUX.ZIP里的源代码太老了,不支持内核5.x。

最新版的支持内核5.14. 试了一下,该本在内核5.15下,可以顺利编译。

$ make
make -C /lib/modules/5.15.1-amd64-desktop/build  M=/tmp/src/CH34x-Driver-Linux  
make[1]: Entering directory '/usr/src/linux-headers-5.15.1-amd64-desktop'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: gcc (Uos 8.3.0.6-1+dde) 8.3.0
  You are using:           gcc (Uos 8.3.0.3-3+rebuild) 8.3.0
  CC [M]  /tmp/src/CH34x-Driver-Linux/ch34x.o
  MODPOST /tmp/src/CH34x-Driver-Linux/Module.symvers
  CC [M]  /tmp/src/CH34x-Driver-Linux/ch34x.mod.o
  LD [M]  /tmp/src/CH34x-Driver-Linux/ch34x.ko
make[1]: Leaving directory '/usr/src/linux-headers-5.15.1-amd64-desktop'

从这个链接下载最新版本: https://github.com/gorgiaxx/CH34x-Driver-Linux

对内核5.x的支持是一个月之前才加上的。

下载命令:


git clone https://github.com/gorgiaxx/CH34x-Driver-Linux

cd CH34x-Driver-Linux
make

你给的命令全都报错,我估计是系统出了问题,我执完班后把系统重装一遍

再试试

ReplyView the author
deepinuser17
deepin
2022-01-17 22:10
#6
150******05

你给的命令全都报错,我估计是系统出了问题,我执完班后把系统重装一遍

再试试

报错信息发上来看看

ReplyView the author
150******05
deepin
2022-01-19 04:05
#7
deepinuser17

报错信息发上来看看

谢谢,跟新了系统后,代码可以编译了,驱动也可以打上了,虽然切片软件和硬件还是不能建立联系

ReplyView the author
deepinuser17
deepin
2022-01-19 06:34
#8

分别重启打印机,机器看看。 可以用命令dmesg查看。

ReplyView the author
Use Markdown Editor
Loading