From a3ae3608d9ee28b0f821b5c64919332d3fe1fdd5 Mon Sep 17 00:00:00 2001 From: R Veera Kumar Date: Thu, 20 May 2021 02:41:48 +0530 Subject: [PATCH] Add verilator install script. --- verilator-install | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100755 verilator-install diff --git a/verilator-install b/verilator-install new file mode 100755 index 0000000..c136a0f --- /dev/null +++ b/verilator-install @@ -0,0 +1,29 @@ +#!/bin/bash +if [ "$EUID" -ne 0 ] + then echo "Please run as root using 'sudo bash'" + exit +fi + +apt-get update -y +apt-get install -y python3 make autoconf g++ flex bison ccache \ + numactl libgoogle-perftools-dev perl-doc \ + zlibc zlib1g-dev git + +# change into $SUDO_USER home directory +cd /home/$SUDO_USER +mkdir -p src/verilator +cd src/verilator + +git clone https://github.com/verilator/verilator + +cd verilator +git checkout v4.106 +autoconf +./configure --prefix=/usr/local/verilator +make -j$(nproc) +make install + +cd /home/$SUDO_USER/src/verilator +chown -R $SUDO_USER . +chgrp -R $SUDO_USER . + -- 2.30.2