forked from M-Labs/artiq
doc/manual/installing: small cleanups and more details
This commit is contained in:
parent
46165f3b50
commit
b749c8e64c
|
@ -9,10 +9,40 @@ You may skip those steps if the board is already flashed.
|
||||||
You will need:
|
You will need:
|
||||||
|
|
||||||
* FPGA vendor tools (e.g. Xilinx ISE or Vivado)
|
* FPGA vendor tools (e.g. Xilinx ISE or Vivado)
|
||||||
* OpenRISC GCC/binutils toolchain (or1k-elf-...)
|
|
||||||
|
* Get them from http://www.xilinx.com/support/download/index.htm
|
||||||
|
|
||||||
* Python 3.3+
|
* Python 3.3+
|
||||||
|
|
||||||
|
* OpenRISC GCC/binutils toolchain (or1k-elf-...)
|
||||||
|
|
||||||
|
* Compile and install binutils. Fetch the source from https://github.com/openrisc/or1k-src ::
|
||||||
|
|
||||||
|
$ mkdir build && cd build
|
||||||
|
$ ../configure --target=or1k-elf --enable-shared --disable-itcl \
|
||||||
|
--disable-tk --disable-tcl --disable-winsup --disable-gdbtk --disable-libgui --disable-rda \
|
||||||
|
--disable-sid --disable-sim --disable-gdb --disable-newlib --disable-libgloss --disable-werror
|
||||||
|
$ make && sudo make install
|
||||||
|
|
||||||
|
* Compile and install GCC. Fetch the source from https://github.com/openrisc/or1k-gcc ::
|
||||||
|
|
||||||
|
$ mkdir build && cd build
|
||||||
|
$ ../configure --target=or1k-elf --enable-languages=c --disable-shared --disable-libssp
|
||||||
|
$ make && sudo make install
|
||||||
|
|
||||||
* Migen and MiSoC (http://m-labs.hk/gateware.html)
|
* Migen and MiSoC (http://m-labs.hk/gateware.html)
|
||||||
|
|
||||||
|
* Fetch them from https://github.com/m-labs/migen and https://github.com/m-labs/misoc
|
||||||
|
|
||||||
|
* Install Migen::
|
||||||
|
|
||||||
|
$ cd migen && sudo python setup.py install
|
||||||
|
|
||||||
|
* Install MiSoC dependencies by following steps 2., 3. and 6. (respectively JTAG tools, flash proxy bitstream and compiler-rt) from the MiSoC README.
|
||||||
|
|
||||||
|
.. note::
|
||||||
|
``python`` refers to Python 3. You may need to use the ``python3`` command instead of ``python`` on some distributions.
|
||||||
|
|
||||||
After these components are installed, build and flash the bitstream and BIOS by running `from the MiSoC top-level directory`: ::
|
After these components are installed, build and flash the bitstream and BIOS by running `from the MiSoC top-level directory`: ::
|
||||||
|
|
||||||
$ ./make.py -X /path_to/ARTIQ/soc -t artiq all
|
$ ./make.py -X /path_to/ARTIQ/soc -t artiq all
|
||||||
|
@ -39,30 +69,29 @@ Installing the host-side software
|
||||||
|
|
||||||
The main dependency of ARTIQ is LLVM and its Python bindings (http://llvmpy.org). Currently, this installation is tedious because of the OpenRISC support not being merged upstream LLVM and because of incompatibilities between the versions of LLVM that support OpenRISC and the versions of LLVM that support the Python bindings. ::
|
The main dependency of ARTIQ is LLVM and its Python bindings (http://llvmpy.org). Currently, this installation is tedious because of the OpenRISC support not being merged upstream LLVM and because of incompatibilities between the versions of LLVM that support OpenRISC and the versions of LLVM that support the Python bindings. ::
|
||||||
|
|
||||||
git clone https://github.com/openrisc/llvm-or1k
|
$ git clone https://github.com/openrisc/llvm-or1k
|
||||||
cd llvm-or1k
|
$ cd llvm-or1k
|
||||||
git checkout b3a48efb2c05ed6cedc5395ae726c6a6573ef3ba
|
$ git checkout b3a48efb2c05ed6cedc5395ae726c6a6573ef3ba
|
||||||
patch -p1 < /path_to/ARTIQ/patches/llvm/*
|
$ patch -p1 < /path_to/ARTIQ/patches/llvm/*
|
||||||
|
|
||||||
cd tools
|
$ cd tools
|
||||||
git clone https://github.com/openrisc/clang-or1k clang
|
$ git clone https://github.com/openrisc/clang-or1k clang
|
||||||
cd clang
|
$ cd clang
|
||||||
git checkout 02d831c7e7dc1517abed9cc96abdfb937af954eb
|
$ git checkout 02d831c7e7dc1517abed9cc96abdfb937af954eb
|
||||||
patch -p1 < /path_to/ARTIQ/patches/clang/*
|
$ patch -p1 < /path_to/ARTIQ/patches/clang/*
|
||||||
|
|
||||||
cd ../..
|
$ cd ../..
|
||||||
mkdir build && cd build
|
$ mkdir build && cd build
|
||||||
../configure --prefix=/usr/local/llvm-or1k
|
$ ../configure --prefix=/usr/local/llvm-or1k
|
||||||
make ENABLE_OPTIMIZED=1 REQUIRES_RTTI=1
|
$ make ENABLE_OPTIMIZED=1 REQUIRES_RTTI=1
|
||||||
sudo -E make install ENABLE_OPTIMIZED=1 REQUIRES_RTTI=1
|
$ sudo -E make install ENABLE_OPTIMIZED=1 REQUIRES_RTTI=1
|
||||||
|
|
||||||
cd ../..
|
$ cd ../..
|
||||||
git clone https://github.com/llvmpy/llvmpy
|
$ git clone https://github.com/llvmpy/llvmpy
|
||||||
cd llvmpy
|
$ cd llvmpy
|
||||||
git checkout llvm-3.4
|
$ git checkout 7af2f7140391d4f708adf2721e84f23c1b89e97a
|
||||||
git checkout 7af2f7140391d4f708adf2721e84f23c1b89e97a
|
$ patch -p1 < /path_to/ARTIQ/patches/llvmpy/*
|
||||||
patch -p1 < /path_to/ARTIQ/patches/llvmpy/*
|
$ LLVM_CONFIG_PATH=/usr/local/llvm-or1k/bin/llvm-config sudo -E python setup.py install
|
||||||
LLVM_CONFIG_PATH=/usr/local/llvm-or1k/bin/llvm-config sudo -E python setup.py install
|
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
``python`` refers to Python 3. You may need to use the ``python3`` command instead of ``python`` on some distributions.
|
``python`` refers to Python 3. You may need to use the ``python3`` command instead of ``python`` on some distributions.
|
||||||
|
@ -71,7 +100,7 @@ You may want to use ``checkinstall`` instead of ``make install`` (to register th
|
||||||
|
|
||||||
You can then install ARTIQ itself: ::
|
You can then install ARTIQ itself: ::
|
||||||
|
|
||||||
cd /path_to/ARTIQ
|
$ cd /path_to/ARTIQ
|
||||||
sudo python setup.py
|
$ sudo python setup.py install
|
||||||
|
|
||||||
Alternatively, you can simply add the ARTIQ directory to your ``PYTHONPATH`` environment variable. The advantage of this technique is that you will not need to reinstall ARTIQ when modifying or upgrading it, which is useful during development.
|
Alternatively, you can simply add the ARTIQ directory to your ``PYTHONPATH`` environment variable. The advantage of this technique is that you will not need to reinstall ARTIQ when modifying or upgrading it, which is useful during development.
|
||||||
|
|
Loading…
Reference in New Issue