-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathinstall.sh
executable file
·74 lines (57 loc) · 1.83 KB
/
install.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
73
74
#!/bin/bash
CURRENT_DIR=`pwd`
# Install the prerequisites.
apt-get install device-tree-compiler
apt-get install libmpfr-dev
apt-get install libmpfc-dev
apt-get install makeinfo
# Installation directories
source directories.sh
mkdir -p $SPIKE_HOME_DIR || exit
mkdir -p $SPIKE_INSTALL_DIR || exit
cd $SPIKE_HOME_DIR
git clone https://github.com/riscv/riscv-isa-sim.git --depth 1
cd riscv-isa-sim
mkdir build
cd build
../configure --prefix=$SPIKE_INSTALL_DIR
make
make install
cd $CURRENT_DIR
# Install GNU Toolchain
mkdir -p $TOOLCHAIN_HOME_DIR || exit
mkdir -p $TOOLCHAIN_INSTALL_DIR || exit
cd $TOOLCHAIN_HOME_DIR
git clone https://github.com/riscv/riscv-gnu-toolchain.git --branch rvv-0.8.x --single-branch --depth 1 riscv-gnu-toolchain_rvv-0.8.x
cd riscv-gnu-toolchain_rvv-0.8.x
git submodule update --init --recursive --depth 1 riscv-binutils riscv-gcc riscv-glibc riscv-dejagnu riscv-newlib riscv-gdb
mkdir build
cd build
../configure --prefix=$TOOLCHAIN_INSTALL_DIR --enable-multilib
make
make install
cd $CURRENT_DIR
# Proxy kernel
mkdir -p $PK_HOME_DIR || exit
mkdir -p $PK_INSTALL_DIR || exit
cd $PK_HOME_DIR
git clone --depth 1 https://github.com/riscv/riscv-pk.git
cd riscv-pk
mkdir build
cd build
PATH=$TOOLCHAIN_INSTALL_DIR/bin/:$PATH ../configure --prefix=$PK_INSTALL_DIR --host=riscv64-unknown-elf
PATH=$TOOLCHAIN_INSTALL_DIR/bin/:$PATH make
PATH=$TOOLCHAIN_INSTALL_DIR/bin/:$PATH make install
cd $CURRENT_DIR
# Binutils
mkdir -p $BINUTILS_HOME_DIR || exit
mkdir -p $BINUTILS_INSTALL_DIR || exit
cd $BINUTILS_HOME_DIR || exit
git clone https://github.com/riscv/riscv-binutils-gdb.git --branch rvv-0.8.x --single-branch --depth 1 riscv-binutils-gdb_rvv-0.8.x
cd riscv-binutils-gdb_rvv-0.8.x
mkdir build
cd build
../configure --prefix=$BINUTILS_INSTALL_DIR --target riscv64-unknown-elf --enable-multilib
make
make install
cd $CURRENT_DIR