Skip to content

Commit 4d7a00c

Browse files
authored
Provisional orange pi 6 plus image builder (#126)
1 parent 47487f7 commit 4d7a00c

File tree

2 files changed

+62
-0
lines changed

2 files changed

+62
-0
lines changed

.github/workflows/main.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,9 @@ jobs:
5757
- name: opi5max
5858
script: ./install_opi5.sh
5959
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-max.img.xz
60+
- name: opi6plus
61+
script: ./install_opi6.sh
62+
base_image: https://sidequests.reduxrobotics.com/opi6/Orangepi6plus_1.0.2_debian_bookworm_server_linux6.6.89.img.xz
6063
- name: rock5c
6164
script: ./install_opi5.sh
6265
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.4.0/ubuntu-24.04-preinstalled-server-arm64-rock-5c.img.xz

install_opi6.sh

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
#!/bin/bash
2+
3+
# Exit on errors, print commands, ignore unset variables
4+
set -ex +u
5+
6+
# change hostname
7+
sed -i 's/orangepi6plus/photonvision/g' /etc/hostname
8+
sed -i 's/orangepi6plus/photonvision/g' /etc/hosts
9+
10+
# silence log spam from dpkg
11+
cat > /etc/apt/apt.conf.d/99dpkg.conf << EOF
12+
Dpkg::Progress-Fancy "0";
13+
APT::Color "0";
14+
Dpkg::Use-Pty "0";
15+
EOF
16+
17+
apt-get -q update
18+
19+
before=$(df --output=used / | tail -n1)
20+
# clean up stuff
21+
22+
# remove build-essential for minor space savings
23+
apt-get --yes purge --allow-change-held-packages -q *-dev git
24+
apt-get --yes autoremove --allow-change-held-packages --purge
25+
26+
after=$(df --output=used / | tail -n1)
27+
freed=$(( before - after ))
28+
echo "Freed up $freed KiB"
29+
30+
# run Photonvision install script
31+
chmod +x ./install.sh
32+
./install.sh --install-nm=yes --arch=aarch64 --version="$1"
33+
34+
echo "Installing additional things"
35+
apt-get --yes -qq install libc6 libstdc++6
36+
37+
# modify photonvision.service to enable big cores
38+
# For reasons beyond human comprehension, the little cores are on 2, 3, 4, and 5.
39+
sed -i 's/# AllowedCPUs=4-7/AllowedCPUs=0,1,6-11/g' /lib/systemd/system/photonvision.service
40+
cp -f /lib/systemd/system/photonvision.service /etc/systemd/system/photonvision.service
41+
chmod 644 /etc/systemd/system/photonvision.service
42+
cat /etc/systemd/system/photonvision.service
43+
44+
# networkd isn't being used, this causes an unnecessary delay
45+
systemctl disable systemd-networkd-wait-online.service
46+
47+
# PhotonVision server is managing the network, so it doesn't need to wait for online
48+
systemctl disable NetworkManager-wait-online.service
49+
50+
# there's no internal bluetooth or wifi on the opi6plus
51+
52+
# there's also no...preinstalled ssh keys.
53+
ssh-keygen -A
54+
55+
rm -rf /var/lib/apt/lists/*
56+
apt-get --yes -qq clean
57+
58+
rm -rf /usr/share/doc
59+
rm -rf /usr/share/locale/

0 commit comments

Comments
 (0)