Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updates for 20231114.1003 #215

Merged
merged 22 commits into from
Nov 16, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
22 commits
Select commit Hold shift + click to select a range
cbfb42b
steam-jupiter: 1.0.0.76 -> 1.0.0.78
samueldr Nov 15, 2023
e781c13
jupiter-hw-support: 20231026.1 -> 20231114.1
samueldr Nov 15, 2023
6c8316d
steamdeck-bios-fwupd: Rework to support galileo
samueldr Nov 15, 2023
5d38131
jupiter-fan-control: 20230209.1 -> 20231114.3
samueldr Nov 15, 2023
9a16f6f
steamdeck-dsp: init at 0.38
samueldr Nov 15, 2023
204cffa
steamdeck/sound: Use new UCM file location
samueldr Nov 15, 2023
4699daf
gamescope: 3.12.6 -> 3.13.3
K900 Nov 15, 2023
65865f1
overlay: be consistent about which callPackage we use
K900 Nov 15, 2023
9029279
galileo-mura: init at 0.3
K900 Nov 15, 2023
ec5ceb8
gamescope-session: 3.12.6-1.2 -> 3.13.2-1
K900 Nov 15, 2023
35e1918
linux-firmware: 20230420 -> 20231113.1
K900 Nov 15, 2023
9075150
linux-jovian: 6.1.52-valve4 -> 6.1.52-valve5, sync config
K900 Nov 15, 2023
c28bbc0
mangohud: 0.7.0.r63 -> 0.7.0.r68
K900 Nov 15, 2023
768de65
mesa-radv-jupiter: 23.3.0-steamos-23.9.1 -> 23.3.0-steamos-23.9.2
K900 Nov 15, 2023
92d03c7
steamdeck-dsp: fix docs build
K900 Nov 15, 2023
12765dc
steamdeck/firmware: also install DSP firmware
K900 Nov 15, 2023
adf7096
steamdeck-dsp: fix non-existent path references
K900 Nov 15, 2023
30ccd01
gamescope-session: fix wallpaper path
K900 Nov 15, 2023
350d001
jupiter-hw-support: install the new firmware helper
K900 Nov 15, 2023
5c55cfa
jupiter-hw-support: chmod +x
K900 Nov 15, 2023
34fd2b2
jupiter-hw-support: 20231114.1 -> 20231115.1
samueldr Nov 16, 2023
16d546f
gamescope{,-session}: 3.13.3 -> 3.13.5
K900 Nov 16, 2023
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion modules/steamdeck/firmware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,10 @@ in

config = mkMerge [
(mkIf (cfg.enable) {
hardware.firmware = [(lib.hiPrio pkgs.linux-firmware-jupiter)];
hardware.firmware = [
(lib.hiPrio pkgs.linux-firmware-jupiter)
(lib.hiPrio pkgs.steamdeck-dsp)
];
})
(mkIf (cfg.autoUpdate) {
systemd.packages = [pkgs.steamdeck-firmware];
Expand Down
2 changes: 1 addition & 1 deletion modules/steamdeck/sound.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ let
cp -r --no-preserve=all ${pkgs.alsa-ucm-conf} $out

# override acp5x configs with Jovian stuff
cp -rf ${pkgs.jupiter-hw-support}/share/alsa $out/share
cp -rf ${pkgs.steamdeck-dsp}/share/alsa $out/share

# remove more specific upstream symlink so Valve acp5x config is picked
rm $out/share/alsa/ucm2/conf.d/acp5x/Valve-Jupiter-1.conf
Expand Down
13 changes: 8 additions & 5 deletions overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,16 @@ rec {
linux-firmware = super.linux-firmware;
};
linuxPackages_jovian = linuxPackagesFor final.linux_jovian;
linux_jovian = super.callPackage ./pkgs/linux-jovian {
linux_jovian = final.callPackage ./pkgs/linux-jovian {
kernelPatches = [
kernelPatches.bridge_stp_helper
kernelPatches.request_key_helper
kernelPatches.export-rt-sched-migrate
];
};

galileo-mura = final.callPackage ./pkgs/galileo-mura { };

gamescope = final.callPackage ./pkgs/gamescope {
gamescope' = super.gamescope;
};
Expand Down Expand Up @@ -46,12 +48,13 @@ rec {
steamdeck-bios-fwupd = final.callPackage ./pkgs/jupiter-hw-support/bios-fwupd.nix { };
jupiter-dock-updater-bin = final.callPackage ./pkgs/jupiter-dock-updater-bin { };
steamos-polkit-helpers = final.callPackage ./pkgs/jupiter-hw-support/polkit-helpers.nix { };
steamdeck-dsp = final.callPackage ./pkgs/steamdeck-dsp { };

opensd = super.callPackage ./pkgs/opensd { };
opensd = final.callPackage ./pkgs/opensd { };

jovian-stubs = final.callPackage ./pkgs/jovian-stubs { };
jovian-greeter = super.callPackage ./pkgs/jovian-greeter { };
jovian-steam-protocol-handler = super.callPackage ./pkgs/jovian-steam-protocol-handler { };
jovian-greeter = final.callPackage ./pkgs/jovian-greeter { };
jovian-steam-protocol-handler = final.callPackage ./pkgs/jovian-steam-protocol-handler { };

jovian-documentation = final.callPackage ./support/docs {
pagefind = final.callPackage ./pkgs/pagefind { };
Expand All @@ -74,7 +77,7 @@ rec {
) { };
};

jovian-hardware-survey = super.callPackage ./pkgs/jovian-hardware-survey { };
jovian-hardware-survey = final.callPackage ./pkgs/jovian-hardware-survey { };

steamPackages = super.steamPackages.overrideScope (scopeFinal: scopeSuper: {
steam = final.callPackage ./pkgs/steam-jupiter/unwrapped.nix {
Expand Down
31 changes: 31 additions & 0 deletions pkgs/galileo-mura/default.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
{ lib
, stdenv
, fetchFromGitHub
, meson
, ninja
}:

stdenv.mkDerivation rec {
pname = "galileo-mura";
version = "0.3";

src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "galileo-mura";
rev = "v${version}";
hash = "sha256-mO43q3oZPGrPjQyFFJLjVgZZTyxhn+8Szcn2FzGvkHk=";
};

nativeBuildInputs = [
meson
ninja
];

meta = with lib; {
description = "";
homepage = "https://github.com/Jovian-Experiments/galileo-mura";
license = licenses.mit;
mainProgram = "galileo-mura";
platforms = platforms.all;
};
}
8 changes: 5 additions & 3 deletions pkgs/gamescope-session/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
coreutils,
dbus,
findutils,
galileo-mura,
gamescope,
gnugrep,
gnused,
Expand All @@ -34,6 +35,7 @@ let
coreutils
dbus
findutils
galileo-mura
gnugrep
gnused
gnutar
Expand Down Expand Up @@ -96,13 +98,13 @@ let
};
in stdenv.mkDerivation(finalAttrs: {
pname = "gamescope-session";
version = "3.12.6-1.2";
version = "3.13.5-1";

src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "PKGBUILDs-mirror";
rev = "jupiter-main/gamescope-${finalAttrs.version}";
hash = "sha256-k9i+FrTUvRiA51I8sUCe87mHIgk51k23CFMPPgZ5pw0=";
hash = "sha256-mm+P27wpiu72IH+w7vm12sTKafbSJTkd+2PNipinhuE=";
};

patchPhase = ''
Expand All @@ -111,7 +113,7 @@ in stdenv.mkDerivation(finalAttrs: {
patchShebangs steam-http-loader

substituteInPlace gamescope-session \
--replace /usr/share/steamos ${steamdeck-hw-theme}/share/steamos \
--replace /usr/share ${steamdeck-hw-theme}/share \
--replace /usr/lib/steam ${steamPackages.steam}/lib/steam

substituteInPlace gamescope-session.service \
Expand Down
8 changes: 5 additions & 3 deletions pkgs/gamescope/default.nix
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
{ gamescope'
, fetchpatch
, fetchFromGitHub
, substituteAll
, glm
, gbenchmark
}:
Expand All @@ -10,8 +9,8 @@
# version shipped by the vendor, ensuring feature level is equivalent.

let
version = "3.12.6";
hash = "sha256-xQPRUO7UivfdoVf2MWfRI6l2T8n+gGqhQyj068fr7Sg=";
version = "3.13.5";
hash = "sha256-ITpUHE8VQKZOaCGHBdh0d40J5ejdG/ahv4V3o0KKMh4=";

joshShaders = fetchFromGitHub {
owner = "Joshua-Ashton";
Expand All @@ -30,6 +29,9 @@ gamescope'.overrideAttrs({ buildInputs, postPatch ? "", postInstall ? "", ... }:
inherit hash;
};

# Clobber unvendoring vkroots, nixpkgs version is too old
postUnpack = null;

# (We are purposefully clobbering the patches from Nixpkgs here)
patches = [
(fetchpatch {
Expand Down
6 changes: 2 additions & 4 deletions pkgs/jupiter-fan-control/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,13 @@

stdenv.mkDerivation(finalAttrs: {
pname = "jupiter-fan-control";
version = "20230209.1";
version = "20231114.3";

# TODO: Replace with https://gitlab.steamos.cloud/jupiter/jupiter-fan-control
# once it becomes public
src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "jupiter-fan-control";
rev = finalAttrs.version;
sha256 = "sha256-9sNJdR0t8GW0hcSNylTK5YcflPltfqyN9KnPos1YcA0=";
sha256 = "sha256-gbIqsrTHp8T6tcmeAsgDKEb37EqUfSLOLhtrSzBY8YE=";
};

buildInputs = [
Expand Down
6 changes: 3 additions & 3 deletions pkgs/jupiter-hw-support/SteamDeckBIOS.metainfo.xml
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
<?xml version="1.0" encoding="UTF-8"?>
<component type="firmware">
<id>value.Jupiter.BIOS.firmware</id>
<name>Steam Deck</name>
<id>unofficial.valve.steamdeck.@[email protected]</id>
<name>Steam Deck (@model@)</name>
<provides>
<firmware type="flashed">bbb1cf06-f7b9-4466-adcc-6b8815bd99e6</firmware>
<firmware type="flashed">@guid@</firmware>
</provides>
<custom>
<value key="LVFS::UpdateProtocol">org.uefi.capsule</value>
Expand Down
87 changes: 53 additions & 34 deletions pkgs/jupiter-hw-support/bios-fwupd.nix
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,14 @@

# The following parameters are for your enjoyment of flashing custom/older BIOSes:

# The BIOS file (e.g., "F7A0110_sign.fd") or a directory containing it.
, biosFile ? callPackage ./src.nix { }
# Board prefixes to build the output for.
, boards ? [
"F7A" # Jupiter
#"F7G" # Galileo
]

# The BIOS version (e.g., "0110").
# If null, parsed from the BIOS file name.
, biosVersion ? null
# Directory containing the BIOS files.
, biosSource ? callPackage ./src.nix { }

# The release date of the BIOS for the fwupd manifest.
, releaseDate ? "1970-01-01"
Expand All @@ -31,7 +33,7 @@ let
version = if packageVersion != null then packageVersion else jupiter-hw-support.version;

in runCommand "steamdeck-bios-fwupd-${version}" {
inherit biosFile biosVersion releaseDate;
inherit boards biosSource releaseDate;

nativeBuildInputs = [ gcab ];

Expand All @@ -40,32 +42,49 @@ in runCommand "steamdeck-bios-fwupd-${version}" {
license = licenses.unfreeRedistributableFirmware;
};
} ''
if [[ -d "$biosFile" ]]; then
biosFile=$(find "$biosFile" -regextype posix-extended -type f -regex ".*/F7A.*_sign.fd" | head -1)
fi

>&2 echo ":: Found BIOS file $biosFile"

if [[ -z "$biosVersion" ]]; then
versionPair=$(basename "$biosFile" | sed 's/^.*F7A\([0-9]\{2\}\)\([0-9]\{2\}\).*$/\1 \2/; t; q1')
else
versionPair=$(echo "$biosVersion" | sed 's/^\([0-9]\{2\}\)\([0-9]\{2\}\)$/\1 \2/; t; q1')
fi

get_numeric_ver() { printf "%d" "0x00$100$2"; }
export versionNumber=$(get_numeric_ver $versionPair)

>&2 echo ":: Detected numeric BIOS version $versionNumber"

export filename=$(basename "$biosFile")
export sha1=$(sha1sum "$biosFile" | awk '{ print $1 }')
export sha256=$(sha1sum "$biosFile" | awk '{ print $1 }')
substituteAll ${./SteamDeckBIOS.metainfo.xml} SteamDeckBIOS.metainfo.xml

>&2 echo ":: Generated metainfo file"
cat -n SteamDeckBIOS.metainfo.xml

mkdir -p $out
cp "$biosFile" .
gcab -c $out/bios.cab SteamDeckBIOS.metainfo.xml "$filename"
for board in $boards; do
>&2 echo ":: Building archive for board '$board'"

biosFile=$(find "$biosSource" -regextype posix-extended -type f -regex ".*/''${board}[0-9]{4}_sign.fd" | head -1)

>&2 echo ":: Found BIOS file '$biosFile'"

versionPair=$(basename "$biosFile" | sed 's/^.*'"$board"'\([0-9]\{2\}\)\([0-9]\{2\}\).*$/\1 \2/; t; q1')

get_numeric_ver() { printf "%d" "0x00$100$2"; }
export versionNumber=$(get_numeric_ver $versionPair)

>&2 echo ":: Detected numeric BIOS version $versionNumber"

case "$board" in
F7A)
guid=bbb1cf06-f7b9-4466-adcc-6b8815bd99e6
model="LCD [Jupiter]"
;;
#F7G)
# guid=00000000-0000-0000-0000-000000000000
# model="OLED [Galileo]"
# ;;
*)
>&2 echo ":: No GUID for board '$board'"
exit 1
;;
esac

export model
export board
export guid
export filename=$(basename "$biosFile")
export sha1=$(sha1sum "$biosFile" | awk '{ print $1 }')
export sha256=$(sha1sum "$biosFile" | awk '{ print $1 }')
substituteAll ${./SteamDeckBIOS.metainfo.xml} SteamDeckBIOS.metainfo.xml

>&2 echo ":: Generated metainfo file"

archiveName=$(basename $biosFile | sed 's/_sign.*//')

mkdir -p $out
cp "$biosFile" .
gcab -c $out/"$archiveName".cab SteamDeckBIOS.metainfo.xml "$filename"
done
''
8 changes: 0 additions & 8 deletions pkgs/jupiter-hw-support/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -81,14 +81,6 @@ stdenv.mkDerivation {
mkdir -p $out/lib
cp -r usr/lib/hwsupport $out/lib

mkdir -p $out/share
cp -r usr/share/alsa $out/share

# ALSA lib main.c:844:(execute_sequence) exec 'echo Main Verb Config EnableSequence' failed (exit code -8)
# ALSA lib main.c:2573:(set_verb_user) error: failed to initialize new use case: HiFi
# alsaucm: error failed to set _verb=HiFi: Exec format error
sed -i 's|exec "echo|#exec "echo|g' $out/share/alsa/ucm2/conf.d/acp5x/HiFi*.conf

${resholve.phraseSolution "jupiter-hw-support" solution}

runHook postInstall
Expand Down
4 changes: 4 additions & 0 deletions pkgs/jupiter-hw-support/firmware.nix
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,10 @@ stdenv.mkDerivation {
wrapProgram $out/bin/jupiter-biosupdate \
--prefix PATH : ${lib.makeBinPath [ coreutils dmidecode gawk jq ]}

cp usr/bin/jupiter-initial-firmware-update $out/bin
sed -i "s|/usr/|$out/|g" $out/bin/jupiter-initial-firmware-update
chmod +x $out/bin/jupiter-initial-firmware-update

cp usr/bin/jupiter-controller-update $out/bin
sed -i "s|/usr/|$out/|g" $out/bin/jupiter-controller-update
wrapProgram $out/bin/jupiter-controller-update \
Expand Down
2 changes: 2 additions & 0 deletions pkgs/jupiter-hw-support/polkit-helpers.nix
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
bash,
coreutils,
dmidecode,
gawk,
gnugrep,
jovian-stubs,
jupiter-dock-updater-bin,
Expand All @@ -23,6 +24,7 @@ let
inputs = [
coreutils
dmidecode
gawk
gnugrep
"${jupiter-dock-updater-bin}/lib/jupiter-dock-updater"
jovian-stubs
Expand Down
4 changes: 2 additions & 2 deletions pkgs/jupiter-hw-support/src.nix
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,13 @@
}:

let
version = "20231026.1";
version = "20231115.1";
in (applyPatches {
src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "jupiter-hw-support";
rev = "jupiter-${version}";
hash = "sha256-bnl193XmxrUrNw7SfLhZ7yhd3lF9TzEckgyJU06K964=";
hash = "sha256-m36uJMdMpONXUMm33VcsoX+zMr/5MosU7ivq7wxogvw=";
};

patches = [
Expand Down
10 changes: 6 additions & 4 deletions pkgs/linux-firmware/default.nix
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
{ linux-firmware, fetchFromGitHub }:

linux-firmware.overrideAttrs(_: {
linux-firmware.overrideAttrs(_: rec {
version = "20231113.1";

src = fetchFromGitHub {
owner = "Jovian-Experiments";
repo = "linux-firmware";
rev = "jupiter-20230420";
hash = "sha256-ys/7G+JsiuKQo9aL5MZjs4NxqDjK2bdJkLRJaoNeIDM=";
rev = "jupiter-${version}";
hash = "sha256-aaTFdotKyTjPK9iuPs91Dqvk9521E4VIcggxYIRlffQ=";
};

outputHash = "sha256-eEeBS95gI7G9KVpc9boqRAdecrPc0EsfFD2nhh63fCY=";
outputHash = "sha256-puzVKvwV0fCDz+M6cm18Xq4W0qAFgtFu3okSnsj9RNU=";
})
Loading
Loading