This article is about steps to cross-compile arm64 linux kernel, and common error when you building. You could build it in X86-64 OS or direct under aarch64 OS
Build Kernel:
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- distclean vexpress_defconfig// this is for default config
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- -j4 Image
make ARCH=arm64 CROSS_COMPILE=aarch64-linux-gnu- modules
Common error:
/bin/sh: bc: command not found kernel/time/Makefile:32:
recipe for target 'kernel/time/timeconst.h' failed
make[2]: *** [kernel/time/timeconst.h] Error 127
scripts/Makefile.build:402: recipe for target 'kernel/time' failed
make[1]: *** [kernel/time] Error 2
Makefile:937: recipe for target 'kernel' failed
make: *** [kernel] Error 2