0

I am trying to install cp210x driver on ubuntu 18.04.2 and when I download the file from the official website of silabs and try to install it by following the instructions I get this error on my first step.

After I type make :

make -C /lib/modules/`uname -r`/build M=/home/$user/linuxDrv modules
make[1]: Entering directory '/usr/src/linux-headers-4.15.0-54-generic'
Makefile:976: "Cannot use CONFIG_STACK_VALIDATION=y, please install libelf-dev, libelf-devel or elfutils-libelf-devel"
 Building modules, stage 2.
 MODPOST 1 modules
make[1]: Leaving directory '/usr/src/linux-headers-4.15.0-54-generic'

I installed libelf-dev but not the other two.

0

1 Answer 1

1

Happily, the cp210x kernel module (driver) is already included in Ubuntu. You don't need to compile it.

1) Check your kernel version.

$ uname -r
5.0.0-20-generic

2) Check that you have the correct package installed for your kernel.

$ apt list linux-modules-extra-5.0.0-20-generic
linux-modules-extra-5.0.0-20-generic/disco-updates,disco-security,now 5.0.0-20.21 amd64 [installed,automatic]

See how the kernel version is part of the package name?
And see how it's installed on my machine?

3) Let's verify that the module is included in this installed package.

$ dpkg -L linux-modules-extra-5.0.0-20-generic | grep cp210x
/lib/modules/5.0.0-20-generic/kernel/drivers/usb/serial/cp210x.ko

4) Finally, let's install the kernel module (driver):

$ sudo modprobe cp210x
$

Note that no feedback usually indicates success. It's a good thing.

To check that it worked, use the lsmod command to list all loaded kernel modules.


If, for whatever reason, Step 2 indicates that you DON'T have the package installed, read this wisdom from the package's control file before racing to install it:

You likely do not want to install this package directly. Instead, install the linux-generic meta-package, which will ensure that upgrades work correctly, and that supporting packages are also installed.

2
  • Thank your for answering. I have a match on my cp210x.ko file so that means it is there. When I try your last command (sudo modprobe cp210x) I dont get any output so does that mean that it is installed on my kernel?
    – amijic97
    Jul 18, 2019 at 19:58
  • I found it thank you very much :D
    – amijic97
    Jul 18, 2019 at 20:08

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.