fix(deck): Prevent BIOS updates on DeckHD and 32GB decks even if requested.

This commit is contained in:
Kyle Gospodnetich 2023-12-05 16:41:19 -08:00
parent e9f304bfb5
commit 162dd801a6

View File

@ -356,7 +356,14 @@ enable-deck-bios-firmware-updates:
#!/usr/bin/env bash
SYS_ID="$(cat /sys/devices/virtual/dmi/id/product_name)"
if [[ ":Jupiter:" =~ ":$SYS_ID:" || ":Galileo:" =~ ":$SYS_ID:" ]]; then
RESOLUTION=$(sudo lshw -json -c display | jq -r .[]."configuration"."resolution")
if [[ "${RESOLUTION}" = "1200,1920" ]]; then
echo "DeckHD detected. Firmware updates enabled. BIOS updates not enabled."
elif [[ "$(awk '/MemTotal/{print $(NF-1)}' /proc/meminfo)" == "31664740" ]]; then
echo "32GB RAM modded Deck detected. Firmware updates enabled. BIOS updates not enabled."
else
sudo systemctl enable jupiter-biosupdate.service
fi
sudo systemctl enable jupiter-controller-update.service
else
echo "This is only applicable to Valve's Steam Deck. Aborting..."