[PATCH] RSB - RISC-V: Add scripts to build RISC-V's simulator
Hesham Almatary
heshamelmatary at gmail.com
Sat Oct 28 05:05:42 UTC 2017
Update #3109
---
bare/config/devel/spike-1.1.0.cfg | 21 ++++++++++++
bare/config/devel/spike.bset | 7 ++++
source-builder/config/spike-1-1.cfg | 64 +++++++++++++++++++++++++++++++++++++
3 files changed, 92 insertions(+)
create mode 100644 bare/config/devel/spike-1.1.0.cfg
create mode 100644 bare/config/devel/spike.bset
create mode 100644 source-builder/config/spike-1-1.cfg
diff --git a/bare/config/devel/spike-1.1.0.cfg b/bare/config/devel/spike-1.1.0.cfg
new file mode 100644
index 0000000..5b633fc
--- /dev/null
+++ b/bare/config/devel/spike-1.1.0.cfg
@@ -0,0 +1,21 @@
+#
+# RISC-V's simulator (spike) 1.1.0
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define spike_version 1.1.0
+
+%hash sha512 priv-1.10.zip 46ff0a07135bdc8c442ade3727f080d09ec8e7136e42f082d135b256c06088dc0b9f34028f0a20bcb19bb6de5a144ea02a53c587fac4204f0f7d05a11ae23ed3
+
+# RISC-V's front-end server (fesvr)
+%hash sha512 f683e01542acf60e50774d061bcb396b628e3e67.zip 54900159e4a4f6ec28a43702e651354932e22e1e1995fa82aeb182225fe32be085e850e6060b8feadf6ffdd6cbe19873a379af687e36d04a1a3ea337cef93b06
+
+#
+# The spike build instructions. We use 1.x.x Release 1.
+#
+%include %{_configdir}/spike-1-1.cfg
diff --git a/bare/config/devel/spike.bset b/bare/config/devel/spike.bset
new file mode 100644
index 0000000..c7a6340
--- /dev/null
+++ b/bare/config/devel/spike.bset
@@ -0,0 +1,7 @@
+#
+# Build set for RISC-V's simulator
+#
+
+%define release 1
+
+devel/spike-1.1.0
diff --git a/source-builder/config/spike-1-1.cfg b/source-builder/config/spike-1-1.cfg
new file mode 100644
index 0000000..54e4915
--- /dev/null
+++ b/source-builder/config/spike-1-1.cfg
@@ -0,0 +1,64 @@
+#
+# RISC-V's spike (priv-1.10) 1.x.x Version 1.
+#
+# This configuration file configure's, make's and install's RISC-V's spike simulator.
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+Name: spike-%{spike_version}-%{_host}-%{release}
+Summary: spike-github
+Version: %{spike_version}
+Release: %{release}
+URL: https://github.com/riscv/riscv-isa-sim/
+BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
+
+#
+# Source
+#
+%source set spike https://github.com/riscv/riscv-isa-sim/archive/priv-1.10.zip
+%source set fesvr https://github.com/riscv/riscv-fesvr/archive/f683e01542acf60e50774d061bcb396b628e3e67.zip
+
+#
+# Prepare the source code.
+#
+%prep
+ build_top=$(pwd)
+
+ %source setup fesvr -q -n riscv-fesvr-f683e01542acf60e50774d061bcb396b628e3e67
+ %source setup spike -q -n riscv-isa-sim-priv-1.10
+
+ cd ${build_top}
+
+%build
+ build_top=$(pwd)
+
+ cd riscv-fesvr-f683e01542acf60e50774d061bcb396b628e3e67
+
+ ../riscv-fesvr-f683e01542acf60e50774d061bcb396b628e3e67/configure \
+ --prefix=%{_prefix}
+ %{__make} %{?_smp_mflags} all$
+ %{__make} install
+
+
+ cd ../riscv-isa-sim-priv-1.10
+
+ ../riscv-isa-sim-priv-1.10/configure \
+ --prefix=%{_prefix} \
+ --with-fesvr=%{_prefix}
+
+ %{__make} %{?_smp_mflags} all$
+
+ cd ${build_top}
+
+%install
+ build_top=$(pwd)
+
+ rm -rf $SB_BUILD_ROOT
+
+ cd riscv-isa-sim-priv-1.10
+ %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
+
+ cd ${build_top}
--
2.7.4
More information about the devel
mailing list