我使用 ubuntu 作为主机来交叉编译 raspberry pi 3b+ 作为目标。我尝试使用以下命令:
sudo make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- -C /home/ubuntu/Desktop/workspace/linux M=$PWD modules
但是当我使用此命令时,它出现以下错误:
make: Entering directory '/home/ubuntu/Desktop/workspace/linux'
ERROR: Kernel configuration is invalid.
include/generated/autoconf.h or include/config/auto.conf are missing.
Run 'make oldconfig && make prepare' on kernel src to fix it.
/home/ubuntu/Desktop/workspace/linux/Makefile:741: include/config/auto.conf: No such file or directory
make[1]: *** [/home/ubuntu/Desktop/workspace/linux/Makefile:806: include/config/auto.conf] Error 1
make: *** [Makefile:234: __sub-make] Error 2
make: Leaving directory '/home/ubuntu/Desktop/workspace/linux'
在此目录中:
/home/ubuntu/桌面/工作区/linux
我克隆了https://github.com/raspberrypi/linux。
我怎样才能摆脱这个问题?