繁体   English   中英

无法使用 hipy_defconfig 编译 u-boot

[英]Unable to compile u-boot with hikey_defconfig

我刚刚从 github 克隆了 u-boot

https://github.com/u-boot/u-boot.git

并尝试使用随机选择的 defconfig(特别是hikyy_defconfig)来构建它。

export ARCH=arm
export CROSS_COMPILE=/opt/linaro-7.2.1-2017.11/bin/arm-linux-gnueabi-
make hikey_defconfig
make all

一段时间后,这给了我以下错误:

{standard input}: Assembler messages:
{standard input}:36: Error: unexpected character `n' in type specifier
{standard input}:36: Error: bad instruction `b.ne 1b'
scripts/Makefile.build:280: recipe for target 'arch/arm/cpu/armv8/cpu.o' failed
make[1]: *** [arch/arm/cpu/armv8/cpu.o] Error 1
Makefile:1320: recipe for target 'arch/arm/cpu/armv8' failed
make: *** [arch/arm/cpu/armv8] Error 2

看起来像一个汇编错误。 我做错了什么?

Hikey 96Boards 使用 Kirin 920/Kirin 960 SoC:两者都实现了 ARMv8-A 64 位架构(Cortex-A73+Cortex-A53)或 Cortex-A53 - 见这里这里

因此,您应该使用 Linaro aarch64-linux-gnu 或 aarch64-elf 工具链,而不是您使用的 32 位工具链。

一个工作命令将是:

make CROSS_COMPILE=/opt/linaro/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin/aarch64-elf- mrproper hikey_defconfig all

您可以通过查看以下行中 configs/hikey_defconfig 中引用的 DTS 文件来检查您必须编译的体系结构:

CONFIG_DEFAULT_DEVICE_TREE="hi6220-hikey"

arch/arm/dts/hi6220-hikey.dts 包含 arch/arm/dts/hi6220.dtsi,其中包含说明 Hikey Soc 中包含的内核与哪种架构兼容的声明:
 cpu0: cpu@0 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x0>; enable-method = "psci"; }; cpu1: cpu@1 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x1>; enable-method = "psci"; }; cpu2: cpu@2 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x2>; enable-method = "psci"; }; cpu3: cpu@3 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x3>; enable-method = "psci"; }; cpu4: cpu@100 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x100>; enable-method = "psci"; }; cpu5: cpu@101 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x101>; enable-method = "psci"; }; cpu6: cpu@102 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x102>; enable-method = "psci"; }; cpu7: cpu@103 { compatible = "arm,cortex-a53", "arm,armv8"; device_type = "cpu"; reg = <0x0 0x103>; enable-method = "psci"; };

在您选择 Linaro 工具链为 Hikey 板编译 u-boot 时,这可能会为您提供指导。

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM