Best way to build a kernel module *on* the Beaglebone Black?

While on my BBB, I tried to follow the directions for building a kernel from here:
https://eewiki.net/display/linuxonarm/BeagleBone+Black

Unfortunately, when I try to do ./build-kernel.sh to populate everything to deploy, git dies with “error: index-pack died of signal 9555”. Presumably, it runs out of RAM.

So, what’s the best way to build kernel modules on the BBB for 4.1.6?

Thanks.

Never build anything “on” the BBB… It takes WAY too long.

If you install one of the kernels thru apt, just:

sudo apt-get install linux-headers-`uname -r`

Regards,