-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathprovision_box.sh
More file actions
104 lines (91 loc) · 1.9 KB
/
Copy pathprovision_box.sh
File metadata and controls
104 lines (91 loc) · 1.9 KB
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
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
#!/bin/bash
cd /home/vagrant
echo "export HOST_IP=10.0.2.2" >> .bashrc
echo "export HOST_IP=10.0.2.2" >> .zshrc
sudo apt update
sudo apt update --fix-missing
sudo apt upgrade
sudo apt install -y \
git \
locales \
locales-all \
make \
build-essential \
gcc-arm-none-eabi \
gdb \
gdb-multiarch \
bear \
clangd \
stlink-tools \
python3 \
python3-pip \
python3-venv \
curl \
wget \
nano \
vim \
net-tools \
can-utils \
screen \
cmake
# install buildroot dependencies
sudo apt install -y \
sed \
make \
binutils \
gcc \
g++ \
bash \
patch \
gzip \
bzip2 \
perl \
tar \
cpio \
unzip \
rsync \
wget \
libncurses-dev \
coreutils \
flex \
bison \
bc
# install latest NodeJS
sudo curl -sL https://deb.nodesource.com/setup_16.x -o /tmp/nodesource_setup.sh
sudo bash /tmp/nodesource_setup.sh
sudo apt install -y nodejs
# build openocd from source cus the apt version can be weirdge
sudo apt install -y \
libtool \
pkg-config \
autoconf \
automake \
texinfo \
libusb-1.0-0-dev
git clone https://github.com/openocd-org/openocd.git
cd openocd
git checkout tags/v0.11.0
./bootstrap
./configure --enable-stlink --enable-ftdi --enable-jlink
make
sudo make install
cd ..
rm -rf openocd
# install useful python libraries...
pip3 install \
gdbgui \
python-can \
pygments \
numpy \
pandas \
click
# install flatc from source
git clone https://github.com/google/flatbuffers.git
cd flatbuffers
# This hash happens to corrispond the the commit that is working with our current tool chain. This should prevent future commits to flatbuffers from breaking future members virtual machines.
git checkout 7edf8c90842aaa402257bf99989b58b8147ceabf
cmake -G "Unix Makefiles" -DCMAKE_BUILD_TYPE=Release
make
sudo make install
cd ..
rm -rf flatbuffers