我需要在LinuxLMDE3Cindy中安装MySmartUSB Light作为linux中avr的编程器,所以我从这个链接下载了这个驱动程序(Linux_3.x.x_4.x.x_VCP_Driver_Source):基于它的说明如下:
最近一次修改是在2019年7月12日,这个包包含一个修改过的4.10.0内核的CP210x驱动程序(Ubuntu17.04)。它包括:
注意:这个驱动程序是如何在CP210x驱动程序中执行GPIO操作的一个示例,因为kernel.org上的驱动程序此时不支持GPIO。这个驱动程序只在Ubuntu14.04上的Linux3.13.0内核上编写和测试。这个驱动程序是Linux3.13.0内核中现有驱动程序的一个修改版本,它是在kernel.org上维护的。建议使用与特定内核版本相匹配的驱动程序: www.kernel.org构建说明: Ubuntu: 1. make ( cp210x驱动程序) 2. cp cp210x.ko to /lib/cp210x.ko/cp210x.ko/usb/串行3. insmod /lib/cp210x.ko/
当我想在驱动程序文件夹中运行sudo make时,我会得到以下错误:
so@notebook:~/Downloads/Compressed/Linux_3.x.x_4.x.x_VCP_Driver_Source$ sudo make
[sudo] password for so:
Sorry, try again.
[sudo] password for so:
make -C /lib/modules/`uname -r`/build M= modules
make[1]: Entering directory '/usr/src/linux-headers-4.9.0-9-amd64'
/usr/src/linux-headers-4.9.0-9-common/scripts/Makefile.build:44: /usr/src/linux-headers-4.9.0-9-common/scripts/basic/Makefile: No such file or directory
make[5]: *** No rule to make target '/usr/src/linux-headers-4.9.0-9-common/scripts/basic/Makefile'. Stop.
/usr/src/linux-headers-4.9.0-9-common/Makefile:444: recipe for target 'scripts_basic' failed
make[4]: *** [scripts_basic] Error 2
/usr/src/linux-headers-4.9.0-9-common/scripts/Makefile.build:44: /usr/src/linux-headers-4.9.0-9-common/arch/x86/entry/syscalls/Makefile: No such file or directory
make[4]: *** No rule to make target '/usr/src/linux-headers-4.9.0-9-common/arch/x86/entry/syscalls/Makefile'. Stop.
arch/x86/Makefile:231: recipe for target 'archheaders' failed
make[3]: *** [archheaders] Error 2
Makefile:152: recipe for target 'sub-make' failed
make[2]: *** [sub-make] Error 2
Makefile:8: recipe for target 'all' failed
make[1]: *** [all] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-4.9.0-9-amd64'
Makefile:7: recipe for target 'all' failed
make: *** [all] Error 2那么我该如何解决这个问题呢?
发布于 2019-08-27 16:37:47
您以前是否使用此系统来运行make来构建驱动程序?你可能需要一些额外的包裹。
本指南可能有些帮助,因为它描述了编译软件包之前的必要步骤,尽管在您的例子中最重要的一步可能是第一步:
sudo apt-get install build-essential checkinstall运行之后,再次使用sudo make编译驱动程序。
如果它不起作用,就可能没有合适的内核头。内核头基本上只是内核本身的C头文件,这对于编译与内核接口的东西(比如驱动程序)是必要的。这里是一个安装指南,它解释了升级/安装内核头和运行一样容易:
sudo apt update
sudo apt install linux-headers-$(uname -r)https://unix.stackexchange.com/questions/537692
复制相似问题