# Installation instructions for GHDL ## Setting up new debootstrap and chroot into it Run the following if you wish to isolate the ghdl build from other software (reproducible builds) or use the schroot auto-preparation script here: export MY_CHROOT=/stable-chroot mkdir $MY_CHROOT debootstrap stable $MY_CHROOT http://deb.debian.org/debian/ mount -t proc proc $MY_CHROOT/proc mount -t sysfs sysfs $MY_CHROOT/sys mount -t devpts devpts $MY_CHROOT/dev/pts/ chroot $MY_CHROOT /bin/bash ## Steps to compile GHDL Use this script here to save some time and mistakes ### Necessary software to install apt-get install git gnat gcc make g++ file texinfo zlib1g-dev git clone https://github.com/ghdl/ghdl.git wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz wget https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz wget https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz wget https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2 wget https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz ### Build GHDL tar -xf gcc-10.3.0.tar.xz cd gcc-10.3.0 tar -xf ../gmp-6.2.1.tar.xz mv gmp-6.2.1 gmp tar -xf ../mpc-1.2.1.tar.gz mv mpc-1.2.1 mpc tar -xf ../mpfr-4.1.0.tar.xz mv mpfr-4.1.0 mpfr tar -xf ../isl-0.18.tar.bz2 mv isl-0.18 isl cd .. cd ghdl git checkout v1.0.0 mkdir build cd build ../configure --with-gcc=../../gcc-10.3.0 --prefix=/usr/local/ghdl make copy-sources mkdir gcc-objs; cd gcc-objs ../../../gcc-10.3.0/configure --prefix=/usr/local/ghdl \ --enable-languages=c,vhdl --disable-bootstrap --disable-lto \ --disable-multilib --disable-libssp --disable-libgomp \ --disable-libquadmath --enable-default-pie make -j$(nproc) make install cd .. make ghdllib make install Please adjust the install paths for ghdl. ### Installing ghdl, yosys, and ghdl-yosys-plugin in a Debian chroot Verified to work on a Talos II workstation (Debian Bullseye) debootstrap bullseye /var/chroot/bullseye_ghdl chroot /var/chroot/bullseye_ghdl put some 'deb-src' URIs in your sources.list apt-get update apt-get upgrade apt-get build-dep ghdl apt-get install git cd /root/ git clone https://github.com/ghdl/ghdl cd ghdl ./configure --with-llvm-config make make install cd .. apt-get build-dep yosys git clone https://github.com/YosysHQ/yosys cd yosys make make install git clone https://github.com/ghdl/ghdl-yosys-plugin cd ghdl-yosys-plugin make make install [optional] apt-get install verilator exit # exit the chroot Then install schroot and create a config file nano /etc/schroot/chroot.d/bullseye_ghdl [bullseye_ghdl] description=chroot type=directory directory=/var/chroot/bullseye_ghdl users=your_username After installing ghdl-yosys-plugin you can build [[microwatt]]