Debian kernel compilation

Posted on in category «Tech» by fnv with tags , , ,
cd /usr/src
# We get kernel from kernel.org site
wget http://www.kernel.org/pub/linux/kernel/v2.6/linux-XXX.tar.bz2
tar xjf linux-XXX.tar.bz2
rm linux
ln -s linux-XXX linux
cd linux-XXX
# Clean up in kernel directory
make-kpkg clean
# Copy old config
cp /boot/config-`uname -r` ./.config
make oldconfig
make menuconfig 
# For dualcore machines - 25% faster compilation
export CONCURRENCY_LEVEL=2
fakeroot make-kpkg --initrd --append-to-version=-custom  kernel_image  kernel_headers
cd ..
ls *.deb
sudo dpkg -i ./linux-image-XXX-custom_XXX-custom-10.00.Custom_i386.deb
sudo dpkg -i ./linux-headers-XXX-custom_XXX-custom-10.00.Custom_i386.deb
update-initramfs -c -k all
reboot