add chicken pic
[libreriscv.git] / HDL_workflow / coriolis2.mdwn
1 # Installing Coriolis2
2
3 ## debootstrap
4
5 First set up an schroot debootstrap jail with debian 9.0.
6 Follow these instructions taken from here:
7 <https://www.debian.org/releases/stretch/amd64/apds03.html.en>
8
9 In advance, edit /etc/fstab and add mount points: personally I prefer using
10 mount --bind points
11
12 /dev /home/chroot/coriolis/dev none bind 0 0
13 /dev/pts /home/chroot/coriolis/dev/pts none bind 0 0
14 /proc /home/chroot/coriolis/proc none bind 0 0
15 /sys /home/chroot/coriolis/sys none bind 0 0
16 /tmp /home/chroot/coriolis/tmp none bind 0 0
17
18 Then run these commands:
19
20 sudo bash
21 apt-get install debootstrap schroot
22 mkdir /opt/chroot/coriolis
23 /usr/sbin/debootstrap stretch !$ http://ftp.us.debian.org/debian
24 mount -a
25 echo "coriolis2" > /home/chroot/coriolis/etc/debian_chroot
26
27 To do some preparation (users):
28
29 chroot /home/chroot/coriolis2 /bin/bash
30 adduser {yourpreferredusername}
31
32 It is best to make the username the same as the first user that
33 was added during the debian install, so that uid 1001 matches between
34 both main and chroot. Alternatively, /etc/passwd and /etc/group may
35 be mount-bound as well as /home however if you later forget you did
36 this and decide to delete the chroot, you will delete the entire /home
37 of your main system, as well as /etc/passwd.
38
39 You may wish to follow some of the other things such as configuring apt,
40 locales and keyboard. bootloader, kernel, ssh access, all these are
41 unnecessary. do run "apt clean" to clear out /var/cache/apt/archives
42 in the chroot.
43
44 ## schroot
45
46 Create an schroot file section:
47
48 [coriolis]
49 description=Debian Stable for Coriolis
50 directory=/home/chroot/coriolis
51 groups=sbuild-security,lkcl,users
52
53 Now as an *ordinary* user - not as root - you may type:
54
55 lkcl@fizzy:~$ schroot -c coriolis
56
57 and, due to the contents of /etc/debian\_chroot, the prompt should become:
58
59 (coriolis2)lkcl@fizzy:~$
60
61 ## coriolis2
62
63 These are nominally taken from
64 <https://www-soc.lip6.fr/equipe-cian/logiciels/coriolis/>
65 however there are errors in the original at the moment.
66 Do not try qt5, it will not work.
67
68 In ~/.bash\_profile add the following so that builds (rebuilds) if you need
69 them will be quicker, and you can run the GUI from the chroot:
70
71 export PATH=/usr/lib/ccache:"$PATH"
72 export DISPLAY=:0.0
73
74 Second (or at a new terminal / xterm), log in as root on the host (not
75 the chroot) then do schroot -c coriolis to get to be root in the chroot
76 (or, you can install sudo in the chroot and then do "sudo bash" in the
77 chroot).
78
79 Then run the following commands, as root, *in* the chroot:
80
81 apt-get update
82 apt-get install -y build-essential binutils-dev \
83 git cmake bison flex gcc python-dev \
84 libboost-all-dev libboost-python-dev \
85 zlib1g-dev \
86 libbz2-dev libxml2-dev rapidjson-dev libbz2-dev \
87 doxygen dvipng graphviz python-sphinx \
88 texlive-fonts-extra texlive-lang-french \
89 libqwt-dev qt4-dev-tools python-qt4
90
91 mkdir -p ~/coriolis-2.x/src
92 cd ~/coriolis-2.x/src
93 git clone https://www-soc.lip6.fr/git/coriolis.git
94
95 cd coriolis
96 git checkout devel
97 ./bootstrap/ccb.py --project=coriolis --make="-j4 install"
98
99 To set up the alliance environment, run this:
100
101 eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`
102
103 For convenience that may be placed in a file and "sourced", to avoid
104 having to look this page up every time
105
106 echo "eval `~/coriolis-2.x/src/coriolis/bootstrap/coriolisEnv.py`" > \
107 ~/coriolisenv
108 source ~/coriolisenv
109
110 To run the graphical editor go to the bin directory
111
112 cd ~/coriolis-2.x/Linux.MyARCH/Release.Shared/install/bin
113 ./cgt
114
115 Then run the following commands from the menubar
116
117 Tutorials / Run Demo (Python Flavour)
118
119 The following window will appear
120
121 [[!img chicken.png ]]
122
123 click on the chicken several times