探讨Linux Debian系统编译内核

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

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版本升级了
责任编辑:薛辈辈 来源: linux
相关推荐

2010-02-02 13:26:53

Linux内核

2009-12-30 16:38:44

Ubuntu内核

2010-01-04 18:56:06

Ubuntu内核

2023-06-12 14:46:17

DebianDebian 12

2010-03-02 15:47:39

Linux内核系统

2010-02-02 17:57:47

Linux PPStr

2017-03-27 18:05:49

Linux内核编译与开发

2009-10-27 15:06:15

Linux内核启动

2020-10-18 07:13:44

Linux系统编程信号捕捉

2020-10-10 07:18:14

Linux系统编程管道

2020-09-26 21:43:59

Linux系统编程条件变量

2020-10-05 22:01:02

Linux系统编程线程属性

2023-02-22 09:56:52

DebianLinux

2010-01-14 16:27:44

CentOS emes

2011-01-04 17:00:32

Linux内核编译

2010-03-02 16:13:56

Linux升级

2009-12-17 15:18:47

2009-10-16 09:45:41

Linux内核操作系统

2023-10-05 15:47:04

Linux内核编译

2010-01-12 18:05:56

Linux Redha
点赞
收藏

51CTO技术栈公众号