1. Install these packages
sudo apt-get install fakeroot dpkg-dev libncurses5-dev kernel-package
2. Create your source directory
mkdir ~/src
cd ~/src
3. Download the Kernel source
apt-get source linux-image-$(uname -r)
4. Configure your Kernel
cd linux-3.0.0
make menuconfig
5. Speed up the build
export CONCURRENCY_LEVEL=3
General rule, concurrency level = number of processor cores + 1
6. Clean up temp files from a previous compile attempt (skip if necessary)
make-kpkg clean
7 Compile your Kernel
time fakeroot make-kpkg --initrd --append-to-version=-tweak kernel-image kernel-headers
You can change -tweak to anything you wish
8. Install your Kernel
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. Reboot
Your recompiled Kernel should automatically load.
CONCURRENCY_LEVEL= [1 per core +1] has been proven to generally be slower than [number of cores.] People say "rule of thumb" but the truth is that it varies from proc to proc. And generally there are more proc's out there that run better with the exact value rather than the +1.
ReplyDeleteIn my experience, if you time the build both ways, the 1 per number of cores has come out better on all AMD proc's and if you search around, you'll see that most Intel procs result the same. I know it's a tedious deduction, but should be noted.
Been there and done that, I am a firm believer in +1 but by all means people should experiment to see what works best for them.
ReplyDelete