58d7c712d7
This commit adds a new package for a prebuilt bare-metal toolchain for RISC-V 64-bit. Indeed, some bootloader/firmware for the BeagleV (and potentially later for other platforms?) do not build with a Linux-capable toolchain. This uses a pre-built toolchain from SiFive, precompiled for x86-64, so all packages using this toolchain must have the appropriate BR2_HOSTARCH dependency. This package is modeled after package/arm-gnu-a-toolchain/, which package a pre-built ARM32 bare-metal toolchain. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com> Signed-off-by: Yann E. MORIN <yann.morin.1998@free.fr>
26 lines
887 B
Makefile
26 lines
887 B
Makefile
################################################################################
|
|
#
|
|
# riscv64-elf-toolchain
|
|
#
|
|
################################################################################
|
|
|
|
RISCV64_ELF_TOOLCHAIN_VERSION = 2020.12.8
|
|
RISCV64_ELF_TOOLCHAIN_SITE = https://static.dev.sifive.com/dev-tools/freedom-tools/v2020.12
|
|
RISCV64_ELF_TOOLCHAIN_SOURCE = riscv64-unknown-elf-toolchain-10.2.0-$(RISCV64_ELF_TOOLCHAIN_VERSION)-x86_64-linux-centos6.tar.gz
|
|
|
|
HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR = $(HOST_DIR)/opt/riscv64-elf
|
|
|
|
define HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_CMDS
|
|
rm -rf $(HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR)
|
|
mkdir -p $(HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR)
|
|
cp -rf $(@D)/* $(HOST_RISCV64_ELF_TOOLCHAIN_INSTALL_DIR)/
|
|
|
|
mkdir -p $(HOST_DIR)/bin
|
|
cd $(HOST_DIR)/bin && \
|
|
for i in ../opt/riscv64-elf/bin/*; do \
|
|
ln -sf $$i; \
|
|
done
|
|
endef
|
|
|
|
$(eval $(host-generic-package))
|