Kernel – Error Compiling Kernel 2.6.35-25.44

10.0410.10kernel

I downloaded the linux-source-2.6.35 package and tried to compile it using the command "fakeroot make-kpkg –append-to-version=.dbg kernel_image kernel_source kernel_headers –initrd" after "make menuconfig".

The image .deb file is produced and installs fine, but an error stops the build process while trying to make the source package:


scripts/Makefile.clean:17: /home/ade/linux-source-2.6.35/debian/linux-source-2.6.35.10.dbg/usr/src/linux-source-2.6.35.10.dbg/crypto/Makefile: No such file or directory
make[1]: *** No rule to make target `/home/ade/linux-source-2.6.35/debian/linux-source-2.6.35.10.dbg/usr/src/linux-source-2.6.35.10.dbg/crypto/Makefile'.  Stop.
make: *** [_clean_crypto] Error 2

Sure enough, the folder linux-source-2.6.35/debian/linux-source-2.6.35.10.dbg/usr/src/linux-source-2.6.35.10.dbg/crypto does not exist (although all of the other kernel source folders appear to be there).

I haven't even been able to determine where the folder is supposed to be copied over, or what's supposed to invoke clean. Am I doing something wrong here? It should be noted that I am running 10.04.

Best Answer

One of the kernel package scripts wasn't working right, so it was trying to copy crypto.master and failing. Below is a patch I made to fix it, although the source package still doesn't include the debian and debian.master folders outside the tar archive like the official Ubuntu kernel source packages.


--- /usr/share/kernel-package/ruleset/targets/source.mk 2009-08-21 09:47:53.000000000 -0400
+++ /usr/share/kernel-package/ruleset/targets/source.mkmod  2011-02-28 14:42:22.000000000 -0500
@@ -64,12 +64,10 @@ debian/stamp/install/$(s_package):
 ####
 ######################################################################
 ifneq ($(strip $(int_follow_symlinks_in_src)),)
-   -tar cfh - $$(echo * | sed -e 's/ debian//g' -e 's/\.deb//g' ) |       \
-   (cd $(SRCDIR); umask 000; tar xpsf -)
+   -(umask 000; find . -mindepth 1 -maxdepth 1 -not -name '*.deb' -not -name 'debian*' -exec cp -Lr {} $(SRCDIR) \;; )
    (cd $(SRCDIR)/include; rm -rf asm ; )
 else
-   -tar cf - $$(echo * | sed -e 's/ debian//g' -e 's/\.deb//g' ) |         \
-   (cd $(SRCDIR); umask 000; tar xspf -)
+   -(umask 000; find . -mindepth 1 -maxdepth 1 -not -name '*.deb' -not -name 'debian*' -exec cp -r {} $(SRCDIR) \;; )
    (cd $(SRCDIR)/include; rm -f asm ; )
 endif
    $(install_file) debian/changelog      $(SRCDIR)/Debian.src.changelog
Related Question