Giter VIP home page Giter VIP logo

ch340-dkms's People

Contributors

selfbg avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

ch340-dkms's Issues

binary package for ch340: 1.0.0 not found

After updating my system to Ubuntu 22.04 I can connect anymore to your ESP32-POE board:

[ 4026.435289] usb 1-2: new full-speed USB device number 8 using xhci_hcd
[ 4026.584263] usb 1-2: New USB device found, idVendor=1a86, idProduct=7523, bcdDevice= 2.64
[ 4026.584268] usb 1-2: New USB device strings: Mfr=0, Product=2, SerialNumber=0
[ 4026.584269] usb 1-2: Product: USB Serial
[ 4026.586499] ch341 1-2:1.0: ch341-uart converter detected
[ 4026.586921] usb 1-2: ch341-uart converter now attached to ttyUSB0
[ 4027.133018] input: BRLTTY 6.4 Linux Screen Driver Keyboard as /devices/virtual/input/input25
[ 4027.134345] usb 1-2: usbfs: interface 0 claimed by ch341 while 'brltty' sets config #1
[ 4027.134928] ch341-uart ttyUSB0: ch341-uart converter now disconnected from ttyUSB0
[ 4027.134950] ch341 1-2:1.0: device disconnected

So I'm trying to compile this drivers but I get this error:

$ sudo dkms build .
Creating symlink /var/lib/dkms/ch340/1.0.0/source -> /usr/src/ch340-1.0.0

Kernel preparation unnecessary for this kernel. Skipping...

Building module:
cleaning build area...
make -j8 KERNELRELEASE=5.15.0-27-generic default KERNELVERSION=5.15.0-27-generic...(bad exit status: 2)
ERROR (dkms apport): binary package for ch340: 1.0.0 not found
Error! Bad return status for module build on kernel: 5.15.0-27-generic (x86_64)
Consult /var/lib/dkms/ch340/1.0.0/build/make.log for more information.

Here the full output of the log:

$ cat /var/lib/dkms/ch340/1.0.0/build/make.log 
DKMS make.log for ch340-1.0.0 for kernel 5.15.0-27-generic (x86_64)
mar 17 mag 2022, 16:15:21, CEST
make -C /lib/modules/5.15.0-27-generic/build M=/var/lib/dkms/ch340/1.0.0/build modules
make[1]: ingresso nella directory «/usr/src/linux-headers-5.15.0-27-generic»
  CC [M]  /var/lib/dkms/ch340/1.0.0/build/ch340.o
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from /var/lib/dkms/ch340/1.0.0/build/ch340.c:16:
/var/lib/dkms/ch340/1.0.0/build/ch340.c: In function ‘ch340_set_baudrate_lcr’:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:171:28: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
  171 |         dev_dbg(&dev->dev, "clk: x1, factor: %lu, divisor: %d (/%d)\n", factor, divisor, div);
      |                            ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro ‘__dynamic_func_call’
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:9: note: in expansion of macro ‘_dynamic_func_call’
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:9: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:30: note: in expansion of macro ‘dev_fmt’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:171:9: note: in expansion of macro ‘dev_dbg’
  171 |         dev_dbg(&dev->dev, "clk: x1, factor: %lu, divisor: %d (/%d)\n", factor, divisor, div);
      |         ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:171:48: note: format string is defined here
  171 |         dev_dbg(&dev->dev, "clk: x1, factor: %lu, divisor: %d (/%d)\n", factor, divisor, div);
      |                                              ~~^
      |                                                |
      |                                                long unsigned int
      |                                              %u
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from /var/lib/dkms/ch340/1.0.0/build/ch340.c:16:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:176:28: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=]
  176 |         dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                            ^~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro ‘__dynamic_func_call’
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:9: note: in expansion of macro ‘_dynamic_func_call’
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:9: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:30: note: in expansion of macro ‘dev_fmt’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:176:9: note: in expansion of macro ‘dev_dbg’
  176 |         dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |         ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:176:36: note: format string is defined here
  176 |         dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                                  ~~^
      |                                    |
      |                                    long unsigned int
      |                                  %u
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from /var/lib/dkms/ch340/1.0.0/build/ch340.c:16:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:176:28: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’ [-Wformat=]
  176 |         dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                            ^~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro ‘__dynamic_func_call’
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:9: note: in expansion of macro ‘_dynamic_func_call’
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:9: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:30: note: in expansion of macro ‘dev_fmt’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:176:9: note: in expansion of macro ‘dev_dbg’
  176 |         dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |         ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:176:42: note: format string is defined here
  176 |         dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                                        ~~^
      |                                          |
      |                                          long unsigned int
      |                                        %u
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from /var/lib/dkms/ch340/1.0.0/build/ch340.c:16:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:196:36: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 4 has type ‘unsigned int’ [-Wformat=]
  196 |                 dev_dbg(&dev->dev, "clk: x2, factor: %lu, divisor: %d (/%d)\n", factor, divisor, div);
      |                                    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro ‘__dynamic_func_call’
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:9: note: in expansion of macro ‘_dynamic_func_call’
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:9: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:30: note: in expansion of macro ‘dev_fmt’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:196:17: note: in expansion of macro ‘dev_dbg’
  196 |                 dev_dbg(&dev->dev, "clk: x2, factor: %lu, divisor: %d (/%d)\n", factor, divisor, div);
      |                 ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:196:56: note: format string is defined here
  196 |                 dev_dbg(&dev->dev, "clk: x2, factor: %lu, divisor: %d (/%d)\n", factor, divisor, div);
      |                                                      ~~^
      |                                                        |
      |                                                        long unsigned int
      |                                                      %u
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from /var/lib/dkms/ch340/1.0.0/build/ch340.c:16:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:201:36: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 5 has type ‘unsigned int’ [-Wformat=]
  201 |                 dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                                    ^~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro ‘__dynamic_func_call’
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:9: note: in expansion of macro ‘_dynamic_func_call’
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:9: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:30: note: in expansion of macro ‘dev_fmt’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:201:17: note: in expansion of macro ‘dev_dbg’
  201 |                 dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                 ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:201:44: note: format string is defined here
  201 |                 dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                                          ~~^
      |                                            |
      |                                            long unsigned int
      |                                          %u
In file included from ./include/linux/printk.h:559,
                 from ./include/linux/kernel.h:19,
                 from /var/lib/dkms/ch340/1.0.0/build/ch340.c:16:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:201:36: warning: format ‘%lu’ expects argument of type ‘long unsigned int’, but argument 6 has type ‘unsigned int’ [-Wformat=]
  201 |                 dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                                    ^~~~~~~~~~~~~~~~~~
./include/linux/dynamic_debug.h:134:29: note: in definition of macro ‘__dynamic_func_call’
  134 |                 func(&id, ##__VA_ARGS__);               \
      |                             ^~~~~~~~~~~
./include/linux/dynamic_debug.h:166:9: note: in expansion of macro ‘_dynamic_func_call’
  166 |         _dynamic_func_call(fmt,__dynamic_dev_dbg,               \
      |         ^~~~~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:9: note: in expansion of macro ‘dynamic_dev_dbg’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |         ^~~~~~~~~~~~~~~
./include/linux/dev_printk.h:155:30: note: in expansion of macro ‘dev_fmt’
  155 |         dynamic_dev_dbg(dev, dev_fmt(fmt), ##__VA_ARGS__)
      |                              ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:201:17: note: in expansion of macro ‘dev_dbg’
  201 |                 dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                 ^~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:201:50: note: format string is defined here
  201 |                 dev_dbg(&dev->dev, "%u - %lu = %lu\n", priv->baud_rate, res, diff);
      |                                                ~~^
      |                                                  |
      |                                                  long unsigned int
      |                                                %u
/var/lib/dkms/ch340/1.0.0/build/ch340.c: At top level:
/var/lib/dkms/ch340/1.0.0/build/ch340.c:682:30: error: initialization of ‘void (*)(struct usb_serial_port *)’ from incompatible pointer type ‘int (*)(struct usb_serial_port *)’ [-Werror=incompatible-pointer-types]
  682 |         .port_remove       = ch340_port_remove,
      |                              ^~~~~~~~~~~~~~~~~
/var/lib/dkms/ch340/1.0.0/build/ch340.c:682:30: note: (near initialization for ‘ch340_device.port_remove’)
cc1: some warnings being treated as errors
make[2]: *** [scripts/Makefile.build:285: /var/lib/dkms/ch340/1.0.0/build/ch340.o] Errore 1
make[1]: *** [Makefile:1875: /var/lib/dkms/ch340/1.0.0/build] Errore 2
make[1]: uscita dalla directory «/usr/src/linux-headers-5.15.0-27-generic»
make: *** [Makefile:5: default] Errore 2

Invalid destination module location

Hey!

Shouldn't be in dkms.conf?:

PACKAGE_NAME="ch340"
PACKAGE_VERSION="1.0.0"
CLEAN="make clean"

MAKE[0]="make default KERNELVERSION=$kernelver"
BUILT_MODULE_NAME[0]="ch340"
-DEST_MODULE_LOCATION[0]="/kernel/kernel/drivers/usb/serial"
+DEST_MODULE_LOCATION[0]="/kernel/drivers/usb/serial"

AUTOINSTALL="yes"

DKMS installs then:
/usr/lib/modules/5.3.0-pf8/kernel/kernel/drivers/usb/serial
rather in
/usr/lib/modules/5.3.0-pf8/kernel/drivers/usb/serial.

Regards,
TheAifam5

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.