无法构建 Beaglebone Black 的 U-boot - 目标 CPU 不支持 THUMB 指令 [英] U-boot for Beaglebone Black won't build - target CPU does not support THUMB instructions
问题描述
我正在尝试按照 Chris Simmonds 的掌握嵌入式 Linux 编程"中的说明为 beagle bone black 构建 u-boot.我已经构建了交叉工具链,现在正在尝试使用该工具链构建 Das U-boot,但由于不支持 THUMB 指令(编译器?BeagleBone?),构建失败.我正在使用从 Denx 的 git 存储库 v2018.05 发布的最新版本.在 Ubuntu 18.04 上构建.
I am trying to build u-boot for beagle bone black following instructions in "Mastering Embedded Linux Programming" by Chris Simmonds. I have built the cross toolchain and am now trying to build Das U-boot with that tool chain and the build fails due to THUMB instructions not being supported (by the compiler? by the BeagleBone?). I am using the latest released from Denx's git repository v2018.05. Building on Ubuntu 18.04.
下面是控制台输出:
johann@mars:~/uboot-work/u-boot$ make CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf- am335x_evm_defconfig
#
# configuration written to .config
#
johann@mars:~/uboot-work/u-boot$ make CROSS_COMPILE=arm-cortex_a8-linux-gnueabihf-
scripts/kconfig/conf --silentoldconfig Kconfig
CHK include/config.h
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk
GEN include/autoconf.mk.dep
CFG spl/u-boot.cfg
GEN spl/include/autoconf.mk
CHK include/config/uboot.release
CHK include/generated/version_autogenerated.h
CHK include/generated/timestamp_autogenerated.h
UPD include/generated/timestamp_autogenerated.h
CC lib/asm-offsets.s
cc1: warning: target CPU does not support THUMB instructions
CHK include/generated/generic-asm-offsets.h
CC arch/arm/lib/asm-offsets.s
cc1: warning: target CPU does not support THUMB instructions
CHK include/generated/asm-offsets.h
HOSTCC scripts/dtc/dtc.o
HOSTCC scripts/dtc/flattree.o
HOSTCC scripts/dtc/fstree.o
HOSTCC scripts/dtc/data.o
HOSTCC scripts/dtc/livetree.o
HOSTCC scripts/dtc/treesource.o
HOSTCC scripts/dtc/srcpos.o
HOSTCC scripts/dtc/checks.o
HOSTCC scripts/dtc/util.o
SHIPPED scripts/dtc/dtc-lexer.lex.c
SHIPPED scripts/dtc/dtc-parser.tab.h
HOSTCC scripts/dtc/dtc-lexer.lex.o
SHIPPED scripts/dtc/dtc-parser.tab.c
HOSTCC scripts/dtc/dtc-parser.tab.o
HOSTLD scripts/dtc/dtc
HOSTCC tools/mkenvimage.o
HOSTCC tools/lib/crc32.o
HOSTLD tools/mkenvimage
HOSTCC tools/common/bootm.o
HOSTCC tools/lib/fdtdec.o
HOSTCC tools/fit_image.o
HOSTCC tools/image-host.o
HOSTCC tools/dumpimage.o
HOSTLD tools/dumpimage
HOSTCC tools/mkimage.o
HOSTLD tools/mkimage
CC arch/arm/cpu/armv7/cache_v7.o
cc1: warning: target CPU does not support THUMB instructions
{standard input}: Assembler messages:
{standard input}:42: Error: selected processor does not support `dsb sy' in ARM mode
make[1]: *** [arch/arm/cpu/armv7/cache_v7.o] Error 1
Makefile:1363: recipe for target 'arch/arm/cpu/armv7' failed
make: *** [arch/arm/cpu/armv7] Error 2
推荐答案
我也在看这本书,但遇到了同样的错误.我使用U-Boot的master分支解决了这个问题(日期:2019-03-19,操作系统:Ubuntu:18.04).
I am reading the book too and got the same error. I solved the problem by using the master branch of U-Boot (Date: 2019-03-19, OS: Ubuntu: 18.04).
然而,U-Boot 的 master 分支没有 am335x_boneblack_defconfig.我改用了 am335x_evm_defconfig.
However, the master branch of U-Boot doesn't have am335x_boneblack_defconfig. I used am335x_evm_defconfig instead.
尽管有这些编译问题,这本书还是很棒的.
In spite of those compiling issues, the book is excellent.
经过进一步调查,我发现根本原因是需要使用 ./ct-ng menuconfig 将 fpu-type 设置为neon-vfpv3".
正如书中指示将 float-abi 设置为 hard,fpu-type 也应设置为 neon-vfpv3.否则,Linux 内核和 Barebox/U-boot 都不会被编译.
As the book instructed to set the float-abi to hard, the fpu-type should be set to neon-vfpv3 too. Otherwise, both the Linux kernel and Barebox/U-boot will not be compiled.
这篇关于无法构建 Beaglebone Black 的 U-boot - 目标 CPU 不支持 THUMB 指令的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!