(no commit message)
[libreriscv.git] / HDL_workflow / devscripts.mdwn
1 # Dev setup scripts
2
3 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.
4
5 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.
6
7 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
8 $ cd dev-env-setup
9 $ sudo bash
10 # ./mk-deb-chroot libresoc
11 # exit
12 $ schroot -c libresoc
13 (libresoc)$ git clone https://git.libre-soc.org/git/dev-env-setup.git
14 (libresoc)$ cd dev-env-setup
15 (libresoc)$ sudo bash
16 (libresoc)# ./install-hdl-apt-reqs
17 (libresoc)# ./hdl-dev-repos
18 (libresoc)# exit
19 (libresoc)$
20
21 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-dev-repos;hb=HEAD>
22
23 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. There is an accompanying walkthrough video which goes through the above <https://m.youtube.com/watch?v=1-4eJKTNrEk>