@@ -99,31 +99,40 @@ These steps are required to generate bitstream (``.bit``) files, build the MiSoC
99
99
.. note ::
100
100
The options ``develop `` and ``--user `` are for setup.py to install Migen in ``~/.local/lib/python3.4 ``.
101
101
102
- * Install OpenRISC GCC/ binutils toolchain (or1k-elf -...): ::
102
+ * Install OpenRISC binutils (or1k-linux -...): ::
103
103
104
104
$ cd ~/artiq-dev
105
- $ git clone https://github.com/openrisc/or1k-src
106
- $ cd or1k-src
107
- $ mkdir build
108
- $ cd build
109
- $ ../configure --target=or1k-elf --enable-shared --disable-itcl \
110
- --disable-tk --disable-tcl --disable-winsup \
111
- --disable-gdbtk --disable-libgui --disable-rda \
112
- --disable-sid --disable-sim --disable-gdb \
113
- --disable-newlib --disable-libgloss --disable-werror
105
+ $ wget https://ftp.gnu.org/gnu/binutils/binutils-2.25.1.tar.bz2
106
+ $ tar xvf binutils-2.25.1.tar.bz2
107
+ $ rm binutils-2.25.1.tar.bz2
108
+
109
+ $ mkdir binutils-2.25.1/build
110
+ $ cd binutils-2.25.1/build
111
+ $ ../configure --target=or1k-linux --prefix=/usr/local
114
112
$ make -j4
115
113
$ sudo make install
116
114
115
+ .. note ::
116
+ We're using an ``or1k-linux `` target because it is necessary to enable
117
+ shared library support in ``ld ``, not because Linux is involved.
118
+
119
+ * Install LLVM and Clang: ::
120
+
117
121
$ cd ~/artiq-dev
118
- $ git clone https://github.com/openrisc/or1k-gcc
119
- $ cd or1k-gcc
122
+ $ git clone https://github.com/openrisc/llvm-or1k
123
+ $ cd llvm-or1k/tools
124
+ $ git clone https://github.com/openrisc/clang-or1k clang
125
+ $ cd ..
126
+
120
127
$ mkdir build
121
128
$ cd build
122
- $ ../configure --target=or1k-elf --enable-languages=c \
123
- --disable-shared --disable-libssp
129
+ $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-or1k -DLLVM_TARGETS_TO_BUILD="OR1K;X86" -DCMAKE_BUILD_TYPE=Rel -DLLVM_ENABLE_ASSERTIONS=ON
124
130
$ make -j4
125
131
$ sudo make install
126
132
133
+ .. note ::
134
+ Compilation of LLVM can take more than 30 min on some machines.
135
+
127
136
.. _install-xc3sprog :
128
137
129
138
* Install JTAG tools needed to program the Pipistrello and KC705:
@@ -181,6 +190,7 @@ These steps are required to generate bitstream (``.bit``) files, build the MiSoC
181
190
::
182
191
183
192
$ cd ~/artiq-dev/misoc
193
+ $ export PATH=$PATH:/usr/local/llvm-or1k/bin
184
194
185
195
* For Pipistrello::
186
196
@@ -279,19 +289,7 @@ To flash the ``idle`` kernel:
279
289
Installing the host-side software
280
290
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
281
291
282
- * Install LLVM and the llvmlite Python bindings: ::
283
-
284
- $ cd ~/artiq-dev
285
- $ git clone https://github.com/openrisc/llvm-or1k
286
- $ cd llvm-or1k/tools
287
- $ git clone https://github.com/openrisc/clang-or1k clang
288
-
289
- $ cd ..
290
- $ mkdir build
291
- $ cd build
292
- $ cmake .. -DCMAKE_INSTALL_PREFIX=/usr/local/llvm-or1k -DLLVM_TARGETS_TO_BUILD="OR1K;X86" -DCMAKE_BUILD_TYPE=Debug
293
- $ make -j4
294
- $ sudo make install
292
+ * Install the llvmlite Python bindings: ::
295
293
296
294
$ cd ~/artiq-dev
297
295
$ git clone https://github.com/numba/llvmlite
@@ -304,9 +302,6 @@ Installing the host-side software
304
302
.. note ::
305
303
llvmlite is in development and its API is not stable yet. Commit ID ``11a8303d02e3d6dd2d1e0e9065701795cd8a979f `` is known to work.
306
304
307
- .. note ::
308
- Compilation of LLVM can take more than 30 min on some machines.
309
-
310
305
* Install ARTIQ: ::
311
306
312
307
$ cd ~/artiq-dev
0 commit comments