TARGET riscv64-elf- vs riscv64-linux-
Posted: Wed Feb 15, 2023 1:44 am
What I'm trying to do is
- compile OpenSBI with u-boot as payload
- start QEMU with the previously compiled OpenSBI as BIOS, which should load u-boot
- use u-boot to load my own risc-v kernel from some partition (the partition is from a block device that I've created for QEMU)
I've build my gcc cross-compile toolchain with TARGET=riscv64-elf- but apparently u-boot doesn't compile with it. At some point during compilation I get this error
riscv64-elf-ld.bfd: warning: -z nocombreloc ignored
riscv64-elf-ld.bfd: -shared not supported
make[2]: *** [scripts/Makefile.lib:442: lib/efi_loader/helloworld_efi.so] Error 1
make[1]: *** [scripts/Makefile.build:398: lib/efi_loader] Error 2
make: *** [Makefile lib] Error 2
I've researched the issue and as far as I understand the riscv64-elf target is not supported, but riscv64-linux is. My question is what's the practical difference between the two targets?
- compile OpenSBI with u-boot as payload
- start QEMU with the previously compiled OpenSBI as BIOS, which should load u-boot
- use u-boot to load my own risc-v kernel from some partition (the partition is from a block device that I've created for QEMU)
I've build my gcc cross-compile toolchain with TARGET=riscv64-elf- but apparently u-boot doesn't compile with it. At some point during compilation I get this error
riscv64-elf-ld.bfd: warning: -z nocombreloc ignored
riscv64-elf-ld.bfd: -shared not supported
make[2]: *** [scripts/Makefile.lib:442: lib/efi_loader/helloworld_efi.so] Error 1
make[1]: *** [scripts/Makefile.build:398: lib/efi_loader] Error 2
make: *** [Makefile lib] Error 2
I've researched the issue and as far as I understand the riscv64-elf target is not supported, but riscv64-linux is. My question is what's the practical difference between the two targets?