linux - linux上的设备驱动程序编译错误

标签 linux makefile linux-device-driver

我已经开始编写设备驱动程序并编写第一个字符驱动程序并得到编译错误:

    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 文件名为“ma​​kefile”? 在研究 makefile 时写到 makefile 的默认名称可以是 Makefilema​​kefile 它对 make 实用程序没有影响。名称对设备驱动程序 makefile 重要吗?设备驱动程序的make文件名是否必须是“Makefile”?如果是,为什么?

如有任何帮助,我们将不胜感激。

最佳答案

脚本未使用默认名称运行 make。该脚本给出了不存在的 -f/home/betatest/Public/Device-Driver-Test/first-driver/Makefile

关于linux - linux上的设备驱动程序编译错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34567052/

相关文章:

linux - 配置:错误:找不到库的版本

makefile - 在 Makefile $(info ...) 中使用制表符

linux 网络驱动程序 --- net_device_ops

Android - 读取 "device attribute"失败并出现错误 "invalid length"

c - 具有多个读取操作、ioctl 或 fops 的 Linux USB 驱动程序?

mysql - Linux SSH 数据库在两个数据库 MySQL 之间传输

linux - 我如何 'nohup' 命令并记录 'time' 的输出

linux - linux软引用中的元字符

makefile - 如何为多个目标创建 makefile,每个目标在输出中具有相同的标识符作为输入?

c - 在 GCC 中使用 Make 时权限被拒绝