[U-Boot] build u-boot failed with config CONFIG_ARMV8_PSCI by aarch linux gcc 8.1

Li, Meng Meng.Li at windriver.com
Thu Sep 20 06:40:21 UTC 2018


Hi All maintainers,

Could you please help to have a look whether below issue is valuable?

I got u-boot source code from https://github.com/u-boot/u-boot.git, branch is master.
I got toolchain from https://mirrors.edge.kernel.org/pub/tools/crosstool/files/bin/x86_64/8.1.0/

I built stratix10(socfpga) platform with below commands:
export CROSS_COMPILE=xxx/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-
export ARCH=arm64
make mrproper
make socfpga_stratix10_defconfig
make

there will be below error:
  LD      u-boot
/home/wrsadmin/Project/Native/SDK/Altera-Arria-10/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld.bfd: arch/arm/cpu/armv8/built-in.o: relocation R_AARCH64_ABS32 against `psci_cpu_suspend' can not be used when making a shared object
/home/wrsadmin/Project/Native/SDK/Altera-Arria-10/gcc-8.1.0-nolibc/aarch64-linux/bin/aarch64-linux-ld.bfd: arch/arm/mach-socfpga/built-in.o: relocation R_AARCH64_ABS32 against `el3_exception_vectors' can not be used when making a shared object
arch/arm/mach-socfpga/built-in.o: In function `wfi_loop':
smmu_s10.c:(._secure.text+0x758): dangerous relocation: unsupported relocation
smmu_s10.c:(._secure.text+0x760): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x8): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x18): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x28): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x38): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x48): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x58): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x68): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x78): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x88): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(._secure_svc_tbl_entries+0x98): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:/home/wrsadmin/Project/Native/SDK/Altera-Arria-10/u-boot-socfpga/arch/arm/mach-socfpga/clock_manager.c:68:(.u_boot_list_2_cmd_2_clocks+0x0): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_clocks+0x10): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_clocks+0x18): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_clocks+0x20): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:/home/wrsadmin/Project/Native/SDK/Altera-Arria-10/u-boot-socfpga/arch/arm/mach-socfpga/misc_s10.c:382:(.u_boot_list_2_cmd_2_bridge+0x0): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_bridge+0x10): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_bridge+0x18): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_bridge+0x20): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.data.mem_map+0x0): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:/home/wrsadmin/Project/Native/SDK/Altera-Arria-10/u-boot-socfpga/arch/arm/mach-socfpga/rsu_s10.c:262:(.u_boot_list_2_cmd_2_rsu+0x0): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_rsu+0x10): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_rsu+0x18): dangerous relocation: unsupported relocation
arch/arm/mach-socfpga/built-in.o:(.u_boot_list_2_cmd_2_rsu+0x20): dangerous relocation: unsupported relocation
Makefile:1255: recipe for target 'u-boot' failed
make: *** [u-boot] Error 1

I found out this build error is caused by enable CONFIG_ARMV8_PSCI.
Could you please tell me whether you also encountered this issue before?

I try lower version GCC toolchain, it works fine.

Thanks,
Limeng


More information about the U-Boot mailing list