#!/bin/bash
#get kernel sources from kernel.org
#untar them to /usr/src/linux
cd /usr/src/linux
cp /tmp/trunk-cfg .config
make oldconfigapt-get install dpkg-dev
make -j 9 KDEB_PKGVERSION=001 deb-pkg
dpkg -i ../linux-image-XXXXX_001_i386.deb
dpkg -i ../linux-initrd-XXXXX_001_i386.deb
dpkg -i ../linux-*#CPU core count for option -j = num availibale CPU cores + 1
echo $(($(cat /proc/cpuinfo | grep -c processor)+1))
#Custom configuration kernel parameters:
make menuconfig
# Also need install ncurses devel package:
apt-get install libncurses5-dev
This talk is a hands on guide for someone who has never compiled a program under linux before, or someone who has never tried to compile a package from source.