#!/bin/bash if [ "$EUID" -ne 0 ] then echo "Please run as root using 'sudo bash'" exit fi # this is a bit of a cheat, by relying on debian to pull in all the # build dependencies. saves time researching how to get and list them # by hand. apt-get update -y apt-get build-dep yosys -y apt-get remove yosys -y apt-get build-dep ghdl -y # this is sort-of what ghdl-install does, hmmm mkdir -p /home/$SUDO_USER/src cd /home/$SUDO_USER/src mkdir -p hdl_tools cd hdl_tools git clone https://github.com/YosysHQ/yosys.git git clone https://github.com/YosysHQ/SymbiYosys.git sby git clone https://github.com/SRI-CSL/yices2.git git clone https://github.com/Z3Prover/z3.git # XXX see ghdl-install this is really best done with that git clone https://github.com/ghdl/ghdl git clone https://github.com/ghdl/ghdl-yosys-plugin # yosys 0.13 has been found to be stable... cd yosys git checkout yosys-0.13 make config-clang make -j$(nproc) make install # ... but things are in the middle of a transition so use this version of ghdl cd ../ghdl git checkout 263c843ed49f59cb4cc3038bafcac2b9238ebad4 ./configure --with-llvm-config make make install # ...with this specific version of the yosys-ghdl-plugin cd ../ghdl-yosys-plugin git checkout c9b05e481423c55ffcbb856fd5296701f670808c make make install # symbiyosys should be fine though cd ../sby make install cd ../yices2 autoconf ./configure make -j$(nproc) make install cd ../z3 python scripts/mk_make.py cd build make -j$(nproc) make install cd /home/$SUDO_USER/src/hdl_tools chown -R $SUDO_USER . chgrp -R $SUDO_USER .