1. Install some relative packages
sudo apt-get install build-essential fakeroot kernel-package libncurses5-dev libgtk2.0-dev libglib2.0-dev libglade2-dev
libncurses5-dev for menuconfig, libgtk2.0-dev libglib2.0-dev libglade2-dev for gconfig
2. Download the kernel package and unzip it to /usr/src, and cd to this path
3. Patch new kernel
Download the patch, for example, patch.bz2
sudo bzip2 -dc /usr/src/patch.bz2 | patch -p1 --dry-run
sudo bzip2 -dc /usr/src/patch.bz2 | patch -p1
remember, your are in /usr/src/(your new kernel folder) now
the first command is just a test, the next one make effort to your new kernel
4. Config, maybe a current-config file is a good choice
sudo cp /boot/config-`uname -r` ./.config
sudo make menuconfig
then, choose "Load an Alternate Configuration File", choose ".config", and "OK", when you exit, it alarm "Do you wish to save your new kernel configuration?", choose "yes"
5. Build the kernel
sudo make-kpkg clean
sudo fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers
with --append-to-version= option, you can add some custom description to your new kernel, remember with a '-' ahead.
6. Install new kernel
now new kernel has been built and you can install it to your OS, two new deb packages are now in /usr/src
sudo dpkg -i *.deb
then, check is any changed in /boot/grub/menu.lst
7. Reboot your machine
Now you can reboot your machine with new kernel
Enjoy it!
aaa12 于 2011-12-21 13:54:59发表:
thank you for you share for information!
lbjventure1 于 2011-09-18 10:39:37发表:
:0w5ty(1
chaipeng 于 2011-08-17 12:26:06发表:
老鸟!!!
chengweiwei 于 2011-05-20 15:44:57发表:
(3):os你出现的错误呢?