[RSB] [PATCH 2/2] Add support for building bare-metal or1ksim.

Hesham ALMatary heshamelmatary at gmail.com
Thu Aug 28 17:14:34 UTC 2014


This patch adds support to enable RSB to build or1ksim emulator
(the main OpenRISC 1000 simulator) from latest or1ksim github repo.
---
 bare/config/devel/or1ksim-1.1.0.cfg   | 16 ++++++++++
 bare/config/devel/or1ksim.bset        |  7 +++++
 source-builder/config/or1ksim-1-1.cfg | 57 +++++++++++++++++++++++++++++++++++
 3 files changed, 80 insertions(+)
 create mode 100644 bare/config/devel/or1ksim-1.1.0.cfg
 create mode 100644 bare/config/devel/or1ksim.bset
 create mode 100644 source-builder/config/or1ksim-1-1.cfg

diff --git a/bare/config/devel/or1ksim-1.1.0.cfg b/bare/config/devel/or1ksim-1.1.0.cfg
new file mode 100644
index 0000000..bfd1a44
--- /dev/null
+++ b/bare/config/devel/or1ksim-1.1.0.cfg
@@ -0,0 +1,16 @@
+#
+# or1ksim emulator 1.1.0
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+%include %{_configdir}/base.cfg
+
+%define or1ksim_version 1.1.0
+
+#
+# The or1ksim build instructions. We use 1.x.x Release 1.
+#
+%include %{_configdir}/or1ksim-1-1.cfg
diff --git a/bare/config/devel/or1ksim.bset b/bare/config/devel/or1ksim.bset
new file mode 100644
index 0000000..2941553
--- /dev/null
+++ b/bare/config/devel/or1ksim.bset
@@ -0,0 +1,7 @@
+#
+# Build set for or1ksim emulator 
+#
+
+%define release 1
+
+devel/or1ksim-1.1.0
diff --git a/source-builder/config/or1ksim-1-1.cfg b/source-builder/config/or1ksim-1-1.cfg
new file mode 100644
index 0000000..30dfe13
--- /dev/null
+++ b/source-builder/config/or1ksim-1-1.cfg
@@ -0,0 +1,57 @@
+#
+# or1ksim 1.x.x Version 1.
+#
+# This configuration file configure's, make's and install's or1ksim.
+#
+
+%if %{release} == %{nil}
+%define release 1
+%endif
+
+Name:      or1ksim-1.1.0
+Summary:   or1ksim-github
+Version:   %{or1ksim_version}
+Release:   %{release}
+URL: 	   https://github.com/openrisc/or1ksim
+BuildRoot: %{_tmppath}/%{name}-root-%(%{__id_u} -n)
+
+#
+# Source
+#
+%source set or1ksim https://github.com/openrisc/or1ksim/archive/or1k-master.zip 
+
+#
+# Prepare the source code.
+#
+%prep
+  build_top=$(pwd)
+
+  %source setup or1ksim -q -n or1ksim-or1k-master
+
+  cd ${build_top}
+
+%build
+  build_top=$(pwd)
+
+  cd or1ksim-or1k-master/ 
+
+  ../or1ksim-or1k-master/configure \
+  --target=or1k-elf            \
+  --prefix=%{_prefix}          \
+  CFLAGS="-O0 -DINLINE=static -DNO_SOFTFLOAT_UNUSED"
+
+
+  %{__make} %{?_smp_mflags} all$
+
+
+  cd ${build_top}
+
+%install
+  build_top=$(pwd)
+
+  rm -rf $SB_BUILD_ROOT
+
+  cd or1ksim-or1k-master
+  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
+
+  cd ${build_top}
-- 
1.9.3



More information about the devel mailing list