Chinaunix首页 | 论坛 | 博客
  • 博客访问: 95798
  • 博文数量: 20
  • 博客积分: 542
  • 博客等级: 中士
  • 技术积分: 249
  • 用 户 组: 普通用户
  • 注册时间: 2012-05-10 16:47
文章分类
文章存档

2013年(1)

2012年(19)

我的朋友

分类: LINUX

2012-05-14 09:52:07

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

最近在做framebuffer驱动,make过程中出现了上述错误,百思不得其解,找了N久也找不到问题出在哪里!百度是不行了,google吧!看来会点英文还是有点用的!

I just ran into the same problem. The "bounds.h" header is created by the
kernel. Maybe you've done a "make clean" or "make distclean" in your kernel
sources before?

So go to "/usr/src/linux" and do a "make prepare". This will generate the
missed "bounds.h" for you. After that, emerge "lirc" again. Worked fine for
me...说下大致的意思吧:bounds.h是在编译内核时生成的,类似于编译产生的.o文件,如果你运行
"make clean" or "make distclean",这个文件就会被清除掉(详情查看内核Makefile)。
因此,如果再利用此内核源码编译内核模块,如果有涉及bounds.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
阅读(1113) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~