%1,安裝軟件包:
sudo apt-get install fakeroot dpkg-dev libncurses5-dev kernel-package
%2,創建source directory
mkdir ~/src
cd ~/src
%3,下載內核源碼
apt-get source linux-image-$(uname -r)
%4,配置內核
cd linux-3.0.0
make menuconfig
%5,加速構建
export CONCURRENCY_LEVEL=3
一般說來, concurrency level = number of processor cores 1
%6,清理臨時文件
make-kpkg clean
%7,編譯內核
time fakeroot make-kpkg –initrd –append-to-version=-tweak kernel-image kernel-headers
你可以將-tweak 換成你希望的
%8,安裝內核
cd ~/src
sudo dpkg -i linux-image-3.0.6-tweak_3.0.6-tweak-10.00.Custom_amd64.deb
sudo dpkg -i linux-headers-3.0.6-tweak_3.0.6-tweak-10.00.Custom_amd64.deb
%9,重啟計算機