Skip to content

Commit

Permalink
Merge pull request #215 from Jovian-Experiments/updates/galileo-release
Browse files Browse the repository at this point in the history
Updates for 20231115.1000
  • Loading branch information
K900 authored Nov 16, 2023
2 parents 4ac53a6 + 16d546f commit 4e1f560
Show file tree
Hide file tree
Showing 19 changed files with 253 additions and 98 deletions.
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

0 comments on commit 4e1f560

Please sign in to comment.