#make ARCH=arm64
gcc: error: unrecognized command line option ‘-mlittle-endian’
gcc: error: unrecognized command line option ‘-mgeneral-regs-only’
scripts/Makefile.build:279: recipe for target 'scripts/mod/empty.o' failed
make[1]: *** [scripts/mod/empty.o] Error 1
Makefile:1205: recipe for target 'prepare0' failed
make: *** [prepare0] Error 2
单独编译xilinx-kernel-source-5.10内核版本,报这个错误。
解决方法:
export CROSS_COMPILE=aarch64-linux-gnu-
原来是没有指定交叉编译工具。设置CROSS_COMPILE环境变量即可。
这个编译器和编译器所在的环境变量都已经在安装petalinux时安装好了。此处不需要重新安装,只需要设置CROSS_COMPILE环境变量即可。