-
Notifications
You must be signed in to change notification settings - Fork 82
/
Copy pathget_started_mingw64.sh
executable file
·55 lines (48 loc) · 2.27 KB
/
get_started_mingw64.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
#!/bin/bash
echo "--------------------------------------------------------------------"
echo "This script installs all necessary packages and compiles Silice"
echo "Please refer to the script source code to see the list of packages"
echo "--------------------------------------------------------------------"
read -p "Please type 'y' to go ahead, any other key to exit: " -n 1 -r
if [[ ! $REPLY =~ ^[Yy]$ ]]
then
echo
echo "Exiting."
exit
fi
# -------------- install packages ----------------------------
pacman -S --noconfirm --needed unzip
pacman -S --noconfirm --needed wget
pacman -S --noconfirm --needed make
pacman -S --noconfirm --needed python3
pacman -S --noconfirm --needed python-pip
pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-riscv64-unknown-elf-toolchain
# pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-iverilog
# pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-gtkwave
# pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-verilator
# pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-openFPGALoader
pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-dfu-util
pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-boost
pacman -S --noconfirm --needed ${MINGW_PACKAGE_PREFIX}-glfw
# -------------- retrieve oss-cad-suite package --------------
OSS_CAD_MONTH=11
OSS_CAD_DAY=29
OSS_CAD_YEAR=2023
OSS_PACKAGE=oss-cad-suite-windows-x64-$OSS_CAD_YEAR$OSS_CAD_MONTH$OSS_CAD_DAY.exe
rm -rf tools/fpga-binutils/
rm -rf tools/oss-cad-suite/
rm -rf /usr/local/share/silice
wget -c https://github.com/YosysHQ/oss-cad-suite-build/releases/download/$OSS_CAD_YEAR-$OSS_CAD_MONTH-$OSS_CAD_DAY/$OSS_PACKAGE
mkdir -p /usr/local/share/silice
mv $OSS_PACKAGE /usr/local/share/silice/
cp tools/oss-cad-suite-env.sh /usr/local/share/silice/
cd /usr/local/share/silice ; ./$OSS_PACKAGE ; rm ./$OSS_PACKAGE ; cd -
# -------------- compile Silice -----------------------------
./compile_silice_mingw64.sh
# -------------- add path to .bashrc ------------------------
DIR=`pwd`
echo 'source /usr/local/share/silice/oss-cad-suite-env.sh' >> ~/.bashrc
echo ""
echo "--------------------------------------------------------------------"
echo "Please start a new shell before using Silice (PATH has been changed)"
echo "--------------------------------------------------------------------"