我正在尝试构建一个新内核,并向该已构建内核添加一个新的系统调用,当我在创建新的系统调用后尝试使用“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版本可能与您使用的版本不同。它极大地简化了工作,但是起初可能会有些困惑。这是内核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