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

gpd/pocket-4: add firmware blobs for GPU, wifi, bluetooth #1424

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
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: 5 additions & 0 deletions gpd/pocket-4/default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,11 @@ in
../../common/hidpi.nix
];

# Add firmware blobs for GPU, wifi, bluetooth.
# Non-required amdgpu/isp_4_1_0.bin still fails with no impact on usage.
# Kernel fix coming in https://github.com/torvalds/linux/commit/ea5d49349894a7a74ce8dba242e3a487d24b6c0e
hardware.firmware = [(import ./firmware.nix { inherit pkgs; })];

boot = {
# As of kernel version 6.6.72, amdgpu throws a fatal error during init, resulting in a barely-working display
kernelPackages = mkIf (lib.versionOlder pkgs.linux.version "6.12") pkgs.linuxPackages_latest;
Expand Down
19 changes: 19 additions & 0 deletions gpd/pocket-4/firmware.nix
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
{ pkgs, ... }:
let
lfw = "${pkgs.linux-firmware}/lib/firmware";
in
pkgs.stdenv.mkDerivation {
name = "gpd-pocket-4-firmware";
phases = [ "installPhase" ];
# Wide net for amdgpu/amdtee to support non-370 CPU models I can't test.
installPhase = ''
mkdir -p $out/lib/firmware/intel $out/lib/firmware/rtl_nic
cp -r \
${lfw}/amdgpu \
${lfw}/amdtee \
${lfw}/iwlwifi-ty-a0-gf-a0* \
$out/lib/firmware/
cp ${lfw}/intel/ibt-0041-0041.sfi $out/lib/firmware/intel/
cp ${lfw}/rtl_nic/rtl8125b-2.fw $out/lib/firmware/rtl_nic/
'';
}