-1

I have built Linux kernel from source with make and make modules_install. But I issue the install command:

$ sudo make -j8 V=1 install
arch/x86/Makefile:142: CONFIG_X86_X32 enabled but no binutils support
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (        \
echo >&2;                           \
echo >&2 "  ERROR: Kernel configuration is invalid.";       \
echo >&2 "         include/generated/autoconf.h or include/config/auto.conf are missing.";\
echo >&2 "         Run 'make oldconfig && make prepare' on kernel src to fix it.";  \
echo >&2 ;                          \
/bin/false)
sh ./arch/x86/boot/install.sh 5.15.10 \
    arch/x86/boot/bzImage System.map "/boot"
run-parts: executing /etc/kernel/postinst.d/apt-auto-removal 5.15.10 /boot/vmlinuz-5.15.10
run-parts: executing /etc/kernel/postinst.d/dkms 5.15.10 /boot/vmlinuz-5.15.10
 * dkms: running auto installation service for kernel 5.15.10                                                      
Kernel preparation unnecessary for this kernel.  Skipping...

Building module: cleaning build area...... make KERNELRELEASE=5.15.10 all INCLUDEDIR=/lib/modules/5.15.10/build/include KVERSION=5.15.10 DKMS_BUILD=1 ...

This command goes on for hours. What is really going?

sal_guy
  • 119
  • 4
  • 2
    @Nmath why would this be about Arch? The ./arch there is the subdirectory of the kernel build tree. It is shorthand for "architecture" as in "x86 architecture", it isn't about Arch Linux. – terdon Dec 24 '21 at 08:56
  • You perhaps need a better processor? I run a 2nd gen threadripper and a recent kernel takes about 7 minutes: https://www.linuxquestions.org/questions/slackware-14/kernel-build-time-4175691322/page2.html#post6226386 – andrew.46 Dec 28 '21 at 03:43

1 Answers1

4

From the output you show, it looks like your machine is recompiling all of the kernel modules you have, to work with the new kernel. That's what dkms (Dynamic Kernel Module Support) does. Since this is compilation, it is expected to take quite a long time.

As long as you keep seeing output there (there should be various compilation messages), there should be no problem and it will finish. Eventually.

terdon
  • 100,812
  • The problem is that it cleans the build area, and therefore the whole kernel is again built by this service (dkms). On top of that, it does not parallelize the whole process and takes a lot of time. How to parallelize the build process?

    And is there anyway to not use this installkernel approach to deploy a new kernel? I just want to deploy the newly built kernel with a procedure to build all the kernel modules with the new kernel. dkms tries to automate the process, but it is very slow and unnecessarily cleans the build area.

    – sal_guy Dec 28 '21 at 23:05