我正在尝试构建一个新内核并向该构建的内核添加一个新的系统调用,当我在创建新的系统调用后尝试使用“make”命令重新编译时,我得到了这个错误。
scripts/Makefile.build:44: /usr/src/linux-3.0.42/block/helloworld/Makefile: No such file or directory
make[1]: *** No rule to make target `/usr/src/linux-3.0.42/block/helloworld/Makefile'. Stop.
make: *** [block/helloworld] Error 2
最佳答案
内核模块使用的 make 版本可能与您可能习惯的不同。它极大地简化了事情,但一开始可能会有点困惑。这是内核制作的文档:http://lwn.net/Articles/21835/
这是关于 hello world 模块的教程:
c代码:http://tldp.org/LDP/lkmpg/2.6/html/x121.html
对应的makefile:http://tldp.org/LDP/lkmpg/2.6/html/x181.html
关于makefile - 在 Fedora 17 中使用 'make' 命令编译时出错,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12304359/