我已经开始编写设备驱动程序并编写第一个字符驱动程序并得到编译错误:
scripts/Makefile.build:44: /home/betatest/Public/Device-Driver-Test/first-driver/Makefile: No such file or directory
make[2]: *** No rule to make target '/home/betatest/Public/Device-Driver-Test/first-driver/Makefile'. Stop.
Makefile:1448: recipe for target '_module_/home/betatest/Public/Device-Driver-Test/first-driver' failed
make[1]: *** [_module_/home/betatest/Public/Device-Driver-Test/first-driver] Error 2
make[1]: Leaving directory '/usr/src/kernels/2.6.32-573.12.1.el6.x86_64'
makefile:19: recipe for target 'default' failed
make: *** [default] Error 2
我的 make 文件名为“makefile”? 在研究 makefile 时写到 makefile 的默认名称可以是 Makefile 或 makefile 它对 make 实用程序没有影响。名称对设备驱动程序 makefile 重要吗?设备驱动程序的make文件名是否必须是“Makefile”?如果是,为什么?
如有任何帮助,我们将不胜感激。
最佳答案
脚本未使用默认名称运行 make。该脚本给出了不存在的 -f/home/betatest/Public/Device-Driver-Test/first-driver/Makefile
。
关于linux - linux上的设备驱动程序编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34567052/