驱动编译 Redhat
我对编译 Linux 驱动程序完全陌生,但遇到了一些问题!
我正在尝试编译 USB 设备的驱动程序。
结果:
[thayoz@lacalpc13 linux]$ make
for i in driver lib qrng ; do cd $i && (make all || exit ) && cd ..; done
make[1]: Entering directory /home/thayoz/Desktop/untitled folder/Quantis-USB/src/linux/driver'
make -C /usr/src/kernels/ M=/home/thayoz/Desktop/untitled folder/Quantis-USB/src/linux/driver V=1 modules
make[2]: Entering directory
/usr/src/kernels'
make[2]: * No rule to make target folder/Quantis-USB/src/linux/driver'. Stop.
make[2]: Leaving directory
/usr/src/kernels'
make[1]: * [all] Error 2
make[1]: Leaving directory `/home/thayoz/Desktop/untitled folder/Quantis-USB/src/linux/driver'
/bin/sh: line 0: cd: lib: No such file or directory
/bin/sh: line 0: cd: qrng: No such file or directory
make: *** [all] Error 1
我不知道怎么了???
I'm totally new to compiling drivers for linux and I got some problems !
I'm trying to compile a driver for a usb device.
Result:
[thayoz@lacalpc13 linux]$ make
for i in driver lib qrng ; do cd $i && (make all || exit ) && cd ..; done
make[1]: Entering directory /home/thayoz/Desktop/untitled folder/Quantis-USB/src/linux/driver'
make -C /usr/src/kernels/ M=/home/thayoz/Desktop/untitled folder/Quantis-USB/src/linux/driver V=1 modules
make[2]: Entering directory
/usr/src/kernels'
make[2]: * No rule to make target folder/Quantis-USB/src/linux/driver'. Stop.
make[2]: Leaving directory
/usr/src/kernels'
make[1]: * [all] Error 2
make[1]: Leaving directory `/home/thayoz/Desktop/untitled folder/Quantis-USB/src/linux/driver'
/bin/sh: line 0: cd: lib: No such file or directory
/bin/sh: line 0: cd: qrng: No such file or directory
make: *** [all] Error 1
I don't know what's wrong ???
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
我认为构建目录路径中的空间可能会导致问题。
/home/thayoz/Desktop/无标题文件夹/Quantis-USB...
请注意“无标题文件夹”中的空格。
看起来 make 将模块目录视为:
/home/thayoz/Desktop/untitled
并且:
folder/Quantis-USB/src/linux/driver
被传递给 make 作为附加参数(可能是要构建的目标)。
尝试将“/home/thayoz/Desktop/untitledfolder”重命名为“/home/thayoz/Desktop/untitledfolder”,看看会发生什么。
I think that space in the path to your build directory might be causing the problem.
/home/thayoz/Desktop/untitled folder/Quantis-USB...
Notice the space in 'untitled folder'.
It looks like make is taking the module directory as:
/home/thayoz/Desktop/untitled
And:
folder/Quantis-USB/src/linux/driver
is getting passed to make as an additional argument (probably a target to be built).
Try renaming '/home/thayoz/Desktop/untitled folder' to '/home/thayoz/Desktop/untitledfolder' and see what happens.
通常类似:
就足够了。
你的驱动程序带有 makefile 吗? 例如,您是否针对正确的内核源(例如正确的版本)进行编译?
Typically something like:
is sufficient.
Did your driver come with a makefile? Are you compiling against the proper kernel sources, the right version, for instance?
我对使用 GNU 构建系统构建软件包的一般过程的理解是:
GNU 构建系统
您是否运行了驱动程序包附带的 .configure 脚本?
My understanding of the general procedure for building a piece of software packaged using the GNU build system is:
GNU Build System
Have you run the .configure script that came with the driver package?