-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathinstall_matter.sh
70 lines (48 loc) · 1.94 KB
/
install_matter.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
#!/bin/bash
# THIS DOES NOT INSTALL THE ADDON, IT INSTALLS MATTER "RAW". USED TO TEST.
# BASED ON: https://community.arm.com/arm-community-blogs/b/internet-of-things-blog/posts/build-a-matter-home-automation-service-using-raspberry-pi-arm-virtual-hardware-and-python
# IT USES A LOT OF SPACE, SO CANNOT BE RUN ON A CANDLE CONTROLLER, OR YOU WILL RUN OUT OF SPACE
echo
echo "_"
echo "__"
echo "____in install_matter.sh___"
echo
sudo apt-get update
#sudo apt-get install -y libcairo2-dev pkg-config python3-dev
#sudo apt-get install -y git gcc g++ python3 pkg-config libssl-dev libdbus-1-dev libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev
sudo apt-get install git gcc g++ pkg-config libssl-dev libdbus-1-dev \
libglib2.0-dev libavahi-client-dev ninja-build python3-venv python3-dev \
python3-pip unzip libgirepository1.0-dev libcairo2-dev libreadline-dev \
libsdl2-dev pi-bluetooth avahi-utils
sudo apt-get install -y clang protobuf-compiler llvm
pip install --upgrade pip
# maybe not necessary
export PATH=$PATH:/usr/bin/clang-11:/usr/bin/clang++-11
rm rust_installer.sh
curl https://sh.rustup.rs -sSf -o rust_installer.sh
sudo chmod +x rust_installer.sh
#echo "1 " | ./rust_installer.sh
yes 1 | ./rust_installer.sh
source "$HOME/.cargo/env"
if [ ! -f /bin/gn ]; then
git clone https://gn.googlesource.com/gn
cd gn
python build/gen.py
ninja -C out
sudo cp out/gn /bin/gn
cd ~
else
echo "GN was already installed"
fi
rm -rf connectedhomeip
git clone --recurse-submodules git@github.com:project-chip/connectedhomeip.git
#git clone https://github.com/project-chip/connectedhomeip.git
#cd connectedhomeip
#./scripts/checkout_submodules.py --shallow --platform linux
./scripts/build/gn_bootstrap.sh
source scripts/activate.sh
# builds the test client
./scripts/build_python.sh -d true -i separate
echo
echo "DONE"
echo