linux 关于编译模块缺少config.h而…
来源:互联网 发布:交换查看mac地址命令 编辑:程序博客网 时间:2024/05/22 15:00
linux关于编译模块缺少config.h而产生错误的问题
问题来源:
Compiling for /home/dsr-uu-0.2
make -C /lib/modules/2.6.18-1.2798.fc6/buildSUBDIRS=/home/dsr-uu-0.2 modules
make[1]: Entering directory`/usr/src/kernels/2.6.18-1.2798.fc6-i686'
/home/dsr-uu-0.2/dsr-module.c:16:26:错误:linux/config.h:没有那个文件或目录
make[2]: *** [/home/dsr-uu-0.2/dsr-module.o] 错误 1
make[1]: *** [_module_/home/dsr-uu-0.2] 错误 2
make[1]: Leaving directory`/usr/src/kernels/2.6.18-1.2798.fc6-i686'
make: *** [dsr.ko] 错误 2
解决方法;
我看的方法是从网上看到的看到的。呵呵
1)先把我实验正确的方法贴出:The file include/linux/config.h has been removedfrom 2.6.18 kernel. So remember this if you build your favoritemodule against the new 2.6.19 kernel and you get an error。 Thatsbecause there is no more include/linux/config.h file in 2.6.19.This is from the Changelog:
Author: Dave Jones<someone@someplace.com>
Date: Mon Oct 9 19:13:51 2006-0400
[HEADERS] Put linux/config.h out of itsmisery.
Signed-off-by: Dave Jones<someone@someplace.com>
Author: Paul Mundt<nameremoved@a-linux-company.org>
Date: Tue Oct 3 13:19:02 2006 +0900
sh: Kill off remaining config.h references.
A few of these managed to sneak back in, get rid of them once
and for all.
解决方法:
The reason I posted this is for people who have the kernel sourcesinstalled and are trying to build a module against the sources andare getting the error I mentioned. You wouldn't be trying to builda module for the 2.6.19 kernel unless you had the sourcesinstalled.
Actually there is not much to the file:
#ifndef _LINUX_CONFIG_H
#define _LINUX_CONFIG_H
#include <linux/autoconf.h>
#endif
So if you have problems you could probably just add to code here toyour module.c file.
我也就是和上面的一样,但是程序还是不认上面的补丁程序;所以,我亲自手动把所有包含config.h的源文件改成autoconf.h。这样就没有出错了。但是还有人说2.6.23后没有了autoconf.h了。那就需要再先看看下面的方法有用没?
2)well the .h files are not from the main kernel package ,they arefrom the devel package(unless you built it yourself)
if kernel-devel(or -source depending on distro) isn't installedthere wouldn't be any useful includes
- linux 关于编译模块缺少config.h而…
- linux 关于编译模块缺少config.h而产生错误的问题
- bfs编译失败,编译gflags时缺少config.h
- 编译内核模块 .ko文件缺少:mmzone.h bounds.h
- 编译内核模块出现 include/linux/autoconf.h or include/config/auto.conf are missing.解决方法
- 编译ACE中关于config.h配置
- linux 模块编译步骤
- Linux下安装python模块时缺少Python.h
- 编译内核模块 .ko文件的注意事项 缺少:mmzone.h bounds.h
- 编译内核模块 .ko文件的注意事项 缺少:mmzone.h bounds.h
- 编译内核模块 .ko文件的注意事项 缺少:mmzone.h bounds.h
- linux 将模块编译进内核
- 编译e1000 缺少:mmzone.h bounds.h
- Kconfig、Makefile、.config 与编译内核模块添加 -- linux内核
- 嵌入式开发的问题1──关于ppcboot编译缺少bfd。h(未解决)
- VS2008编译缺少atlrx.h的解决
- VS2008编译缺少atlrx.h的解决
- VS2008编译缺少atlrx.h的解决
- modelsim安装小结
- FPGA矩阵键盘的扫描方法
- 田忌赛马
- 键盘扫描程序 FPGA
- 跟我一起写 Makefile
- linux 关于编译模块缺少config.h而…
- html5新标签
- 3g卡手机卡和3g上网卡的区别
- 手机网络常识笔记
- 5种方法解除开机密码
- 五分钟搞定5000字-外文文献翻译,…
- 嵌入式系统学习步骤
- tftpd 安装和配置
- 用右键于当前目录中打开终端termin…