add python2.7 explicit install dependency in buster chroot
[dev-env-setup.git] / coriolis2-chroot
index c26e9225078cdb49267c54c206f434dba99f8065..093511ffbbbc32b7caf59ae5c5913f750b6bdcfb 100755 (executable)
@@ -30,10 +30,12 @@ echo Installing necessary apt dependencies in the chroot
 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 \
 libqwt-dev libtool libx11-dev libxaw7-dev libxml2-dev \
+python2.7 python2.7-dev \
 libxpm-dev libxt-dev python3.7 python3-jinja2 python3-pip \
 python3-setuptools python-dev python-qt4 python-sphinx \
 qt4-dev-tools rapidjson-dev tcl tcl-dev tcl-tclreadline \
@@ -44,7 +46,8 @@ texlive-latex-extra texlive-pictures xfig yosys zlib1g-dev
 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
+useradd -m -p `python3 -c 'import crypt; print (crypt.crypt("1234","Fx"))'` \
+                -s /bin/bash $SUDO_USER -k /etc/skel
 echo -e "
 Added user ${SUDO_USER} with \e[1;91mpassword: 1234\e[0m"
 
@@ -80,6 +83,7 @@ This enables you to chroot into coriolis as an unprivileged user by running
 "
 
 # 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
@@ -89,6 +93,7 @@ runuser $SUDO_USER --preserve-environment -c 'schroot -c coriolis /bin/bash << E
 cd /home/$SUDO_USER
 git clone https://github.com/cliffordwolf/yosys.git
 cd yosys
+git checkout 049e3abf9baf795e69b9ecb9c4f19de6131f8418
 make config-clang
 make -j$(nproc)
 EOF'