完善资料让更多小伙伴认识你,还能领取20积分哦, 立即完善>
我在学习一二期衔接课,LED驱动时。用课程中的源码和Makefile编译不通过。
显示 ERROR: Kernel configuration is invalid. include/linux/autoconf.h or include/config/auto.conf are missing. Run 'make oldconfig && make prepare' on kernel src to fix it. WARNING: Symbol version dump /work/system/linux-2.6.22.6/Module.symvers is missing; modules will have no dependencies and modversions. CC [M] /work/drivers_and_test/sec/second_drv.o cc1: error: include/linux/autoconf.h: No such file or directory In file included from include/linux/thread_info.h:20, from include/linux/preempt.h:9, from include/linux/spinlock.h:49, from include/linux/module.h:9, from /work/drivers_and_test/sec/second_drv.c:1: include/linux/bitops.h:3:23: error: asm/types.h: No such file or directory include/linux/bitops.h:9:24: error: asm/bitops.h: No such file or directory In file included from include/linux/thread_info.h:20, from include/linux/preempt.h:9, from include/linux/spinlock.h:49, from include/linux/module.h:9, from /work/drivers_and_test/sec/second_drv.c:1: include/linux/bitops.h: In function ‘get_bitmask_order’: include/linux/bitops.h:15: warning: implicit declaration of function ‘fls’ include/linux/bitops.h: In function ‘hweight_long’: include/linux/bitops.h:31: warning: implicit declaration of function ‘hweight32’ include/linux/bitops.h:31: warning: implicit declaration of function ‘hweight64’ include/linux/bitops.h: At top level: include/linux/bitops.h:39: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘rol32’ include/linux/bitops.h:49: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘ror32’ include/linux/bitops.h: In function ‘fls_long’: include/linux/bitops.h:58: warning: implicit declaration of function ‘fls64’ In file included from include/linux/preempt.h:9, from include/linux/spinlock.h:49, from include/linux/module.h:9, from /work/drivers_and_test/sec/second_drv.c:1: include/linux/thread_info.h:21:29: error: asm/thread_info.h: No such file or directory In file included from include/linux/preempt.h:9, from include/linux/spinlock.h:49, from include/linux/module.h:9, from /work/drivers_and_test/sec/second_drv.c:1: 好像是内核没编译吧,按照提示 Run 'make oldconfig && make prepare' on kernel src to fix it. 输入make oldconfig && make prepare也不行啊,求助 |
|
相关推荐
4个回答
|
|
|
|
|
|
没有啊老师,我把linux-2.6.22.6放在了
/work/system 目录下,而且也打了补丁 这是Makeflie KERN_DIR = /work/system/linux-2.6.22.6 all: make -C $(KERN_DIR) M=`pwd` modules clean: make -C $(KERN_DIR) M=`pwd` modules clean rm -rf modules.order obj-m += first_drv.o |
|
|
|
你内核是不是没编译?
|
|
|
|
编译内核 再编译驱动 即可
|
|
|
|
只有小组成员才能发言,加入小组>>
197个成员聚集在这个小组
加入小组为什么点亮LED的例子放在NORFlash上跑会出现奇怪的现象?
2187 浏览 6 评论
1987 浏览 5 评论
韦东山老师推出的《玩转ARM裸机实战》课程将帮你以上问题一扫而光!
4545 浏览 1 评论
小黑屋| 手机版| Archiver| 电子发烧友 ( 湘ICP备2023018690号 )
GMT+8, 2024-12-24 05:38 , Processed in 0.519474 second(s), Total 51, Slave 42 queries .
Powered by 电子发烧友网
© 2015 bbs.elecfans.com
关注我们的微信
下载发烧友APP
电子发烧友观察
版权所有 © 湖南华秋数字科技有限公司
电子发烧友 (电路图) 湘公网安备 43011202000918 号 电信与信息服务业务经营许可证:合字B2-20210191 工商网监 湘ICP备2023018690号