gpt4 book ai didi

linux - 无法使用 hikey_defconfig 编译 u-boot

转载 作者:塔克拉玛干 更新时间:2023-11-03 01:55:20 25 4
gpt4 key购买 nike

我刚从github上克隆了u-boot

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

并尝试使用随机选择的 defconfig(特别是 hikey_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 - 参见 herehere

因此,您应该使用 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";
};

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

关于linux - 无法使用 hikey_defconfig 编译 u-boot,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/48994690/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com