写了个hello world模块然后没办法make

dkhghj dkhghj 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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,试了,不行。谢谢!
...全文
评论 4
收藏 已收藏
分享
返回顶部
dkhghj
驱动程序开发区 1,323 成员 2,170 内容