Skip to content

Commit 9d1dc35

Browse files
adamperkowskinnyyxxxxlj3954ChrisTitusTech
authored
📃 feat: Linux Neptune (Valve's kernel for SteamDeck) installation (#683)
* Linux Neptune installation script * fixed some stuff that's not supposed to be here Co-authored-by: nnyyxxxx <[email protected]> * fix repo check * added audio patches #269 (comment) * add linux neptune to docs (userguide) * steamdeck precondition Co-authored-by: Liam <[email protected]> * precondition fix * another precondition fix --------- Co-authored-by: nnyyxxxx <[email protected]> Co-authored-by: Liam <[email protected]> Co-authored-by: Chris Titus <[email protected]>
1 parent 1234edd commit 9d1dc35

File tree

4 files changed

+73
-0
lines changed

4 files changed

+73
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
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

core/tabs/system-setup/tab_data.toml

+11
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,17 @@ script = "arch/server-setup.sh"
1515
task_list = "SI D"
1616
multi_select = false
1717

18+
[[data.entries]]
19+
name ="Linux Neptune for SteamDeck"
20+
description = "Valve's fork of Linux Kernel for the SteamDeck"
21+
script = "arch/linux-neptune.sh"
22+
task_list = "I PFM K"
23+
24+
[[data.entries.preconditions]]
25+
matches = true
26+
data = { file = "/sys/devices/virtual/dmi/id/board_vendor" }
27+
values = [ "Valve" ]
28+
1829
[[data.entries]]
1930
name = "Paru AUR Helper"
2031
description = "Paru is your standard pacman wrapping AUR helper with lots of features and minimal interaction. To know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers"

docs/userguide.md

+1
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,7 @@ https://github.com/ChrisTitusTech/dwm-titus
8686
### Arch Linux
8787

8888
- **Arch Server Setup**: This command installs a minimal arch server setup under 5 minutes.
89+
- **Linux Neptune for SteamDeck**: Valve's fork of Linux Kernel for the SteamDeck
8990
- **Paru AUR Helper**: Paru is your standard pacman wrapping AUR helper with lots of features and minimal interaction. To know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers
9091
- **Yay AUR Helper**: Yet Another Yogurt - An AUR Helper Written in Go. To know more about AUR helpers visit: https://wiki.archlinux.org/title/AUR_helpers
9192

tui/src/state.rs

+1
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ D - disk modifications (ex. partitioning) (privileged)
3030
FI - flatpak installation
3131
FM - file modification
3232
I - installation (privileged)
33+
K - kernel modifications (privileged)
3334
MP - package manager actions
3435
SI - full system installation
3536
SS - systemd actions (privileged)

0 commit comments

Comments
 (0)