Bernardo Lopes Bernardo Lopes - 1 year ago 91
Linux Question

Ubuntu 14.04 - Kernel fails to compile with make-kpkg

I've been assigned a group work where we need, among other tasks, to disable ipv6 support in the kernel configuration and then recompile and install the new kernel.

I'm running Ubuntu 14.04LTS on VirtualBox with Linux kernel version 3.19.0-generic.
I've tried doing this with a tutorial I found, making use of Debian's make-kpkg, since I can quickly edit the config and set the CONCURRENCY_LEVEL. I've used this command:

$ fakeroot make-kpkg --initrd --revision 3.19.08 --jobs 4 --config menuconfig kernel-image kernel-headers

The kernel compiled for some time, but in the end I got the error:

make: *** [debian/stamp/build/kernel] Error 2

I've tried two more times and the result was the same, no other error. Following the guide on I was able to compile the kernel without errors, but I couldn't set the number of jobs and must have made some mistake configuring the kernel, since ipv6 was still active after installing the new kernel.

I've searched a lot for good tutorials, but I can't really understand the debian/rules method that the guide uses. Is there a simpler way? Or a reason for the make-kpkg error?

Answer Source

I ended up using this command make -j 5 KDEB_PKGVERSION=1.fsoubuntu deb-pkg and it worked wonders.