Created
August 19, 2019 16:15
-
-
Save tmeissner/e1d7b3f9adedfa87473dc908a4f11398 to your computer and use it in GitHub Desktop.
Dockerfile for SymbiYosys with GHDL-synth plugin
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM debian:buster-slim AS build | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install -y \ | |
build-essential \ | |
clang \ | |
bison \ | |
flex \ | |
libreadline-dev \ | |
gawk \ | |
tcl-dev \ | |
libffi-dev \ | |
git \ | |
mercurial \ | |
graphviz \ | |
xdot \ | |
pkg-config \ | |
python \ | |
python3 \ | |
libftdi-dev \ | |
gperf \ | |
libboost-program-options-dev \ | |
autoconf \ | |
libgmp-dev \ | |
cmake \ | |
make \ | |
wget \ | |
libpython2.7 && \ | |
apt-get clean -y && \ | |
apt-get autoclean -y && \ | |
apt-get autoremove -y | |
ENV PREFIX=/opt/symbiyosys | |
RUN mkdir /root/symbiyosys && \ | |
mkdir $PREFIX && \ | |
mkdir $PREFIX/bin && \ | |
cd /root/symbiyosys && \ | |
git clone https://github.com/SRI-CSL/yices2.git yices2 && \ | |
cd yices2 && \ | |
autoconf && \ | |
./configure && \ | |
make -j$(nproc) && \ | |
make install && \ | |
cd /root/symbiyosys && \ | |
git clone https://bitbucket.org/arieg/extavy.git && \ | |
cd extavy && \ | |
git submodule update --init && \ | |
mkdir build; cd build && \ | |
cmake -DCMAKE_BUILD_TYPE=Release .. && \ | |
make -j$(nproc) && \ | |
cp avy/src/avy $PREFIX/bin/ && \ | |
cp avy/src/avybmc $PREFIX/bin/ && \ | |
cd /root/symbiyosys && \ | |
git clone https://github.com/boolector/boolector && \ | |
cd boolector && \ | |
./contrib/setup-btor2tools.sh && \ | |
./contrib/setup-lingeling.sh && \ | |
./configure.sh && \ | |
make -C build -j$(nproc) && \ | |
cp build/bin/boolector $PREFIX/bin/ && \ | |
cp build/bin/btor* $PREFIX/bin/ && \ | |
cp deps/btor2tools/bin/btorsim $PREFIX/bin/ && \ | |
cd /root/symbiyosys && \ | |
wget https://downloads.bvsrc.org/super_prove/super_prove-hwmcc17_final-2-d7b71160dddb-Ubuntu_14.04-Release.tar.gz && \ | |
tar xzf super_prove-hwmcc17_final-2-d7b71160dddb-Ubuntu_14.04-Release.tar.gz -C $PREFIX/ && \ | |
echo '#!/bin/bash' >> $PREFIX/bin/suprove && \ | |
echo 'tool=super_prove; if [ "$1" != "${1#+}" ]; then tool="${1#+}"; shift; fi' >> $PREFIX/bin/suprove && \ | |
echo 'exec /usr/local/super_prove/bin/${tool}.sh "$@"' >> $PREFIX/bin/suprove && \ | |
chmod +x $PREFIX/bin/suprove && \ | |
cd /root/symbiyosys && \ | |
git clone https://github.com/YosysHQ/SymbiYosys.git SymbiYosys && \ | |
cd SymbiYosys && \ | |
make install PREFIX=$PREFIX && \ | |
cd /root/symbiyosys && \ | |
git clone https://github.com/Z3Prover/z3.git z3 && \ | |
cd z3 && \ | |
python scripts/mk_make.py && \ | |
cd build && \ | |
make -j$(nproc) && \ | |
make install PREFIX=$PREFIX | |
FROM ghdl/synth:beta | |
COPY --from=build /opt/symbiyosys /usr/local | |
RUN apt-get update && \ | |
apt-get upgrade -y && \ | |
apt-get install -y \ | |
tcl-dev \ | |
python \ | |
python3 \ | |
make \ | |
libpython2.7 && \ | |
apt-get clean -y && \ | |
apt-get autoclean -y && \ | |
apt-get autoremove -y | |
RUN ln -s /usr/lib/x86_64-linux-gnu/libreadline.so /usr/lib/x86_64-linux-gnu/libreadline.so.6 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment