Search code examples
linuxcompiler-errorscompilationkernel

Compiling the kernel


I'm doing these steps to update the kernel from version 6.1.0-18-amd64 to version 6.7 but patching with version 6.8.

The steps are as follows:

tar xvf /usr/src/linux-6.7.tar.xz  
xzcat /usr/src/patch-6.8.xz | patch-p1  
cp /boot/config-$(uname-r) $HOME/kernel/linux-6.7/.config  # uname -r => 6.1.0-18-amd64  
make olddefconfig  
make localmodconfig  
make menuconfig  
make -j2

In the menuconfig I enable File Systems-> Btrfs filesystem support and Device Drivers-> Block Devices-> Loopback device support and I disable General setup-> Configure standard kernel features (expert users) and Kernel hacking-> Kernel debugging

These are the errors that appear
First error but continues

gcc: fatal error: Terminado (killed) signal terminated program cc1
compilation terminated.
make[4]: *** [scripts/Makefile.build:243: arch/x86/xen/setup.o] Error 1
make[3]: *** [scripts/Makefile.build:481: arch/x86/xen] Error 2
make[2]: *** [scripts/Makefile.build:481: arch/x86] Error 2
make[2]: *** Se espera a que terminen otras tareas....

Second error at the end

  AR      kernel/built-in.a
  CC [M]  kernel/configs.o
make[1]: *** [/usr/src/linux-6.7/Makefile:1921: .] Error 2
make: *** [Makefile:240: __sub-make] Error 2

It's an internship for a university subject and any help would be very good for me. Thank you in advance

I searched the internet for information about compiling the kernel but I couldn't find the same error


Solution

  • I already fixed the problem, it was just lack of ram.