写了个hello world模块然后没办法make
make后出现:
----------------------------------------------------------------
make -C /usr/src/linux-2.6.34.14 M=/home/Module modules
make[1]: Entering directory `/usr/src/linux-2.6.34.14'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
WARNING: Symbol version dump /usr/src/linux-2.6.34.14/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/Module/hello.o
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
make[2]: *** [/home/Module/hello.o] Error 1
make[1]: *** [_module_/home/Module] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.34.14'
make: *** [all] Error 2
------------------------------------------------------------------
uname -r:3.2.0-4-686-pae
/usr/src目录本来是空的,我下了个2.6版本的内核放进去了(未编译)。难道非得编译下内核?网上有人说在/lib/modules目录下面执行make prepare,试了,不行。谢谢!
----------------------------------------------------------------
make -C /usr/src/linux-2.6.34.14 M=/home/Module modules
make[1]: Entering directory `/usr/src/linux-2.6.34.14'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
WARNING: Symbol version dump /usr/src/linux-2.6.34.14/Module.symvers
is missing; modules will have no dependencies and modversions.
CC [M] /home/Module/hello.o
cc1: fatal error: include/generated/autoconf.h: No such file or directory
compilation terminated.
make[2]: *** [/home/Module/hello.o] Error 1
make[1]: *** [_module_/home/Module] Error 2
make[1]: Leaving directory `/usr/src/linux-2.6.34.14'
make: *** [all] Error 2
------------------------------------------------------------------
uname -r:3.2.0-4-686-pae
/usr/src目录本来是空的,我下了个2.6版本的内核放进去了(未编译)。难道非得编译下内核?网上有人说在/lib/modules目录下面执行make prepare,试了,不行。谢谢!
...全文
相关推荐
各种程序语言的Hello_World程序
各种程序语言的Hello_World程序,适用于程序语言初学者,通过分析比较使各种语言编写的简单hello world程序,能够更好的理解、铭记编程语言的特性
Linux Hello World 驱动
Linux Hello World 驱动 (编译,安装,卸载,查看)
linux内核驱动模块模板之hello
linux内核模块,打印出hello信息,这是模块的基本代码,包括模块入口及出口,以及多文件编译,及模块编译的Makefile模板
starterkit-hello-world:Starterkit 从头开始一个项目
入门套件 Hello World 打开菜单 make help
hello模块驱动程序
hello模块Linux驱动开发程序及Makefile,基于Fedora14开发环境


驱动程序开发区
