![]() |
|
Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: ROCKPRO64 (https://forum.pine64.org/forumdisplay.php?fid=98) +--- Forum: Linux on RockPro64 (https://forum.pine64.org/forumdisplay.php?fid=101) +--- Thread: Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 (/showthread.php?tid=18478) |
Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 - Thisone - 07-11-2023 Hello when I try to install the Driver CH341SER from CH341SER_LINUX.ZIP - 南京沁恒微电子股份有限公司 (wch.cn) for the Ayufan linux build. I get this error Message during the compilation: Code: rock64@rockpro64:~/CH341SER_LINUX/driver$ make
make -C /lib/modules/4.4.190-1233-rockchip-ayufan-gd3f1be0ed310/build M=/home/rock64/CH341SER_LINUX/driver
make[1]: Entering directory '/usr/src/linux-headers-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310'
CC [M] /home/rock64/CH341SER_LINUX/driver/ch341.o
gcc: error: unrecognized command line option '-mgeneral-regs-only'
gcc: error: unrecognized command line option '-mcmodel=large'
scripts/Makefile.build:283: recipe for target '/home/rock64/CH341SER_LINUX/driver/ch341.o' failed
make[2]: *** [/home/rock64/CH341SER_LINUX/driver/ch341.o] Error 1
Makefile:1479: recipe for target '_module_/home/rock64/CH341SER_LINUX/driver' failed
make[1]: *** [_module_/home/rock64/CH341SER_LINUX/driver] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.4.190-1233-rockchip-ayufan-gd3f1be0ed310'
Makefile:5: recipe for target 'default' failed
make: *** [default] Error 2I want to use the PineDisplay as Display on Linux and since Ayufan has a Documentation how to use it on his Linux Build, i use it. But i need to install the Driver to use a CH340c RS485 to USB converter. Any help is greatly appreciated. RE: Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 - hunderteins - 07-11-2023 (07-11-2023, 01:12 AM)Thisone Wrote: What version of gcc you are using? Your gcc doesn't understand the two commandline options '-mgeneral-regs-only' and '-mcmodel=large' I'm on 6.0.0-1164-ayufan and compiling with gcc 13.1.1 that driver works like a charm: Code: $ make
make -C /lib/modules/6.0.0-1164-ayufan-ga2fd0c498/build M=/tmp/CH341SER_LINUX/driver
make[1]: Entering directory '/usr/src/linux-headers-6.0.0-1164-ayufan-ga2fd0c498'
warning: the compiler differs from the one used to build the kernel
The kernel was built by: aarch64-linux-gnu-gcc (Ubuntu 9.3.0-17ubuntu1~20.04) 9.3.0
You are using: aarch64-alt-linux-gcc (GCC) 13.1.1 20230613 (ALT Sisyphus 13.1.1-alt1)
CC [M] /tmp/CH341SER_LINUX/driver/ch341.o
MODPOST /tmp/CH341SER_LINUX/driver/Module.symvers
CC [M] /tmp/CH341SER_LINUX/driver/ch341.mod.o
LD [M] /tmp/CH341SER_LINUX/driver/ch341.ko
make[1]: Leaving directory '/usr/src/linux-headers-6.0.0-1164-ayufan-ga2fd0c498'That driver loads into that kernel without complaint: [ 152.041600] ch341: loading out-of-tree module taints kernel. [ 152.042335] usbcore: registered new interface driver usb_ch341 [ 152.042341] ch341: USB serial driver for ch340, ch341, etc. [ 152.042344] ch341: V1.6 On 2022.08 May be is is incompatible with the legacy kernel? RE: Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 - Thisone - 07-11-2023 I choose the Version, because it is marked as the latest stable build, but I'll try updating the Compiler if you think that would solve the Problem. RE: Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 - Thisone - 07-12-2023 (07-11-2023, 12:06 PM)hunderteins Wrote:(07-11-2023, 01:12 AM)Thisone Wrote: I still get the same error after updating gcc to gcc-9 following this tutorial: How to Install GCC Compiler on Ubuntu 18.04 | Linuxize RE: Installing CH431SER on Ayufan 0.9.14: gitlab-ci-linux-build-159 - hunderteins - 07-14-2023 (07-12-2023, 01:14 AM)Thisone Wrote: I still get the same error after updating gcc to gcc-9 following this tutorial: How to Install GCC Compiler on Ubuntu 18.04 | Linuxize I don't know about "latest stable build." You are just using a lot of legacy software. Kernel 4.4 is legacy, gcc-9 is legacy. Try to use an older version of your driver that fits into that environment. For example https://github.com/juliagoda/CH341SER/tree/ubuntu There is also a CH341-driver allready included into 4.4. The README.md of the vendor-driver states, that this driver is too old. I think the vendor has adapted the driver to modern gcc/kernel versions, because x86_64 is not holding back at 4.4. That often breaks compatibility to older versions. |