Beaglebone black kernel module build returns error

Hello,
I am quite new with Embedded Linux and Beaglebone black

I tried building kernel for beaglebone black using branch 4.9, 5.4 and 5.10 and i was able to build kernel successfully but after that i tried building kernel modules using following command:

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- modules -j8

And i get this error:
image

arm-linux-gnueabihf-gcc: fatal error: killed signal terminated program cc1 compilation terminated.

Kindly help , how can i fix it? Thanks a lot

what version of gcc?

The carl9170 is enabled by default…

Regards,

From linaro i downloaded and installed 13.0 version but i just realized its unstable. So i am going to try with a stable version. And sorry do i need to disable CARL_9170?
image

Use gcc 8.x, it’s what we’ve built 4.19.x-ti against for most of it’s development life…

https://mirrors.edge.kernel.org/pub/tools/crosstool/

https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.5.0/x86_64-gcc-8.5.0-nolibc-arm-linux-gnueabi.tar.xz

if you need something more complete grab from here: https://toolchains.bootlin.com/

Regards,