编译内核模块 .ko文件缺少:mmzone.h bounds.h
来源:互联网 发布:网络不通怎么解决 编辑:程序博客网 时间:2024/04/27 17:47
出现的问题:编译的时候提示缺少头文件 mmzone.h ....bounds.h...等
include/linux/mmzone.h:18:26: error: linux/bounds.h: No such file or directory
include/linux/mmzone.h:197:5: warning: "MAX_NR_ZONES" is not defined
原因:bounds.h是在编译内核时生成的,类似于编译产生的.o文件,如果你运行
"make clean" or "make distclean",这个文件就会被清除掉(详情查看内核Makefile)。因此,如果再利用此内核源码编译内核模块,如果有涉及bounds.h,就会出现找不到该文件的错误。
解决:独立内核目录之外编译模块时,要确保makefile文件中所定义的内核源代码树已经make过一遍,且没有make clean。这样就不会清除生成的bound.h头文件,这个文件是生成模块必须的。
或者"make prepare"
这样就会重新生成bounds.h,搞定了!
再看看其内容:
#ifndef __LINUX_BOUNDS_H__
#define __LINUX_BOUNDS_H__
/*
* DO NOT MODIFY.
*
* This file was generated by Kbuild
*
*/
#define NR_PAGEFLAGS 19 /* __NR_PAGEFLAGS @ */
#define MAX_NR_ZONES 3 /* __MAX_NR_ZONES @ */
#endif
0 0
- 编译内核模块 .ko文件缺少:mmzone.h bounds.h
- 编译内核模块 .ko文件的注意事项 缺少:mmzone.h bounds.h
- 编译内核模块 .ko文件的注意事项 缺少:mmzone.h bounds.h
- 编译内核模块 .ko文件的注意事项 缺少:mmzone.h bounds.h
- 编译e1000 缺少:mmzone.h bounds.h
- 编译的时候提示缺少头文件 mmzone.h ....bounds.h
- include/linux/mmzone.h
- include/linux/mmzone.h
- linux 关于编译模块缺少config.h而…
- Andriod编译内核模块*.ko
- Andriod编译内核模块*.ko
- Andriod编译内核模块*.ko
- Andriod编译内核模块*.ko
- 模块编译KO文件Makefile 2.6内核通用
- 编译缺少mysql.h头文件的解决方案
- C++ 编译的时候缺少mex.h文件
- Linux内核编译 ko文件
- VS2008编译缺少atlrx.h的解决
- 11g RAC完全安装图解(VM Workstation8.0+Centos5.5)02-Oracle安装
- 用 Python 和 OpenCV 检测图片上的条形码
- 黑马程序员_面向对象(二)
- Could not find the main class: org.apache.catalina.startup.Boostrap. Program will exit
- Android开发之浅谈内容提供者provider的使用
- 编译内核模块 .ko文件缺少:mmzone.h bounds.h
- IOS游戏 与PHP服务器端的AES通讯加密
- 倒入appcompatv7项目各种报错问题汇总
- servlet生命周期,servlet与CGI的区别
- 关于error:Cannot assign to 'self' outside of a method in the init family
- 单元测试——NUnit测试简单实例
- 搜索引擎怎么做历史搜索词记录
- Linux: 使用 google chrome
- 浅析O2O崛起的原因与价值