Reputation: 8268
I just cloned the u-boot from github
https://github.com/u-boot/u-boot.git
and trying to build it with randomly chosen defconfig (specifically hikey_defconfig).
export ARCH=arm
export CROSS_COMPILE=/opt/linaro-7.2.1-2017.11/bin/arm-linux-gnueabi-
make hikey_defconfig
make all
This gives me the following error after sometime :
{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
Looks like an assembler error. What am I doing wrong?
Upvotes: 1
Views: 2299
Reputation: 5895
The Hikey 96Boards are using Kirin 920/Kirin 960 SoCs: both are implementing the ARMv8-A 64 bits architecture (Cortex-A73+Cortex-A53), or Cortex-A53 - see here and here
You should therefore use the Linaro aarch64-linux-gnu or aarch64-elf toolchains, not the 32 bits toolchain you were using.
A working command would then be:
make CROSS_COMPILE=/opt/linaro/gcc-linaro-7.2.1-2017.11-x86_64_aarch64-elf/bin/aarch64-elf- mrproper hikey_defconfig all
You could have checked the architecture you had to compile for by looking at the DTS file referenced in configs/hikey_defconfig at the following line:
CONFIG_DEFAULT_DEVICE_TREE="hi6220-hikey"
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";
};
Upvotes: 7