如何在cygwin上交叉编译u-boot?


  1. install Cygwin & ARM 工具链。
  2. 将工具链添加到路径中
  3. 构建 U-引导
$ make CROSS_COMPILE=arm-none-eabi- rpi_0_w_defconfig
HOSTCC  scripts/basic/fixdep
/bin/sh: cc: command not found
make[1]: *** [scripts/Makefile.host:97: scripts/basic/fixdep] Error 127
make: *** [Makefile:458: scripts_basic] Error 2

如何让手臂GCC编译器被识别?

更新:

c编译器问题是因为我使用了MinGW。通过Cygwin安装程序安装GCC解决了它。现在在make之后遇到了另一个问题.

scripts/kconfig/conf  --syncconfig Kconfig
CHK     include/config.h
CFG     u-boot.cfg
In file included from include/config.h:5,
from ./include/common.h:22:
include/configs/rpi.h:10:10: fatal error: asm/arch/timer.h: No such file or dire
ctory
10 | #include <asm/arch/timer.h>
|          ^~~~~~~~~~~~~~~~~~
compilation terminated.
make[1]: *** [scripts/Makefile.autoconf:77: u-boot.cfg] Error 1
make: *** No rule to make target 'include/config/auto.conf', needed by 'include/config/uboot.release'.  Stop.
make CROSS_COMPILE=arm-none-eabi- rpi_0_w_defconfig

根本不是交叉编译。编译主机代码以基于rpi_0_w_defconfig创建 .config 文件。所以找不到的是 x86 编译器。您是否安装了 x86 的 GCC?

最新更新