Chinaunix首页 | 论坛 | 博客
  • 博客访问: 417367
  • 博文数量: 120
  • 博客积分: 3125
  • 博客等级: 中校
  • 技术积分: 1100
  • 用 户 组: 普通用户
  • 注册时间: 2007-10-29 10:59
文章分类

全部博文(120)

文章存档

2012年(28)

2011年(22)

2010年(34)

2009年(1)

2008年(35)

我的朋友

分类: LINUX

2010-05-21 15:22:19


 

  1. Download and install the following required packages: fakeroot, kernel-wedge, build-essential, makedumpfile, kernel-package, libncurses5-dev.
  2. Download the kernel source:

apt-get build-dep –no-install-recommends linux-image-$(uname -r)

apt-get source linux-image-$(uname -r)

 

          This will install the kernel source in the current working directory.

  1. Enter into the kernel source directory:

cd linux-source-2.6.xx

  1. copy config file from current installation

cp /boot/config-x .config

  1. make oldconfig
  2. make menuconfig, and modify kernel config options according to need.
  3. Also make sure to disable CONFIG_DEBUG_INFO under “Kernel Hacking” in step 6 above. This ensures smaller size of resulting kernel package.
  4. Make necessary changes to the source code.
  5. export CONCURRENCY_LEVEL=, where X is the number of CPU cores in the system. This will ensure faster compilation.
  6. make-kpkg clean
  7. make-kpkg -initrd -append-to-version= kernel-image kernel-headers
  8. This will create kernel-image-*.deb and kernel-headers-*.deb in the .. directory.
  9. Install the kernel-image-*.deb and kernel-headers-*.deb using dpkg command:

dpkg –i kernel-image-*.deb

dpkg –I kernel-headers-*.deb

  1. Boot into the newly installed kernel

 

阅读(627) | 评论(0) | 转发(0) |
给主人留下些什么吧!~~