@@ -7,19 +7,21 @@ BINUTILS_URL=http://ftp.gnu.org/gnu/binutils/binutils-2.25.tar.gz
7
7
GCC_URL=http://mirrors-usa.go-parts.com/gcc/releases/gcc-4.9.3/gcc-4.9.3.tar.bz2
8
8
TARGET=lm32-elf
9
9
10
- OUTPUT_DIR=$SETUP_DIR /gnu/output
10
+ BUILD_DIR=$SETUP_DIR /../build
11
+ GNU_DIR=$BUILD_DIR /gnu
12
+ OUTPUT_DIR=$GNU_DIR /output
11
13
mkdir -p $OUTPUT_DIR
12
14
13
15
export PATH=$OUTPUT_DIR /bin:$PATH
14
16
15
17
set -x
16
18
set -e
17
19
20
+ sudo apt-get install -y build-essential
21
+
18
22
# Get and build gcc+binutils for the target
19
23
(
20
- sudo apt-get install -y build-essential
21
-
22
- cd gnu
24
+ cd $GNU_DIR
23
25
# Download binutils + gcc
24
26
(
25
27
mkdir -p download
@@ -52,21 +54,40 @@ set -e
52
54
)
53
55
)
54
56
57
+ # Get iverilog
58
+ (
59
+ sudo apt-get install -y iverilog
60
+ )
61
+
62
+
55
63
# Get migen
56
64
(
57
- git clone https://github.com/m-labs/migen.git
58
- cd migen
65
+ cd $BUILD_DIR
66
+ if [ -e migen ]; then
67
+ cd migen
68
+ git pull
69
+ else
70
+ git clone https://github.com/m-labs/migen.git
71
+ cd migen
72
+ fi
59
73
cd vpi
60
74
make all
61
75
sudo make install
62
76
)
63
77
64
78
# Get misoc
65
- git clone https://github.com/m-labs/misoc.git
79
+ (
80
+ cd $BUILD_DIR
81
+ git clone https://github.com/m-labs/misoc.git
82
+ cd misoc
83
+ git submodule init
84
+ git submodule update
85
+ )
66
86
67
87
# Get libfpgalink
68
88
(
69
- sudo apt-get install build-essential libreadline-dev libusb-1.0-0-dev python-yaml
89
+ cd $BUILD_DIR
90
+ sudo apt-get install -y libreadline-dev libusb-1.0-0-dev python-yaml
70
91
wget -qO- http://tiny.cc/msbil | tar zxf -
71
92
72
93
cd makestuff/libs
@@ -75,7 +96,8 @@ git clone https://github.com/m-labs/misoc.git
75
96
make deps
76
97
)
77
98
78
- # Get the HDMI2USB-misoc-firmware
79
- git clone https://github.com/timvideos/HDMI2USB-misoc-firmware.git
99
+ sudo apt-get install -y gtkwave
100
+
101
+ echo " Completed. To load environment:"
102
+ echo " source HDMI2USB-misoc-firmware/scripts/setup-env.sh"
80
103
81
- sudo apt-get install -y iverilog gtkwave
0 commit comments