探讨Linux Debian系统编译内核

本文讨论linux Debian版本,Linux Debian系统中用源码编译自定义内核要特别小心,make-kpkg kernel_image执行了 make oldconfig 和 make dep.如果没使用 initrd 就不要使用。
首页 新闻资讯 行业资讯 探讨Linux Debian系统编译内核

linux经过长时间的发展,很多用户都很了解 linux Debian 这一版本,这里讨论一下Debian 标准方式。

关心一下有关 kernel-package、gcc、binutils 和 modutils 的错误报告。在需要时使用较新的版本。

在 linux Debian系统中用源码编译自定义内核要特别小心。用 make-kpkg 的 ——append_to_version 选项来创建多重内核镜像比较安全。

# apt-get install debhelper modutils kernel-package libncurses5-dev

# apt-get install kernel-source-2.4.18 # 使用最新版本

# apt-get install fakeroot

# vi /etc/kernel-pkg.conf # 输入我的名字和 email

$ cd /usr/src # 创建目录

$ tar ——bzip2 -xvf kernel-source-2.4.18.tar.bz2

$ cd kernel-source-2.4.18 # 如果这是你的内核源码

$ cp /boot/config-2.4.18-386 .config # 将当前配置设定为默认配置

$ make menuconfig # 按自己的喜好来定制

$ make-kpkg clean # 必须执行这步(per: man make-kpkg)

$ fakeroot make-kpkg ——append_to_version -486 ——initrd ——revision=rev.01 kernel_image modules_image # modules_image 可以是 pcmcia-cs* 等。

$ cd ……

# dpkg -i kernel-image*.deb pcmcia-cs*.deb # 安装

make-kpkg kernel_image 实际上执行了 make oldconfig 和 make dep.如果没使用 initrd 就不要使用 ——initrd 选项。

如果想加载 pcmcia-cs 模块或内核 pcmcia 源码中没有的模块,应该在 make menuconfig 后选“General setup —>”进入“PCMCIA/CardBus support —>”,配置“< > PCMCIA/CardBus support”选项(例如,取消复选项)。

以上给大家详细讲解了linux Debian 的标准版本。


【编辑推荐】

  1. NVIDIA驱动开发者称Linux驱动下载量很少

  2. 系统实现SCSI硬盘热插拔及在线识别步骤

  3. 轻松了解打印之CUPS软件

  4. 讲解基础命令之:man、reboot

  5. linux gcc版本升级了

6    2009-10-23 16:35:44    linux Debian