3 # name of user running script
5 echo "Checking whoami for current user"
6 then SUDO_USER
=$
(whoami
)
8 echo "Current SUDO_USER=$SUDO_USER"
10 # Install apt dependencies
11 echo Installing necessary apt dependencies
in the chroot
12 sudo apt-get update
-y
13 sudo apt-get upgrade
-y
14 sudo apt-get
install -y automake binutils-dev bison build-essential \
15 sysvinit-utils sysvinit-core \
16 ccache clang cmake doxygen dvipng flex gcc git graphviz \
17 imagemagick libboost-all-dev libboost-python-dev libbz2-dev \
18 libmpfr-dev libgmp-dev libmotif-dev libreadline-dev \
19 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
20 python2.7 python2.7
-dev \
21 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
22 python3-setuptools python-dev python-qt4 python-sphinx \
23 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
24 texlive texlive-fonts-extra texlive-lang-french \
25 texlive-latex-extra texlive-pictures xfig zlib1g-dev
27 # Add convenience variable to chroot user .bash_profile
28 echo -e 'export PATH=/usr/lib/ccache:"\044PATH"\nexport DISPLAY=:0.0\nexport ALLIANCE_TOP=/home/$SUDO_USER/alliance/install\nexport YOSYS_TOP=/home/$SUDO_USER/yosys\nexport LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib:\044{LD_LIBRARY_PATH}\nexport LD_LIBRARY_PATH=\044{ALLIANCE_TOP}/lib64:\044{LD_LIBRARY_PATH}' > /home
/$SUDO_USER/.bash_profile
30 chown
$SUDO_USER /home
/$SUDO_USER/.bash_profile
31 chgrp
$SUDO_USER /home
/$SUDO_USER/.bash_profile
33 echo -e "Added 'export PATH=/usr/lib/ccache:\"\044PATH\"\nexport DISPLAY=:0.0' to /home/$SUDO_USER/.bash_profile to speed up rebuilds"
35 # Build and install yosys from source
36 # note that a specific version of yosys is needed for ls180 at the moment
37 echo "deb-src http://ftp.debian.org/debian buster main" > /etc
/apt
/sources.list.d
/bustersrc.list
38 sudo apt-get update
-y
39 sudo apt-get build-dep yosys
-y
42 git clone https
://github.com
/cliffordwolf
/yosys.git
44 git checkout
049e3abf9baf795e69b9ecb9c4f19de6131f8418
46 # WAY too heavy a load - make -j$(nproc)
49 cd /home
/$SUDO_USER/yosys
52 # Install coriolis2 from source
55 mkdir
-p /home
/$SUDO_USER/coriolis-2.x
/src
56 cd /home
/$SUDO_USER/coriolis-2.x
/src
57 git clone https
://gitlab.lip6.fr
/vlsi-eda
/coriolis.git
60 # guaranteed to fail ./bootstrap/ccb.py --project=coriolis --make="-j$(nproc) install"
61 .
/bootstrap
/ccb.py
--project=coriolis
--make="-j1 install"
63 # Setup and test coriolisenv
64 /home
/$SUDO_USER/coriolis-2.x
/src
/coriolis
/bootstrap
/coriolisEnv.py
> /home
/$SUDO_USER/coriolisenv
65 source /home
/$SUDO_USER/.bash_profile
66 source /home
/$SUDO_USER/coriolisenv
68 # Install alliance from source
71 git clone https
://gitlab.lip6.fr
/vlsi-eda
/alliance.git
72 mkdir
-p /home
/$SUDO_USER/alliance
/build
/home
/$SUDO_USER/alliance
/install
73 mv alliance
/alliance
/src alliance
74 rm -rf alliance
/alliance
77 cd /home
/$SUDO_USER/alliance
/build
78 ..
/src
/configure
--prefix=/home
/$SUDO_USER/alliance
/install --enable-alc-shared
80 cd /home
/$SUDO_USER/alliance
/build
81 source /home
/$SUDO_USER/coriolisenv
84 # Install and configure alliance-check-toolkit
86 git clone https
://gitlab.lip6.fr
/vlsi-eda
/alliance-check-toolkit.git
88 touch alliance-check-toolkit
/etc
/mk
/users.d
/user-
$SUDO_USER.mk
89 cat <<EOG >>alliance-check-toolkit/etc/mk/users.d/user-$SUDO_USER.mk
90 export CORIOLIS_TOP=/home/$SUDO_USER/coriolis-2.x/Linux.x86_64/Release.Shared/install
91 export ALLIANCE_TOP=/home/$SUDO_USER/alliance/install
92 export CHECK_TOOLKIT=/home/$SUDO_USER/alliance-check-toolkit
93 export YOSYS_TOP=/home/$SUDO_USER/yosys
95 source /home
/$SUDO_USER/.bash_profile
96 cd alliance-check-toolkit
/benchs
/ARM
/cmos
99 \e[1;91mSelect File -> Open Cell or press CTRL + o then enter as the cell name 'arm_chip_cts_r' without the single quotation marks.\e[0m
103 cd /home
/$SUDO_USER/src
/nextpnr
104 chown
-R $SUDO_USER .
105 chgrp
-R $SUDO_USER .