I compile/create my own deb packages of kernel with:
make-kpkg --rootcmd fakeroot --initrd --append-to-version=$version --revision=1 kernel_image kernel_headers
But when I install both packages, in /lib/modules/(*name_kernel_compiled*) it creates two links, sources and build, pointing to folder with sources, from I've compiled.
sources link is correct but build should point to /usr/src/linux-(version kernel), don't you think?
The
/lib/modules/<version>/build
symlink should point to the build directory - ie, where the object files were placed during the kernel build. In your case, your source dir is the same as your build dir, so both symlinks will point to the same directory.The solution is in
make-kpkg
documentation: