All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH v2 3/6] package/riscv64-elf-toolchain: new package
Date: Sun,  2 May 2021 23:21:31 +0200	[thread overview]
Message-ID: <20210502212141.934384-4-thomas.petazzoni@bootlin.com> (raw)
In-Reply-To: <20210502212141.934384-1-thomas.petazzoni@bootlin.com>

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>
---
 DEVELOPERS                                    |  1 +
 .../riscv64-elf-toolchain.mk                  | 25 +++++++++++++++++++
 2 files changed, 26 insertions(+)
 create mode 100644 package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk

diff --git a/DEVELOPERS b/DEVELOPERS
index cec63a3715..7ce78742fc 100644
--- a/DEVELOPERS
+++ b/DEVELOPERS
@@ -2651,6 +2651,7 @@ F:	package/python3/
 F:	package/python-mad/
 F:	package/python-serial/
 F:	package/qextserialport/
+F:	package/riscv64-elf-toolchain/
 F:	package/rpcbind/
 F:	package/rt-tests/
 F:	package/rtc-tools/
diff --git a/package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk b/package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk
new file mode 100644
index 0000000000..9b08ee0fec
--- /dev/null
+++ b/package/riscv64-elf-toolchain/riscv64-elf-toolchain.mk
@@ -0,0 +1,25 @@
+################################################################################
+#
+# 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))
-- 
2.30.2

  parent reply	other threads:[~2021-05-02 21:21 UTC|newest]

Thread overview: 32+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-05-02 21:21 [Buildroot] [PATCH v2 0/6] Support for the BeagleV platform Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 1/6] boot/opensbi: add options to enable/disable image installation Thomas Petazzoni
2021-05-03  0:08   ` Alistair Francis
2021-05-03 11:26   ` Bin Meng
2021-05-02 21:21 ` [Buildroot] [PATCH v2 2/6] configs/beaglev_defconfig: new defconfig Thomas Petazzoni
2021-05-03  0:12   ` Alistair Francis
2021-05-03  1:14   ` Alistair Francis
2021-05-02 21:21 ` Thomas Petazzoni [this message]
2021-05-02 21:21 ` [Buildroot] [PATCH v2 4/6] boot/beaglev-ddrinit: new package Thomas Petazzoni
2021-05-03 11:30   ` Bin Meng
2021-05-03 11:53     ` Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 5/6] boot/beaglev-secondboot: " Thomas Petazzoni
2021-05-03 11:31   ` Bin Meng
2021-05-02 21:21 ` [Buildroot] [PATCH v2 6/6] configs/beaglev: enable building of low-level firmware Thomas Petazzoni
2021-05-03 11:33   ` Bin Meng
2021-05-02 21:21 ` [Buildroot] [PATCH v2 0/6] Support for the BeagleV platform Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 1/6] boot/opensbi: add options to enable/disable image installation Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 2/6] configs/beaglev_defconfig: new defconfig Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 3/6] package/riscv64-elf-toolchain: new package Thomas Petazzoni
2021-05-03  0:14   ` Alistair Francis
2021-05-03  6:54     ` Thomas Petazzoni
2021-05-03  7:11       ` Alistair Francis
2021-05-03  7:13         ` Thomas Petazzoni
2021-05-03  7:29           ` Alistair Francis
2021-05-03  6:17   ` Peter Korsgaard
2021-05-03  6:57     ` Thomas Petazzoni
2021-05-03  7:09       ` Peter Korsgaard
2021-05-02 21:21 ` [Buildroot] [PATCH v2 4/6] boot/beaglev-ddrinit: " Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 5/6] boot/beaglev-secondboot: " Thomas Petazzoni
2021-05-02 21:21 ` [Buildroot] [PATCH v2 6/6] configs/beaglev: enable building of low-level firmware Thomas Petazzoni
2021-05-03  7:18   ` Drew Fustini
2021-05-03  7:32     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20210502212141.934384-4-thomas.petazzoni@bootlin.com \
    --to=thomas.petazzoni@bootlin.com \
    --cc=buildroot@busybox.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.