8

I would like to know the exact difference between make-kpkg and make deb-pkg . This question asks almost the same thing but with no satisfying answers. Previously I was using

make -j `getconf _NPROCESSORS_ONLN` deb-pkg

to compile the kernel source tree and to generate header+kernel-image debian packages. I found that it is extremely slow as it takes more than 1 hour to compile on my 2nd gen Intel i3 CPU. Then I found another method using make-kpkg which is 5-6 times faster than deb-pkg method I used before. The code I run

fakeroot make-kpkg --initrd --append-to-version=-custom kernel_image kernel_headers  -j `getconf _NPROCESSORS_ONLN`

and it takes only just 10-15 minutes to compile and generate the deb packages. In both the compilation process, jobs are divided for _NPROCESSORS_ONLN then what makes this difference? Thanks in advance.

  • 2
    make-kpkg is maintained by that script writer (most likely those Debian people), and make deb-pkg is maintained by the kernel guys. The Debian people may know more. – Arthur2e5 Oct 25 '15 at 7:43
  • 1
    Additionally, those backticks in your command is failing in stackexchange. Either wrap two backticks around those commands or use -j $(getconf blah) instead of -j `getconf blah` . – Arthur2e5 Oct 25 '15 at 7:44
  • @Arthur2e5, correct. Also, when it comes to integrating linux-image-*.deb and linux-headers-*.deb etc into the distribution, the make-kpkg tool is far more likely to be updated to take advantage of other kernel related helpers in the distro (e.g. dkms and update-initramfs and others). The kernel Makefile deb-pkg target probably only gets worked on if it breaks. – cas Oct 25 '15 at 9:03
5

make-kpkg is (being) retired, the official Debian way is make deb-pkg.
The official Debian kernel handbook uses make deb-pkg.

make-kpkg is included in wheezy and jessie but stretch (current stable) only contains it for powerpc.

Powerpc is no longer supported in buster (testing), and unsurprisingly the only hit for filenames containing make-kpkgis an autocompletion info file for zsh.

That would clearly indicate which one of both is the preferred option of Debian.

(However, if you are testing what works and what not, recompiling a lot, you may want to remove the "make clean" from scripts/packages/Makefile as a first step. After all, even make-kpkg is aimed at creating a Debian package from a working kernel source and config, not kernel programming and debugging.)

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.