LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
查看: 680|回复: 3

关于内核编译的疑问

[复制链接]
发表于 2010-5-8 08:50:18 | 显示全部楼层 |阅读模式
参考http://www.debian.org/doc/manual ... ian_standard_method ,并在vmware里安装一台minmun os 环境,执行后却出问题,真搞不懂,原因到底是什么?谁来帮忙看看:
--------------------------------------------------------------------
1.install minimun os
2.
# aptitude install kernel-package build-essential libncurses5-dev fakeroot bzip2
# cd /usr/src
# wget http://www.kernel.org/pub/linux/ ... ux-2.6.33.3.tar.bz2
# tar -xjvf lnx-2.6.33.3.tar.bz2
# cd linux-2.6.33.3
# make defcofnig
# make menuconfig
...
... //我只取消了虚拟化这个。
# make-kpkg clean
# fakeroot make-kpkg --append_to_version -x86 --initrd --revision=rev.01 kernel_image modules_image

到了这步就报错:
-----------------------------------------------------------------
lguest.c:21:25: error: sys/eventfd.h: No such file or directory
lguest.c:37:18: error: zlib.h: No such file or directory
lguest.c: In function mcreate_thread:
lguest.c:1027: warning: implicit declaration of function eventfd
make[1]: *** [lguest] Error 1
make[1]: Leaving directory `/usr/src/linux-2.6.33.3/Documentation/lguest`
make: *** [debian/stamp/build/kernel] Error 2
#
-----------------------------------------------------------------

谢谢
发表于 2010-5-8 12:02:19 | 显示全部楼层
把lgest.c中21行的“#include <sys /eventfd.h>”删掉就行了。
没有zlib.h的话,试试装一下zlib1g-dev
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-5-8 13:21:36 | 显示全部楼层
thanks lifanxi
我照着你的提示处理了。
重新执行,#make-kpkg --append_to_version --initrd --revision=rev.01 kernel_image modules_image

又出错了:
---------------------------------------------------------------------
This is kernel package version 11.015.
echo "The UTS Release version in include/linux/version.h"; echo "    \"\"";
echo "does not match current version:";
echo "2.6.33.3";
echo "lease correct this."; exit 2
The UTS Release version in include/linux/version.h""
does not match current version: "2.6.33.3"
Please correct this.
make[1]: *** [debian/stamp/install/linux-image-2.6.33.3] Error 2
make[1]: Leaving directory '/usr/src/linux-2.6.33.3'
make: *** [kernel_image] Error 2
#
---------------------------------------------------------------------
我还能做点儿什么呢?
谢谢
回复 支持 反对

使用道具 举报

 楼主| 发表于 2010-5-8 16:12:12 | 显示全部楼层
http://fragarena.pl/porady-dotyc ... -33-fix-debian.html

----------------------------------------------------------------------

这个好像是说的解决,但是,在我的机器上没找到/etc/kernel/postinst.d/initramfs-tools ;

未果。。。

郁闷
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表