I am trying to use make-kpkg (or another official way) to create a DEB kernel module that can be installed with the current running kernel. I have already built the kernel module source DEB and it installs the source to /usr/src/modules/. I have also installed the linux-source package and unzipped the source (now at /usr/src/linux-2.6.32). However, when I go into the Linux source, the following commands build packages for a kernel named 2.6.32.49+drm33.21 instead of Ubuntu's 2.6.32-37-server:
cd /usr/src/linux-2.6.32
chmod -R u+x debian/scripts/*
debian/rules updateconfigs
make modules_prepare
fakeroot make-kpkg --added-modules=target-core-mod,iscsi-target-mod modules_image
I have been following instructions at http://newbiedoc.sourceforge.net/system/kernel-pkg.html#THIRDPARTY-KERNEL-PKG. But it seems to imply that you are going to be building your own kernel-image to go with it.
How can I build kernel modules for existing Ubuntu kernels?