QQ登录

只需一步,快速开始

 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 2751|回复: 6

求救,debian编译内核出错

[复制链接]
发表于 2006-10-10 10:01:35 | 显示全部楼层 |阅读模式
debian编译内核出错

make[1]: Leaving directory `/usr/src/linux-2.6.18'
/usr/bin/make EXTRAVERSION=noobu \
ARCH=i386 prepare
make[1]: Entering directory `/usr/src/linux-2.6.18'
scripts/kconfig/conf -s arch/i386/Kconfig
make[1]: Leaving directory `/usr/src/linux-2.6.18'
make[1]: Entering directory `/usr/src/linux-2.6.18'
CHK include/linux/version.h
UPD include/linux/version.h
CHK include/linux/utsrelease.h
UPD include/linux/utsrelease.h
SYMLINK include/asm -> include/asm-i386
CC arch/i386/kernel/asm-offsets.s
cc1: error: unrecognized option `-Wextra'
make[2]: *** [arch/i386/kernel/asm-offsets.s] 错误 1
make[1]: *** [prepare0] 错误 2
make[1]: Leaving directory `/usr/src/linux-2.6.18'
make: *** [stamp-kernel-configure] 错误 2


搞了半天,在网上搜索了半天,还是不能解决。
谁能告诉我是哪里出了错啊。。
多谢了。。
发表于 2006-10-10 10:45:40 | 显示全部楼层
首先你得看 /usr/src/linux/Documentation/Changes 这个文件,看你的软件都满足要求了没有。
然后按照 debian 的方法:
     # apt-get install debhelper dpatch kernel-package libncurses5-dev
     # apt-get install fakeroot
     # vi /etc/kernel-pkg.conf                # input name and email
     $ cd /usr/src                            # build directory
     $ tar --bzip2 -xvf kernel-source-2.4.18.tar.bz2
     $ cd kernel-source-2.4.18                # if this is your kernel source
     $ cp /boot/config-2.4.18-386 .config     # get current config as default
     $ make menuconfig                        # customize as one wishes
     $ make-kpkg clean                        # must run (per: man make-kpkg)
     $ fakeroot make-kpkg --append_to_version -486 --initrd \
             --revision=rev.01 kernel_image \
             modules_image # modules_image is for pcmcia-cs* etc.
     $ cd ..
     # dpkg -i kernel-image*.deb pcmcia-cs*.deb # install
这样下来不应该有错的。还有错那就提交 bug 吧。
回复

使用道具 举报

 楼主| 发表于 2006-10-11 10:11:51 | 显示全部楼层
多谢了,我再试一试。。
回复

使用道具 举报

 楼主| 发表于 2006-10-11 11:47:11 | 显示全部楼层
前面还有一段我没有注意到,如下:
RS:/usr/src/linux-2.6.18# make-kpkg --initrd --append-to-version=noobu --revision=1.0 kernel_image
Warning: The file include/linux/version.h exists
The contained UTS_VERSION string:
                        ""
does not match expectations:
                        "2.6.18noobu"
I'll try and recover
Warning: You are using the initrd option, that may not
work, depending on your kernel version and architecture,
unless you have applied the initrd cramfs patch to
the kernel, or modified mkinitrd not to use cramfs by
default. The  cramfs initrd patch, is included in the
Debian supplied kernel sources. New kernels on most
architectures do work fine.
By default, I assume you know what you are doing, and I
apologize for being so annoying. Should I abort[Ny]?


就是我输入命令后出现的,没有注意,回车就过去了,是不是错误在这里阿?
回复

使用道具 举报

发表于 2006-10-11 12:55:33 | 显示全部楼层
第一个 warning 是不是因为你没 make clean 啊, make-kpkg clean 。
第二个 warning 是说`--initrd‘选项不一定好用。基本上,不用管它。

还出错啊?不明白。我就是这么编译过好多回内核了,倒是都能用啊。
回复

使用道具 举报

 楼主| 发表于 2006-10-11 20:22:11 | 显示全部楼层
在makefile中去掉-Wextra后编译通过,但安装出现错误:

RS:/usr/src# dpkg -i kernel-image-2.6.18noobu_1.0_i386.deb
选中了曾被取消选择的软件包 kernel-image-2.6.18noobu。
(正在读取数据库 ... 系统当前总共安装有 40475 个文件和目录。)
正在解压缩 kernel-image-2.6.18noobu (从 kernel-image-2.6.18noobu_1.0_i386.deb)
...
正在设置 kernel-image-2.6.18noobu (1.0) ...
/usr/sbin/mkinitrd: /lib/modules/2.6.18noobu: Not a directory
/usr/sbin/mkinitrd: MODULES needs to be set to none?
Failed to create initrd image.
dpkg:处理 kernel-image-2.6.18noobu (--install)时出错:
子进程·post-installation script·返回了错误号·2
在处理时有错误发生:
kernel-image-2.6.18noobu
回复

使用道具 举报

发表于 2006-10-12 12:16:20 | 显示全部楼层
不明白。哪位大侠帮帮忙?
回复

使用道具 举报

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

本版积分规则

GMT+8, 2024-4-20 06:32 , Processed in 0.075696 second(s), 15 queries .

© 2021 Powered by Discuz! X3.5.

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