|
| 1 | +#!/bin/sh -e |
| 2 | + |
| 3 | +. ../../common-script.sh |
| 4 | + |
| 5 | +setUpRepos() { |
| 6 | + if ! grep -q "^\s*\[jupiter-staging\]" /etc/pacman.conf; then |
| 7 | + printf "%b\n" "${CYAN}Adding jupiter-staging to pacman repositories...${RC}" |
| 8 | + echo "[jupiter-staging]" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf |
| 9 | + echo "Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/\$repo/os/\$arch" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf |
| 10 | + echo "SigLevel = Never" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf |
| 11 | + fi |
| 12 | + if ! grep -q "^\s*\[holo-staging\]" /etc/pacman.conf; then |
| 13 | + printf "%b\n" "${CYAN}Adding holo-staging to pacman repositories...${RC}" |
| 14 | + echo "[holo-staging]" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf |
| 15 | + echo "Server = https://steamdeck-packages.steamos.cloud/archlinux-mirror/\$repo/os/\$arch" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf |
| 16 | + echo "SigLevel = Never" | "$ESCALATION_TOOL" tee -a /etc/pacman.conf |
| 17 | + fi |
| 18 | +} |
| 19 | + |
| 20 | +installKernel() { |
| 21 | + if ! "$PACKAGER" -Q | grep -q "\blinux-neptune"; then |
| 22 | + printf "%b\n" "${CYAN}Installing linux-neptune..." |
| 23 | + "$ESCALATION_TOOL" "$PACKAGER" -Syyu --noconfirm |
| 24 | + "$ESCALATION_TOOL" "$PACKAGER" -S --noconfirm linux-neptune linux-neptune-headers steamdeck-dsp jupiter-staging/alsa-ucm-conf |
| 25 | + "$ESCALATION_TOOL" mkinitcpio -P |
| 26 | + else |
| 27 | + printf "%b\n" "${GREEN}linux-neptune detected. Skipping installation.${RC}" |
| 28 | + fi |
| 29 | + |
| 30 | + if [ -f /etc/default/grub ]; then |
| 31 | + printf "%b\n" "${CYAN}Updating GRUB...${RC}" |
| 32 | + if ! grep -q '^UPDATEDEFAULT=' /etc/default/grub; then |
| 33 | + echo 'UPDATEDEFAULT=yes' | "$ESCALATION_TOOL" tee -a /etc/default/grub |
| 34 | + else |
| 35 | + "$ESCALATION_TOOL" sed -i 's/^UPDATEDEFAULT=.*/UPDATEDEFAULT=yes/' /etc/default/grub |
| 36 | + fi |
| 37 | + if [ -f /boot/grub/grub.cfg ]; then |
| 38 | + "$ESCALATION_TOOL" grub-mkconfig -o /boot/grub/grub.cfg |
| 39 | + else |
| 40 | + printf "%b\n" "${RED}GRUB configuration file not found. Run grub-mkconfig manually.${RC}" |
| 41 | + fi |
| 42 | + else |
| 43 | + printf "%b\n" "${RED}GRUB not detected. Manually set your bootloader to use linux-neptune.${RC}" |
| 44 | + fi |
| 45 | +} |
| 46 | + |
| 47 | +copyFirmwareFiles() { |
| 48 | + printf "%b\n" "${CYAN}Copying firmware files...${RC}" |
| 49 | + "$ESCALATION_TOOL" mkdir -p /usr/lib/firmware/cirrus |
| 50 | + "$ESCALATION_TOOL" cp /usr/lib/firmware/cs35l41-dsp1-spk-cali.bin /usr/lib/firmware/cirrus/ |
| 51 | + "$ESCALATION_TOOL" cp /usr/lib/firmware/cs35l41-dsp1-spk-cali.wmfw /usr/lib/firmware/cirrus/ |
| 52 | + "$ESCALATION_TOOL" cp /usr/lib/firmware/cs35l41-dsp1-spk-prot.bin /usr/lib/firmware/cirrus/ |
| 53 | + "$ESCALATION_TOOL" cp /usr/lib/firmware/cs35l41-dsp1-spk-prot.wmfw /usr/lib/firmware/cirrus/ |
| 54 | +} |
| 55 | + |
| 56 | +checkEnv |
| 57 | +checkEscalationTool |
| 58 | +setUpRepos |
| 59 | +installKernel |
| 60 | +copyFirmwareFiles |
0 commit comments