1 # Installation instructions for GHDL
3 ## Setting up new debootstrap and chroot into it
5 Run the following if you wish to isolate the ghdl build
6 from other software (reproducible builds) or use the schroot
7 auto-preparation script here:
8 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=mk-deb-chroot;hb=HEAD>
10 export MY_CHROOT=/stable-chroot
12 debootstrap stable $MY_CHROOT http://deb.debian.org/debian/
13 mount -t proc proc $MY_CHROOT/proc
14 mount -t sysfs sysfs $MY_CHROOT/sys
15 mount -t devpts devpts $MY_CHROOT/dev/pts/
16 chroot $MY_CHROOT /bin/bash
18 ## Steps to compile GHDL
20 Use this script here to save some time and mistakes <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=ghdl-install>
22 ### Necessary software to install
24 apt-get install git gnat gcc make g++ file texinfo zlib1g-dev
26 git clone https://github.com/ghdl/ghdl.git
27 wget https://ftp.gnu.org/gnu/gmp/gmp-6.2.1.tar.xz
28 wget https://ftp.gnu.org/gnu/mpc/mpc-1.2.1.tar.gz
29 wget https://www.mpfr.org/mpfr-4.1.0/mpfr-4.1.0.tar.xz
30 wget https://gcc.gnu.org/pub/gcc/infrastructure/isl-0.18.tar.bz2
31 wget https://ftp.gnu.org/gnu/gcc/gcc-10.3.0/gcc-10.3.0.tar.xz
35 tar -xf gcc-10.3.0.tar.xz
37 tar -xf ../gmp-6.2.1.tar.xz
39 tar -xf ../mpc-1.2.1.tar.gz
41 tar -xf ../mpfr-4.1.0.tar.xz
43 tar -xf ../isl-0.18.tar.bz2
51 ../configure --with-gcc=../../gcc-10.3.0 --prefix=/usr/local/ghdl
53 mkdir gcc-objs; cd gcc-objs
54 ../../../gcc-10.3.0/configure --prefix=/usr/local/ghdl \
55 --enable-languages=c,vhdl --disable-bootstrap --disable-lto \
56 --disable-multilib --disable-libssp --disable-libgomp \
57 --disable-libquadmath --enable-default-pie
64 Please adjust the install paths for ghdl.
66 ### Installing ghdl, yosys, and ghdl-yosys-plugin in a Debian chroot
68 Verified to work on a Talos II workstation (Debian Bullseye)
70 debootstrap bullseye /var/chroot/bullseye_ghdl
71 chroot /var/chroot/bullseye_ghdl
73 put some 'deb-src' URIs in your sources.list
77 apt-get build-dep ghdl
80 git clone https://github.com/ghdl/ghdl
82 ./configure --with-llvm-config
87 apt-get build-dep yosys
88 git clone https://github.com/YosysHQ/yosys
93 git clone https://github.com/ghdl/ghdl-yosys-plugin
98 [optional] apt-get install verilator
99 exit # exit the chroot
101 Then install schroot and create a config file
102 nano /etc/schroot/chroot.d/bullseye_ghdl
107 directory=/var/chroot/bullseye_ghdl
110 After installing ghdl-yosys-plugin you can build [[microwatt]]