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

问题描述 投票:0回答:1
  1. 安装Cygwin和ARM工具链。
  2. 将工具链添加到PATH
  3. 构建u-boot
$ 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

如何让arm 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.
cross-compiling u-boot
1个回答
0
投票
make CROSS_COMPILE=arm-none-eabi- rpi_0_w_defconfig
根本没有交叉编译。编译主机代码以基于rpi_0_w_defconfig创建.config文件。因此,找不到x86编译器。您是否为x86安装了GCC?
© www.soinside.com 2019 - 2024. All rights reserved.