Skip to content

Commit d3badb2

Browse files
authored
Testing what can be done to get the Rubik Pi 3 image to build (#128)
1 parent 1ca2668 commit d3badb2

File tree

2 files changed

+44
-23
lines changed

2 files changed

+44
-23
lines changed

.github/workflows/main.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ jobs:
107107
set -e
108108
echo "Running ${{ matrix.script }}"
109109
chmod +x "${{ matrix.script }}"
110-
"./${{ matrix.script }}" "Dev"
110+
"./${{ matrix.script }}"
111111
echo "Running install_common.sh"
112112
chmod +x "./install_common.sh"
113113
"./install_common.sh"

install_rubikpi3.sh

Lines changed: 43 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
set -ex +u
55

66
cd /tmp/build
7-
echo '=== Current directory: \$(pwd) ==='
7+
echo '=== Current directory: $(pwd) ==='
88
echo '=== Files in current directory: ==='
99
ls -la
1010

@@ -30,6 +30,7 @@ APT::Color "0";
3030
Dpkg::Use-Pty "0";
3131
EOF_DPKG
3232

33+
3334
# Make sure all the sources are available for apt
3435
cat > /etc/apt/sources.list.d/ubuntu.sources << EOF_UBUNTU_SOURCES
3536
Types: deb
@@ -39,6 +40,8 @@ Components: main universe restricted multiverse
3940
Signed-By: /usr/share/keyrings/ubuntu-archive-keyring.gpg
4041
EOF_UBUNTU_SOURCES
4142

43+
# diff /etc/apt/sources.list /etc/apt/sources.list.d/ubuntu.sources
44+
4245
apt-get -q update
4346

4447
# This needs to run before install.sh to fix some weird dependency issues
@@ -47,32 +50,36 @@ apt-get -y --allow-downgrades install libsqlite3-0=3.45.1-1ubuntu2
4750
# Add the GPG key for the RUBIK Pi PPA
4851
wget -qO - https://thundercomm.s3.dualstack.ap-northeast-1.amazonaws.com/uploads/web/rubik-pi-3/tools/key.asc | tee /etc/apt/trusted.gpg.d/rubikpi3.asc
4952

50-
# Run normal photon installer
51-
chmod +x ./install.sh
52-
./install.sh --install-nm=yes --arch=aarch64 --version="$1"
53-
54-
# Install packages from the RUBIK Pi PPA, we skip calling apt-get update here because install.sh already does that
55-
apt-get -y install libqnn1 libsnpe1 qcom-adreno1 device-tree-compiler
56-
57-
# Enable ssh
58-
systemctl enable ssh
59-
60-
# Remove extra packages too
61-
echo "Purging extra things"
53+
# Remove extra packages to make space
54+
echo "Space available before purging things"
55+
df -h
6256

6357
# get rid of snaps
6458
echo "Purging snaps"
6559
rm -rf /var/lib/snapd/seed/snaps/*
6660
rm -f /var/lib/snapd/seed/seed.yaml
67-
apt-get purge --yes lxd-installer lxd-agent-loader snapd gdb gcc g++ linux-headers* libgcc*-dev perl-modules* git vim-runtime
68-
apt-get autoremove -y
61+
apt-get purge --yes lxd-installer lxd-agent-loader snapd gdb gcc g++ linux-headers* libgcc*-dev perl-modules* git vim-runtime python3-twisted sosreport bluez
62+
apt-get autoremove --yes
6963

7064
rm -rf /var/lib/apt/lists/*
7165
apt-get clean
7266

7367
rm -rf /usr/share/doc
7468
rm -rf /usr/share/locale/
7569

70+
echo "Space available after purging things"
71+
df -h
72+
73+
# Run normal photon installer
74+
chmod +x ./install.sh
75+
./install.sh --install-nm=yes --arch=aarch64 --version="$1"
76+
77+
# Install packages from the RUBIK Pi PPA, we skip calling apt-get update here because install.sh already does that
78+
apt-get -y install libqnn1 libsnpe1 qcom-adreno1 device-tree-compiler
79+
80+
# Enable ssh
81+
systemctl enable ssh
82+
7683
# modify photonvision.service to run on A78 cores
7784
sed -i 's/# AllowedCPUs=4-7/AllowedCPUs=4-7/g' /lib/systemd/system/photonvision.service
7885
cp -f /lib/systemd/system/photonvision.service /etc/systemd/system/photonvision.service
@@ -82,13 +89,6 @@ cat /etc/systemd/system/photonvision.service
8289
# networkd isn't being used, this causes an unnecessary delay
8390
systemctl disable systemd-networkd-wait-online.service
8491

85-
# PhotonVision server is managing the network, so it doesn't need to wait for online
86-
# systemctl disable NetworkManager-wait-online.service
87-
88-
# Disable Bluetooth
89-
sed -i 's/^AutoEnable=.*/AutoEnable=false/g' /etc/bluetooth/main.conf
90-
systemctl disable bluetooth.service
91-
9292
# set the hostname during cloud-init and disable cloud-init after first boot
9393
cat >> /var/lib/cloud/seed/nocloud/user-data << EOFUSERDATA
9494
@@ -131,3 +131,24 @@ EOF_FAN_SERVICE
131131

132132
# 4. Enable the new service
133133
systemctl enable rubik-fan-max.service
134+
135+
echo "Space available before purging things"
136+
df -h /dev/loop0
137+
138+
rm -rf /var/lib/apt/lists/*
139+
df -h /dev/loop0
140+
141+
apt-get clean
142+
df -h /dev/loop0
143+
144+
rm -rf /usr/share/doc
145+
rm -rf /usr/share/locale/
146+
147+
# remove firmware that (probably) isn't needed
148+
rm -rf /usr/lib/firmware/mrvl
149+
rm -rf /usr/lib/firmware/mellanox
150+
rm -rf /usr/lib/firmware/nvidia
151+
rm -rf /usr/lib/firmware/intel
152+
153+
echo "Space available after purging things"
154+
df -h /dev/loop0

0 commit comments

Comments
 (0)