make
make -C /benew/hello/../linux-3.0 M=/benew/hello modules
make[1]: Entering directory '/benew/linux-3.0'
CC [M] /benew/hello/hello.o
In file included from include/linux/compiler.h:48:0,
from include/linux/stddef.h:4,
from include/linux/posix_types.h:4,
from include/linux/types.h:17,
from include/linux/list.h:4,
from include/linux/module.h:9,
from /home/zengming/下载/benew/hello/hello.c:1:
include/linux/compiler-gcc.h:94:30: fatal error: linux/compiler-gcc5.h: 没有那个文件或目录
compilation terminated.
这种情况是因为系统太新,手动去网上下一个compiler-gcc5.h放你要编译内核模块的内核代码的include/linux下. 实在不行尝试拷贝一个自己目录下的compiler-gcc4.h到compiler-gcc5.h
阅读(23068) | 评论(0) | 转发(0) |