From 44bb2b56b8a29ca74adcea62feb66b0b139f0cbd Mon Sep 17 00:00:00 2001 From: Bent Bisballe Nyeng Date: Tue, 12 Dec 2017 21:06:30 +0100 Subject: Added build script for icestorm fpga tool-chain. --- fpga-toolchain/build.sh | 69 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100755 fpga-toolchain/build.sh (limited to 'fpga-toolchain/build.sh') diff --git a/fpga-toolchain/build.sh b/fpga-toolchain/build.sh new file mode 100755 index 0000000..7f7e873 --- /dev/null +++ b/fpga-toolchain/build.sh @@ -0,0 +1,69 @@ +#!/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 + +popd sources -- cgit v1.2.3