raspberrypi-ch340-driver icon indicating copy to clipboard operation
raspberrypi-ch340-driver copied to clipboard

insmod: ERROR: could not insert module ch34x.ko: Invalid module format

Open satech-domo opened this issue 8 years ago • 21 comments

Raspberry pi3 with NOOBS Debian installed 2016 oct 19 did a reboot, show "ch341 4932 0 at lsmod, show "ch341.ko" at ls /lib/modules/$(uname -r)/kernel/drivers/usb/serial nothing at sudo depmod -a

previously installed libusb-1.0.0-dev, mochad-0.1.15, usbutils but got at command $ Isusb bash: Isusb: command not found

Salutations

here the terminal output for ch34x

_> pi@raspberrypi:~ $ sudo insmod ch34x.ko

insmod: ERROR: could not insert module ch34x.ko: Invalid module format pi@raspberrypi:~ $ lsmod Module Size Used by bnep 10340 2 hci_uart 17943 1 btbcm 5929 1 hci_uart bluetooth 326105 22 bnep,btbcm,hci_uart brcmfmac 186339 0 brcmutil 5661 1 brcmfmac joydev 9024 0 evdev 11396 6 sg 18319 0 cfg80211 427855 1 brcmfmac snd_bcm2835 20447 1 rfkill 16037 4 cfg80211,bluetooth snd_pcm 75762 1 snd_bcm2835 snd_timer 19288 1 snd_pcm snd 51908 5 snd_bcm2835,snd_timer,snd_pcm spi_bcm2835 6678 0 bcm2835_gpiomem 3040 0 i2c_bcm2708 4834 0 bcm2835_wdt 3225 0 ch341 4932 0 usbserial 22115 1 ch341 w1_gpio 3657 0 wire 25219 1 w1_gpio cn 4374 1 wire uio_pdrv_genirq 3164 0 uio 8000 1 uio_pdrv_genirq i2c_dev 5859 0 fuse 83653 3 ipv6 347466 52 pi@raspberrypi:~ $ ls /lib/modules/$(uname -r)/kernel/drivers/usb/serial aircable.ko io_edgeport.ko mos7720.ko sierra.ko ark3116.ko io_ti.ko mos7840.ko spcp8x5.ko belkin_sa.ko ipaq.ko navman.ko ssu100.ko ch341.ko ipw.ko omninet.ko symbolserial.k_

_

satech-domo avatar Oct 22 '16 03:10 satech-domo

same problem here

giova-fr avatar Dec 29 '16 16:12 giova-fr

same problem raspberry pi 3

t2ac32 avatar Jan 27 '17 06:01 t2ac32

Same error on my Raspberry Pi 2 with Raspbian Jessie.

jdieg0 avatar Feb 10 '17 17:02 jdieg0

Unfortunately, same here. RPI3

marcosavini avatar Apr 08 '17 18:04 marcosavini

same here raspberry 2 jessie

peterchylewski avatar Jul 01 '17 02:07 peterchylewski

For recent kernel, you need to compile from source this specifically fixed driver: https://github.com/skyrocknroll/CH341SER_LINUX. First, update to the last kernel and prepare the env. Then, download, make and insert this CH341SER. It worked well on my RPi3, thanks to @aperepel and @skyrocknroll great works.

a1rb4Ck avatar Jul 31 '17 18:07 a1rb4Ck

  1. download pi@raspberrypi:~ $ wget https://github.com/aperepel/raspberrypi-ch340-driver/releases/download/4.4.11-v7/ch34x.ko

  2. check pi@raspberrypi:~ $ lsmod Module Size Used by bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 70

  3. go towards pi@raspberrypi:~ $ cd /lib/modules/$(uname -r)/kernel/drivers/usb/serial

  4. Install first pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod usbserial.ko

  5. Check once again pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod Module Size Used by usbserial 29943 0 <===== Need be installed FIRST bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 68

  6. NOW, install ch341.ko pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod ch341.ko

  7. Voilá !!! pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod Module Size Used by ch341 6086 0 <==== Must be here first usbserial 29943 1 ch341 <==== Can you see me now ? bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 68

Greetings Alexandre Toledo [email protected]

AlexandreToledo avatar Sep 04 '17 03:09 AlexandreToledo

And everytime you need, you will have to recharge them, like that:

pi@raspberrypi:~ $ cd /lib/modules/$(uname -r)/kernel/drivers/usb/serial pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod usbserial.ko pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod ch341.ko pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod

AlexandreToledo avatar Sep 04 '17 04:09 AlexandreToledo

First of all thank you very much for this manual how to get it running. I´ve done it step by step and the last lsmod shows me that everything should be fine. The problem is, that the Arduino IDE (2.1.0.5) doesnt show me a serial port. I have connected an Arduino Uno with CH34x to my Rasp3B. The weird thing: only one time it was working, but I tried different times after that and it never showed a serial port again. I also checked with lsmod before every time, but shows the two lines correctly. So do you have any suggestion or is there maybe a common mistake i made? Thanks in advance! screenshot

mschlen avatar Nov 07 '17 17:11 mschlen

How do you get it to show up in lsusb? it is showing up now under usbserial.

rodydavis avatar Dec 07 '17 02:12 rodydavis

Sry, didn't get you point. I am not an english native speaker. Think I mentioned the way I tried to get it running. See my comments to the picture.

mschlen avatar Dec 07 '17 03:12 mschlen

Unfortunately I am on a headless raspberry pi lite “Sketch”. I decided to plug in the UNO I have and it’s recgonized no problem

rodydavis avatar Dec 07 '17 03:12 rodydavis

I have compiled the driver for the latest rpi kernel version. wget https://dl.dropboxusercontent.com/s/nkglyp57i2vl7ao/ch34x.ko sudo insmod ch34x.ko

valerierx avatar May 31 '18 15:05 valerierx

Thanks a lot, man! 

Enviado do Yahoo Mail no Android

Em Qui, 31 31e mai 31e 2018 às 12:57, KorraCatBerlin
escreveu:
I have compiled the driver for the latest rpi kernel version. wget https://dl.dropboxusercontent.com/s/nkglyp57i2vl7ao/ch34x.ko sudo insmod ch34x.ko

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AlexandreToledo avatar Jun 03 '18 01:06 AlexandreToledo

1. download
   pi@raspberrypi:~ $ wget https://github.com/aperepel/raspberrypi-ch340-driver/releases/download/4.4.11-v7/ch34x.ko

2. check
   pi@raspberrypi:~ $ lsmod
   Module                  Size  Used by
   bnep                   12051  2
   hci_uart               20020  1
   btbcm                   7916  1 hci_uart
   bluetooth             365511  22 hci_uart,bnep,btbcm
   brcmfmac              222874  0
   brcmutil                9092  1 brcmfmac
   cfg80211              543027  1 brcmfmac
   rfkill                 20851  4 bluetooth,cfg80211
   snd_bcm2835            24427  1
   snd_pcm                98501  1 snd_bcm2835
   snd_timer              23968  1 snd_pcm
   snd                    70032  5 snd_timer,snd_bcm2835,snd_pcm
   bcm2835_gpiomem         3940  0
   evdev                  12423  6
   joydev                  9988  0
   uio_pdrv_genirq         3923  0
   uio                    10204  1 uio_pdrv_genirq
   fixed                   3285  0
   i2c_dev                 6913  0
   fuse                   99603  3
   ipv6                  408971  70

3. go towards
   pi@raspberrypi:~ $ cd /lib/modules/$(uname -r)/kernel/drivers/usb/serial

4. Install first
   pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $  sudo insmod usbserial.ko

5. Check once again
   pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod
   Module                  Size  Used by
   usbserial              29943  0                             <===== Need be installed FIRST
   bnep                   12051  2
   hci_uart               20020  1
   btbcm                   7916  1 hci_uart
   bluetooth             365511  22 hci_uart,bnep,btbcm
   brcmfmac              222874  0
   brcmutil                9092  1 brcmfmac
   cfg80211              543027  1 brcmfmac
   rfkill                 20851  4 bluetooth,cfg80211
   snd_bcm2835            24427  1
   snd_pcm                98501  1 snd_bcm2835
   snd_timer              23968  1 snd_pcm
   snd                    70032  5 snd_timer,snd_bcm2835,snd_pcm
   bcm2835_gpiomem         3940  0
   evdev                  12423  6
   joydev                  9988  0
   uio_pdrv_genirq         3923  0
   uio                    10204  1 uio_pdrv_genirq
   fixed                   3285  0
   i2c_dev                 6913  0
   fuse                   99603  3
   ipv6                  408971  68

6. NOW, install ch341.ko
   pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod ch341.ko

7. Voilá !!!
   pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod
   Module                  Size  Used by
   ch341                   6086  0                          <==== Must be here first
   usbserial              29943  1 ch341            <==== Can you see me now ?
   bnep                   12051  2
   hci_uart               20020  1
   btbcm                   7916  1 hci_uart
   bluetooth             365511  22 hci_uart,bnep,btbcm
   brcmfmac              222874  0
   brcmutil                9092  1 brcmfmac
   cfg80211              543027  1 brcmfmac
   rfkill                 20851  4 bluetooth,cfg80211
   snd_bcm2835            24427  1
   snd_pcm                98501  1 snd_bcm2835
   snd_timer              23968  1 snd_pcm
   snd                    70032  5 snd_timer,snd_bcm2835,snd_pcm
   bcm2835_gpiomem         3940  0
   evdev                  12423  6
   joydev                  9988  0
   uio_pdrv_genirq         3923  0
   uio                    10204  1 uio_pdrv_genirq
   fixed                   3285  0
   i2c_dev                 6913  0
   fuse                   99603  3
   ipv6                  408971  68

Greetings Alexandre Toledo [email protected]

full of thanks sir,,, step by step as u describe was really help me... i just followed exactly as it is, now i could say "viola" also,,, thanks again,,,

image

kadon70 avatar Mar 03 '19 16:03 kadon70

Or use the mainline driver

valerierx avatar Mar 03 '19 17:03 valerierx

Thanks so much, this thread got me sorted connecting my nodeMCU board to Rasberry pi, never been so happy to see a simple LED flashing

BillerB avatar Nov 20 '19 21:11 BillerB

That's nice, friend!  The intention was help with a quite approach, ease and objective.  CheersAlex

Enviado do Yahoo Mail no Android

Em dom, 3 3e mar 3e 2019 às 13:56, kadon70
escreveu:
1. download pi@raspberrypi:~ $ wget https://github.com/aperepel/raspberrypi-ch340-driver/releases/download/4.4.11-v7/ch34x.ko
  1. check pi@raspberrypi:~ $ lsmod Module Size Used by bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 70

  2. go towards pi@raspberrypi:~ $ cd /lib/modules/$(uname -r)/kernel/drivers/usb/serial

  3. Install first pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod usbserial.ko

  4. Check once again pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod Module Size Used by usbserial 29943 0 <===== Need be installed FIRST bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 68

  5. NOW, install ch341.ko pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod ch341.ko

  6. Voilá !!! pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod Module Size Used by ch341 6086 0 <==== Must be here first usbserial 29943 1 ch341 <==== Can you see me now ? bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 68

Greetings Alexandre Toledo [email protected]

full of thanks sir,,, step by step as u describe was really help me... i just followed exactly as it is, now i could say "viola" also,,, thanks again,,,

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AlexandreToledo avatar Nov 21 '19 03:11 AlexandreToledo

That's nice, friend!  The intention was help with a quite approach, ease and objective.  CheersAlex Enviado do Yahoo Mail no Android

Em dom, 3 3e mar 3e 2019 às 13:56, kadon70
escreveu:
1. download pi@raspberrypi:~ $ wget https://github.com/aperepel/raspberrypi-ch340-driver/releases/download/4.4.11-v7/ch34x.ko
  1. check pi@raspberrypi:~ $ lsmod Module Size Used by bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 70

  2. go towards pi@raspberrypi:~ $ cd /lib/modules/$(uname -r)/kernel/drivers/usb/serial

  3. Install first pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod usbserial.ko

  4. Check once again pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod Module Size Used by usbserial 29943 0 <===== Need be installed FIRST bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 68

  5. NOW, install ch341.ko pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ sudo insmod ch341.ko

  6. Voilá !!! pi@raspberrypi:/lib/modules/4.9.35-v7+/kernel/drivers/usb/serial $ lsmod Module Size Used by ch341 6086 0 <==== Must be here first usbserial 29943 1 ch341 <==== Can you see me now ? bnep 12051 2 hci_uart 20020 1 btbcm 7916 1 hci_uart bluetooth 365511 22 hci_uart,bnep,btbcm brcmfmac 222874 0 brcmutil 9092 1 brcmfmac cfg80211 543027 1 brcmfmac rfkill 20851 4 bluetooth,cfg80211 snd_bcm2835 24427 1 snd_pcm 98501 1 snd_bcm2835 snd_timer 23968 1 snd_pcm snd 70032 5 snd_timer,snd_bcm2835,snd_pcm bcm2835_gpiomem 3940 0 evdev 12423 6 joydev 9988 0 uio_pdrv_genirq 3923 0 uio 10204 1 uio_pdrv_genirq fixed 3285 0 i2c_dev 6913 0 fuse 99603 3 ipv6 408971 68

Greetings Alexandre Toledo [email protected]

full of thanks sir,,, step by step as u describe was really help me... i just followed exactly as it is, now i could say "viola" also,,, thanks again,,,

— You are receiving this because you commented. Reply to this email directly, view it on GitHub, or mute the thread.

AlexandreToledo avatar Nov 21 '19 03:11 AlexandreToledo

First of all thank you very much for this manual how to get it running. I´ve done it step by step and the last lsmod shows me that everything should be fine. The problem is, that the Arduino IDE (2.1.0.5) doesnt show me a serial port. I have connected an Arduino Uno with CH34x to my Rasp3B. The weird thing: only one time it was working, but I tried different times after that and it never showed a serial port again. I also checked with lsmod before every time, but shows the two lines correctly. So do you have any suggestion or is there maybe a common mistake i made? Thanks in advance! screenshot

Hi!

Try starting your Arduino pre-connect to your RPi BEFORE powering both.

AlexandreToledo avatar Nov 22 '19 03:11 AlexandreToledo

root@raspberrypi:/home/pi/Downloads/CH340_LINUX# cd CH341SER_LINUX/ root@raspberrypi:/home/pi/Downloads/CH340_LINUX/CH341SER_LINUX# make make -C /lib/modules/5.4.51-v8+/build M=/home/pi/Downloads/CH340_LINUX/CH341SER_LINUX
make[1]: Entering directory '/root/linux-f2f7e4b23d8788e96f81a7522b2f703e51c53e70' CC [M] /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.o /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c: In function ‘ch34x_close’: /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:562:2: error: unknown type name ‘wait_queue_t’; did you mean ‘wait_event’? wait_queue_t wait; ^~~~~~~~~~~~ wait_event /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:573:24: error: passing argument 1 of ‘init_waitqueue_entry’ from incompatible pointer type [-Werror=incompatible-pointer-types] init_waitqueue_entry( &wait, current ); ^~~~~ In file included from ./include/linux/mmzone.h:10, from ./include/linux/gfp.h:6, from ./include/linux/slab.h:15, from /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:21: ./include/linux/wait.h:79:66: note: expected ‘struct wait_queue_entry *’ but argument is of type ‘int *’ static inline void init_waitqueue_entry(struct wait_queue_entry *wq_entry, struct task_struct *p) ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~ /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:574:36: error: passing argument 2 of ‘add_wait_queue’ from incompatible pointer type [-Werror=incompatible-pointer-types] add_wait_queue( &tty->write_wait, &wait ); ^~~~~ In file included from ./include/linux/mmzone.h:10, from ./include/linux/gfp.h:6, from ./include/linux/slab.h:15, from /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:21: ./include/linux/wait.h:163:86: note: expected ‘struct wait_queue_entry *’ but argument is of type ‘int *’ wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

/home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:578:5: error: implicit declaration of function ‘signal_pending’; did you mean ‘timer_pending’? [-Werror=implicit-function-declaration] signal_pending(current) || port->serial->disconnected ) ^~~~~~~~~~~~~~ timer_pending /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:585:39: error: passing argument 2 of ‘remove_wait_queue’ from incompatible pointer type [-Werror=incompatible-pointer-types] remove_wait_queue( &tty->write_wait, &wait ); ^~~~~ In file included from ./include/linux/mmzone.h:10, from ./include/linux/gfp.h:6, from ./include/linux/slab.h:15, from /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:21: ./include/linux/wait.h:165:89: note: expected ‘struct wait_queue_entry *’ but argument is of type ‘int *’ wait_queue(struct wait_queue_head *wq_head, struct wait_queue_entry *wq_entry); ~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~

/home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c: In function ‘wait_modem_info’: /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.c:756:3: error: implicit declaration of function ‘interruptible_sleep_on’; did you mean ‘interrupts_enabled’? [-Werror=implicit-function-declaration] interruptible_sleep_on( &priv->delta_msr_wait ); ^~~~~~~~~~~~~~~~~~~~~~ interrupts_enabled cc1: some warnings being treated as errors make[2]: *** [scripts/Makefile.build:266: /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX/ch34x.o] Error 1 make[1]: *** [Makefile:1709: /home/pi/Downloads/CH340_LINUX/CH341SER_LINUX] Error 2 make[1]: Leaving directory '/root/linux-f2f7e4b23d8788e96f81a7522b2f703e51c53e70' make: *** [Makefile:5: default] Error 2 root@raspberrypi:/home/pi/Downloads/CH340_LINUX/CH341SER_LINUX# uname -a Linux raspberrypi 5.4.51-v8+ #1333 SMP PREEMPT Mon Aug 10 16:58:35 BST 2020 aarch64 GNU/Linux root@raspberrypi:/home/pi/Downloads/CH340_LINUX/CH341SER_LINUX# gcc --version gcc (Debian 8.3.0-6) 8.3.0 Copyright (C) 2018 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

xevilstar avatar Sep 20 '20 13:09 xevilstar