Skip to content

Commit

Permalink
remove redundant installs
Browse files Browse the repository at this point in the history
  • Loading branch information
crschardt committed Aug 17, 2024
1 parent 2e5046f commit bfc6c17
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 38 deletions.
2 changes: 1 addition & 1 deletion install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,6 @@ fi
echo "Installing the JRE..."
if ! package_is_installed openjdk-17-jre-headless
then
apt-get update
apt-get install --yes openjdk-17-jre-headless
fi
echo "JRE installation complete."
Expand All @@ -129,6 +128,7 @@ echo "Installing additional math packages"
if [[ "$DISTRO" = "Ubuntu" && -z $(apt-cache search libcholmod3) ]]; then
echo "Adding jammy to list of apt sources"
add-apt-repository -y -S 'deb http://ports.ubuntu.com/ubuntu-ports jammy main universe'
apt-get --quiet update
fi
apt-get install --yes libcholmod3 liblapack3 libsuitesparseconfig5

Expand Down
8 changes: 3 additions & 5 deletions install_limelight.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,12 +28,10 @@ apt-get autoremove -y
echo "Installing additional things"
sudo apt-get update
apt-get install -y pigpiod pigpio device-tree-compiler libraspberrypi-bin
apt-get install -y network-manager
apt-get install -y net-tools
apt-get install -y network-manager net-tools
# libcamera-driver stuff
apt-get install -y libegl1 libopengl0 libopencv-core406 libgl1-mesa-dri libcamera0.1 libgbm1 libatomic1
# mrcal stuff
apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
apt-get install -y libegl1 libopengl0 libopencv-core406 libgl1-mesa-dri libcamera0.1 libgbm1


rm -rf /var/lib/apt/lists/*
apt-get clean
Expand Down
28 changes: 4 additions & 24 deletions install_opi5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,7 @@ echo "Freed up $freed KiB"
./install.sh -m -q

echo "Installing additional things"

apt-get install --yes --quiet network-manager net-tools libatomic1
apt-get install --yes --quiet libc6 libstdc++6

# let netplan create the config during cloud-init
rm -f /etc/netplan/00-default-nm-renderer.yaml
Expand All @@ -48,17 +47,12 @@ cp -f ./OPi5_CIDATA/network-config /boot/network-config
# add customized user-data file for cloud-init
cp -f ./OPi5_CIDATA/user-data /boot/user-data

# tell NetworkManager not to wait for the carrier on ethernet, which can delay boot
# when the coprocessor isn't connected to the ethernet
# cat > /etc/NetworkManager/conf.d/50-ignore-carrier.conf <<EOF
# [main]
# ignore-carrier=*
# EOF

# modify photonvision.service to wait for the network before starting
# this helps ensure that photonvision detects the network the first time it starts
# but it may cause a startup delay if the coprocessor isn't connected to a network
sed -i '/Description/aAfter=network-online.target' /etc/systemd/system/photonvision.service
sed -i '/Description/aAfter=network-online.target' /lib/systemd/system/photonvision.service
cp /lib/systemd/system/photonvision.service /etc/systemd/system/photonvision.service
chmod 644 /etc/systemd/system/photonvision.service
cat /etc/systemd/system/photonvision.service

# networkd isn't being used, this causes an unnecessary delay
Expand All @@ -67,20 +61,6 @@ systemctl disable systemd-networkd-wait-online.service
# the bluetooth service isn't needed and causes a delay at boot
systemctl disable ap6275p-bluetooth.service

apt-get install --yes --quiet libc6 libstdc++6

if [ $(cat /etc/lsb-release | grep -c "24.04") -gt 0 ]; then
# add jammy to apt sources
echo "Adding jammy to list of apt sources"
add-apt-repository -y -S 'deb http://ports.ubuntu.com/ubuntu-ports jammy main universe'
fi

apt-get --quiet update

# mrcal stuff
apt-get install --yes --quiet libcholmod3 liblapack3 libsuitesparseconfig5


rm -rf /var/lib/apt/lists/*
apt-get --yes --quiet clean

Expand Down
12 changes: 4 additions & 8 deletions install_pi.sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Run normal photon installer
./install.sh
./install.sh -q

# and edit boot partition
install -m 644 config.txt /boot/
Expand All @@ -18,20 +18,16 @@ systemctl enable ssh
systemctl enable pigpiod

# Remove extra packages too

echo "Purging extra things"
apt-get purge -y python3 gdb gcc g++ linux-headers* libgcc*-dev device-tree-compiler
apt-get autoremove -y

echo "Installing additional things"
sudo apt-get update
apt-get install -y pigpiod pigpio device-tree-compiler libraspberrypi-bin
apt-get install -y network-manager
apt-get install -y net-tools
# libcamera-driver stuff + libatomic1 for wpilib
apt-get install -y libegl1 libopengl0 libopencv-core406 libgl1-mesa-dri libcamera0.1 libgbm1 libatomic1
# mrcal stuff
apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
apt-get install -y network-manager net-tools
# libcamera-driver stuff
apt-get install -y libegl1 libopengl0 libopencv-core406 libgl1-mesa-dri libcamera0.1 libgbm1


rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit bfc6c17

Please sign in to comment.