#!/bin/bash PROGS="git hg gcc python3 make g++" for P in $PROGS do which $P > /dev/null 2>&1 [ "$?" == "0" ] || (echo "Missing prog '$P'"; exit 1) done J=$(grep -c ^processor /proc/cpuinfo) # From: # http://www.clifford.at/icestorm/ # Installing the IceStorm Tools (icepack, icebox, iceprog, icetime, chip databases): # # git clone https://github.com/cliffordwolf/icestorm.git icestorm # cd icestorm # make -j$(nproc) # sudo make install # # Installing Arachne-PNR (the place&route tool): # # git clone https://github.com/cseed/arachne-pnr.git arachne-pnr # cd arachne-pnr # make -j$(nproc) # sudo make install # # Installing Yosys (Verilog synthesis): # # git clone https://github.com/cliffordwolf/yosys.git yosys # cd yosys # make -j$(nproc) # sudo make install ROOT=$PWD mkdir -p sources pushd sources D="icestorm" if [ ! -d $D ] then git clone https://github.com/cliffordwolf/icestorm.git $D pushd $D PREFIX=$ROOT/install make -j$J PREFIX=$ROOT/install make install popd fi D="arachne-pnr" if [ ! -d $D ] then git clone https://github.com/cseed/arachne-pnr.git $D pushd $D PREFIX=$ROOT/install make -j$J PREFIX=$ROOT/install make install popd fi D="yosys" if [ ! -d $D ] then git clone https://github.com/cliffordwolf/yosys.git $D pushd $D PREFIX=$ROOT/install make config-gcc PREFIX=$ROOT/install make -j$J PREFIX=$ROOT/install make install popd fi # Couldn't get it to compile... #D=yodl #SRC=https://github.com/forflo/yodl.git D="vhd2vl" if [ ! -d $D ] then git clone https://github.com/ldoolitt/vhd2vl.git $D pushd $D/src make cp vhd2vl $ROOT/install/bin popd fi popd