forked from PhotonVision/photon-image-modifier
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall_dev_pi.sh
More file actions
48 lines (37 loc) · 1.28 KB
/
install_dev_pi.sh
File metadata and controls
48 lines (37 loc) · 1.28 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
#!/bin/bash
# Exit on errors, print commands, ignore unset variables
set -ex +u
# silence log spam from dpkg
cat > /etc/apt/apt.conf.d/99dpkg.conf << EOF
Dpkg::Progress-Fancy "0";
APT::Color "0";
Dpkg::Use-Pty "0";
EOF
# Run normal photon installer
chmod +x ./install.sh
./install.sh --install-nm=yes --arch=aarch64
# and edit boot partition
install -m 644 config.txt /boot/
install -m 644 userconf.txt /boot/
# configure hostname
echo "photonvision" > /etc/hostname
sed -i 's/raspberrypi/photonvision/g' /etc/hosts
# Kill wifi and other networking things
install -v -m 644 -D -t /etc/systemd/system/dhcpcd.service.d/ files/wait.conf
install -v files/rpi-blacklist.conf /etc/modprobe.d/blacklist.conf
# Enable ssh
systemctl enable ssh
echo "Installing additional things"
sudo apt-get update
apt-get install -y device-tree-compiler
apt-get install -y network-manager net-tools
# libcamera-driver stuff
apt-get install -y libegl1 libopengl0 libgl1-mesa-dri libgbm1 libegl1-mesa-dev libcamera-dev cmake build-essential libdrm-dev libgbm-dev default-jdk openjdk-17-jdk
# Remove extra packages too
# echo "Purging extra things"
# apt-get purge -y gdb gcc g++ linux-headers* libgcc*-dev
# apt-get autoremove -y
rm -rf /var/lib/apt/lists/*
apt-get clean
rm -rf /usr/share/doc
rm -rf /usr/share/locale/