Dev setup scripts

Setting up the dependencies and repositories for Libre-SOC is big enough that it is just much easier to do in an automated fashion. Follow these steps after making sure that you review the scripts line by line because they run as root and it is your responsibility to check them, not ours.

Note the reason for entering the chroot as a user (not root) and then running sudo bash again is due to this procedure setting the SUDO_USER environment, on which the scripts critically rely. Also: the dev-env-setup repository is cloned twice, once to get the chroot script and a second time to use scripts inside the chroot. Feel free to simply copy the repository into the chroot to save bandwidth.

Note: these scripts assume that you are using debian/10 and that you understand and accept why we have standardised on that as an OS (reproduceability and minimising "support"). If you use anything different it risks creating non-reproducible HDL. It's not about "what's the favurite OS", it's about making sure that two developers can produce the exact same GDS-II files.

$ git clone
$ cd dev-env-setup
$ sudo bash
# ./mk-deb-chroot libresoc
# exit
$ schroot -c libresoc
(libresoc)$ git clone
(libresoc)$ cd dev-env-setup
(libresoc)$ sudo bash
(libresoc)# ./install-hdl-apt-reqs
(libresoc)# ./hdl-dev-repos
(libresoc)# ./ppc64-gdb-gcc           # needed for compiling unit tests
(libresoc)# exit

Additional scripts in the dev-env-setup repository will install yosys, verilator, coriolis2, ghdl, gdb and so on: from the above it is pretty straightforward and obvious to work out what to do (just run them). There is an accompanying walkthrough video which goes through the above and includes running some unit tests, explaining some of the background, and also files some bugs.