LinuxSir.cn,穿越时空的Linuxsir!

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

关于编译新版内核的一些说明。

[复制链接]
发表于 2003-6-22 01:19:22 | 显示全部楼层 |阅读模式
先看这个贴的讨论:
http://groups.google.com/groups? ... .bofh.it%26rnum%3D1

也就是说从 versions 2.5.48 以后,我们得使用新得操纵内核模块工具。
解释是:
The userspace module API has changed.
apt-get -f install module-init-tools

Superman:~# apt-cache show module-init-tools
Description: tools for managing Linux kernel modules
This package contains a set of programs for loading, inserting, and
removing kernel modules for Linux (versions 2.5.48 and above). It serves
the same function that the "modutils" package serves for Linux 2.4.

老的:
Superman:~# apt-cache show modutils
Description: Linux module utilities.
These utilities are intended to make a Linux modular kernel
manageable for all users, administrators and distribution
maintainers.

编译新内核的朋友们如果碰到问题,不防先检查一下 module-init-tools 装了吗! :)
 楼主| 发表于 2003-6-22 02:04:01 | 显示全部楼层

编译 2.5.69 内核发现的几个容易出错的问题

1)
问题:
使用 debian 提供的 2.5.69 内核,编译安装还算正常。
用新内核启动:
.......................................
uncompressing the kernel Ok, booting the kernel..............
还刚开始引导,到这里就下不去了。

解决方法:
googel 查了一下,原因如下:
cd /usr/src/linux
vi .config        ( .config 为内核配置文件 )
找到选项,在 Input device support 位置:
CONFIG_INPUT=m
默认是 "m" ,而正确应该是 "y",因为 CONFIG_VT(VT 指 virtual terminal)需要它,否则引导时在 virtual console 下你是看不到任何输出的,这里很容易选错,同志们注意了。

正确作法:
CONFIG_INPUT=y

参考贴:
http://www.linuxjournal.com/comm ... er=&thold=#6481

2)
问题:
还发现默认 CONFIG_VT 没设置 ,属于 Character devices :
# Character devices
#
# CONFIG_VT is not set
这个很重要,看内核文档说明:
  x CONFIG_VT:                                                                         x   
  x                                                                                    x   
  x If you say Y here, you will get support for terminal devices with                  x   
  x display and keyboard devices. These are called "virtual" because you               x   
  x can run several virtual terminals (also called virtual consoles) on                x   
  x one physical terminal. This is rather useful, for example one                      x   
  x virtual terminal can collect system messages and warnings, another                 x   
  x one can be used for a text-mode user session, and a third could run                x   
  x an X session, all in parallel. Switching between virtual terminals                 x   
  x is done with certain key combinations, usually Alt-<function key>.                 x   
  x                                                                                    x   
  x The setterm command ("man setterm") can be used to change the                      x   
  x properties (such as colors or beeping) of a virtual terminal. The                  x   
  x man page console_codes(4) ("man console_codes") contains the special               x   
  x character sequences that can be used to change those properties                    x   
  x directly. The fonts used on virtual terminals can be changed with                  x   
  x the setfont ("man setfont") command and the key bindings are defined               x   
  x with the loadkeys ("man loadkeys") command.                                        x   
  x                                                                                    x   
  x You need at least one virtual terminal device in order to make use                 x   
  x of your keyboard and monitor. Therefore, only people configuring an                x   
  x embedded system would want to say N here in order to save some                     x   
  x memory; the only way to log into such a system is then via a serial                x   
  x or network connection.                                                             x   
  x                                                                                    x   
  x If unsure, say Y, or else you won't be able to do much with your new               x   
  x shiny Linux system :-)                                                            

正确作法:#
# Character devices
#
CONFIG_VT=y
CONFIG_VT_CONSOLE=y
CONFIG_HW_CONSOLE=y


3)
在 Graphics support -> Console display driver support
# Console display driver support
#
# CONFIG_VGA_CONSOLE is not set
# CONFIG_MDA_CONSOLE is not set
# CONFIG_FRAMEBUFFER_CONSOLE is not set
就是说控制台 VGA 支持和 Framebuffer 支持默认都未设置,相信很多人都需要。

正确配置:
# Console display driver support
#
CONFIG_VGA_CONSOLE=y
CONFIG_DUMMY_CONSOLE=y
CONFIG_FRAMEBUFFER_CONSOLE=m
CONFIG_PCI_CONSOLE=y
CONFIG_FONTS=y
CONFIG_FONT_8x8=y
CONFIG_FONT_8x16=y
#

4)
如果你没有 scsi 设备,请去掉不需要的 scsi 选项,不然很容易出错。

以上是一些经验,其它选项大家自己琢磨,make menuconfig 修改上面的选项比较容易。
发表于 2003-7-5 00:00:21 | 显示全部楼层
Uncompress kernel 之后进行不下去是个假象吧
其实那个时候还在booting,只是没法显示

当然,我说的这个问题没有实际意义
还是要重新编一下...

我也出现过这个问题,谢谢quanliking~~~~
您需要登录后才可以回帖 登录 | 注册

本版积分规则

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