apt-get update -y
apt-get upgrade -y
apt-get install -y automake binutils-dev bison build-essential \
+sysvinit-utils sysvinit-core \
ccache clang cmake doxygen dvipng flex gcc git graphviz \
imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
texlive texlive-fonts-extra texlive-lang-french \
texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev
+# yeah don't add systemd in a chroot. not funny joke
+apt-get remove -y systemd
# Create user with same UID in the chroot
useradd -m -p `python -c 'import crypt; print crypt.crypt("1234","Fx")'` -s /bin/bash $SUDO_USER -k /etc/skel
"
# Build and install yosys from source
+# note that a specific version of yosys is needed for ls180 at the moment
chroot /opt/chroot/coriolis /bin/bash << EOF
apt-get update -y
apt-get build-dep yosys -y
cd /home/$SUDO_USER
git clone https://github.com/cliffordwolf/yosys.git
cd yosys
+git checkout 049e3abf9baf795e69b9ecb9c4f19de6131f8418
make config-clang
make -j$(nproc)
EOF'