-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy pathtools.sh
executable file
·72 lines (58 loc) · 1.57 KB
/
tools.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
#!/bin/bash
# SPDX-FileCopyrightText: 2023 "Everybody"
#
# SPDX-License-Identifier: MIT
install_verilator(){
sudo apt-get update
sudo apt install -y git make autoconf g++ flex libfl-dev bison # First time prerequisites
git clone https://github.com/verilator/verilator.git # Only first time
unset VERILATOR_ROOT # For bash
cd verilator
git pull # Make sure we're up-to-date
git checkout v4.216
autoconf # Create ./configure script
./configure --prefix ~/tools
make -j$(nproc)
make install
cd ..
}
install_NaxSoftware(){
(cd $VEXIIRISCV/ext/NaxSoftware && ./init.sh)
}
install_spike(){
cd $VEXIIRISCV/ext/riscv-isa-sim
mkdir build
cd build
../configure --prefix=$RISCV --enable-commitlog --without-boost --without-boost-asio --without-boost-regex
make -j$(nproc)
}
install_rvls(){
cd $VEXIIRISCV/ext/rvls
make -j$(nproc)
cp -f build/apps/rvls.so ~/tools/rvls.so
}
install_elfio(){
git clone https://github.com/serge1/ELFIO.git
cd ELFIO
git checkout d251da09a07dff40af0b63b8f6c8ae71d2d1938d # Avoid C++17
sudo cp -R elfio /usr/include
cd ..
}
install_packages(){
sudo apt-get update
sudo apt install -y zlib1g-dev libboost-all-dev libboost-dev libasio-dev device-tree-compiler libsdl2-2.0-0 libsdl2-dev
install_elfio
}
install_uncached(){
export VEXIIRISCV=${PWD}
install_NaxSoftware
mkdir -p $VEXIIRISCV/ext/rvls/build/apps
cp -f ~/tools/rvls.so $VEXIIRISCV/ext/rvls/build/apps/rvls.so
}
install_cached(){
export VEXIIRISCV=${PWD}
mkdir -p ~/tools
(install_spike)
(install_rvls)
(install_verilator)
}