whitespace
[libreriscv.git] / HDL_workflow / devscripts.mdwn
1 # Dev setup scripts
2
3 Setting up the dependencies and repositories for Libre-SOC is big enough
4 that it is just much easier to do in an automated fashion. Follow these
5 steps after making sure that you review the scripts line by line because
6 they run as root and it is your responsibility to check them, not ours.
7
8 Note the reason for entering the chroot as a user (not root) and
9 then running sudo bash again is due to this procedure setting the
10 SUDO_USER environment, on which the scripts critically rely. Also:
11 the dev-env-setup repository is cloned twice, once to get the chroot
12 script and a second time to use scripts *inside* the chroot. Feel free
13 to simply copy the repository into the chroot to save bandwidth.
14
15 $ git clone https://git.libre-soc.org/git/dev-env-setup.git
16 $ cd dev-env-setup
17 $ sudo bash
18 # ./mk-deb-chroot libresoc
19 # exit
20 $ schroot -c libresoc
21 (libresoc)$ git clone https://git.libre-soc.org/git/dev-env-setup.git
22 (libresoc)$ cd dev-env-setup
23 (libresoc)$ sudo bash
24 (libresoc)# ./install-hdl-apt-reqs
25 (libresoc)# ./hdl-dev-repos
26 (libresoc)# exit
27 (libresoc)$
28
29 <https://git.libre-soc.org/?p=dev-env-setup.git;a=blob;f=hdl-dev-repos;hb=HEAD>
30
31 Additional scripts in the dev-env-setup repository will install yosys,
32 verilator, coriolis2, ghdl, gdb and so on: from the above it is pretty
33 straightforward and obvious to work out what to do (just run them).
34 There is an accompanying walkthrough video which goes through the above
35 <https://m.youtube.com/watch?v=1-4eJKTNrEk> and includes running some
36 unit tests, explaining some of the background, and also files some bugs.