need module cp210x.ko

Started by pfandfrei, July 18, 2014, 07:23:24 pm

Previous topic - Next topic

pfandfrei

I installed the second debian sd-card image with kernel 3.4.67 as provided by olimex.
Now I recognized that support for USB serial (especially CP210x to UART bridge is not included. When I try to build it by myself as decribed here http://www.silabs.com/Support%20Documents/Software/Linux_CP210x_VCP_3.x.x_Release_Notes.txt I get a error message when calling make
# make
make -C /lib/modules/3.4.67+/build M=/var/tmp/Linux_3.x.x_VCP_Driver_Source modules
make: *** /lib/modules/3.4.67+/build: No such file or directory.  Stop.
make: *** [all] Error 2


Anyone here who can help me or can attach or send me a compiled version of usbserial.ko and cp210x.ko?

Is USB CP210x support included in third debian image from olimex with kernel 3.4.90? What is the easiest way to upgrade the system (it is currently working as a datalogger, so I don't want to interrupt the system too long time)?

JohnS

July 18, 2014, 09:32:42 pm #1 Last Edit: July 18, 2014, 09:43:02 pm by JohnS
You're probably being too literal about the command line.

It's telling you that you do not have a path (folder / directory) that you stated:
   /lib/modules/3.4.67+/build: No such file or directory

Look to see what you do have (under /lib/modules) and change the command.

You have installed the sources, build environment and so on I hope...

John

pfandfrei

July 19, 2014, 10:57:26 am #2 Last Edit: July 19, 2014, 12:32:44 pm by pfandfrei
/lib/modules/3.4.67+/build links to a non-existing directory. I corrected this, but still no success.
Tried to compile with make cp210x.o also fails

My problem seems for me that
sudo apt-get install linux-headers-$(uname -r) build-essentials fails with
Reading package lists... Done
Building dependency tree
Reading state information... Done
E: Unable to locate package linux-headers-3.4.67
E: Couldn't find any package by regex 'linux-headers-3.4.67'
E: Unable to locate package build-essentials

So I manually extracted the files from kernel.org, but I don't know where to put them.

pfandfrei

I copied kernel sources to /usr/src/linux-3-4-67 and changed the symlink so that /lib/modules/3.4.67+/build links to this directory.
Unfortunately build still fails. Here is the output:

# make
make -C /lib/modules/3.4.67+/build M=/root/Linux_3.x.x_VCP_Driver_Source modules
make[1]: Entering directory `/usr/src/linux-3.4.67'

  ERROR: Kernel configuration is invalid.
         include/generated/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.


  WARNING: Symbol version dump /usr/src/linux-3.4.67/Module.symvers
           is missing; modules will have no dependencies and modversions.

make[2]: *** Keine Regel vorhanden, um das Target »/root/Linux_3.x.x_VCP_Driver_Source/cp210x.c«,
  benötigt von »/root/Linux_3.x.x_VCP_Driver_Source/cp210x.o«, zu erstellen.  Schluss.
make[1]: *** [_module_/root/Linux_3.x.x_VCP_Driver_Source] Error 2
make[1]: Leaving directory `/usr/src/linux-3.4.67'
make: *** [all] Error 2


What's wrong?

klausbm

Hello pfandfrei,

you are not the first person getting issues while trying to compile the kernel module cp210x. Look at http://unix.stackexchange.com/questions/75558/ubuntu-make-fails-with-no-such-file-or-directory-lib-modules-3-4-0-build

I think you have to download the Linux sources from sunxi and to compile a new Linux kernel plus modules after you have enabled support for your USB serial device. You can get your current kernel configuration from /proc/config.gz