Debian Kernel

Basic quick instructions for compiling a Debian Kernel

apt-get install kernel-package ncurses-dev fakeroot wget bzip2 linux-source-x.y.z

cd /usr/src tar xjf linux-x.y.z.tar.gz   ln -s /usr/src/linux-x.y.z /usr/src/linux

cd linux nano Makefile (change name, add "-whatever") make menuconfig

Make all your needed changes then save and exit

make-kpkg clean fakeroot make-kpkg --initrd kernel_image dpkg -i linux-image-x.y.z.deb

To apply a patch: patch -p1 < ../patch-x.y.z

To apply a gzip patch: zcat path/to/patch-x.y.z.gz | patch -p1

To apply a bzip patch: bzcat path/to/patch-x.y.z.bz2 | patch -p1

To remove a patch: patch -R -p1 < ../patch-x.y.z