Compile a kernel in the debian with dpkg-buildpackage

Here is how to compile a debian way kernel using the apt-get source/dpkg-buildpackage way:

apt-get source linux-2.6-2.6.20
cd linux-2.6-2.6.20
vim debian/rules

change

$(MAKE) -f debian/rules.gen build-$(DEB_HOST_ARCH)

to

$(MAKE) -f debian/rules.gen build-i386-none-686-real

It will avoid to build for all architecture (486, k7, vserver …). Now create the package.

dch -i
fakeroot dpkg-buildpackage -d -b

To conclude I see no reason to use this method, make-kpkg is better.

#debian, #linux