A temporary hack to install the Surface Go firmware

This commit is contained in:
mexisme 2021-02-07 13:31:26 +13:00
parent 9a35571829
commit 080c44106f
2 changed files with 9 additions and 10 deletions

View file

@ -1,13 +1,15 @@
{stdenv, pkgs, firmwareLinuxNonfree, ...}:
let
repos = (pkgs.callPackage ../repos.nix {});
ath10k = ./ath10k;
# ath10k = repos.ath10k-firmware;
in
firmwareLinuxNonfree.overrideAttrs (old: rec {
pname = "microsoft-surface-go-firmware-linux-nonfree";
srcs = [
firmwareLinuxNonfree.src
repos.ath10k-firmware
ath10k
];
sourceRoot = firmwareLinuxNonfree.src;
@ -15,15 +17,12 @@ firmwareLinuxNonfree.overrideAttrs (old: rec {
dontMakeSourcesWritable = true;
postInstall = ''
# rm -v $out/lib/firmware/ath10k/{hw2.1,hw3.0}/board.bin
# rm -v $out/lib/firmware/ath10k/{hw2.1,hw3.0}/board2.bin
# Delete the non-working firmware:
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board.bin
rm -v $out/lib/firmware/ath10k/QCA6174/{hw2.1,hw3.0}/board-2.bin
# cp $srcs[1] $out/lib/firmware/ath10k/hw2.1/
# cp $srcs[1] $out/lib/firmware/ath10k/hw3.0/
#TODO:
pwd
echo src = $src, srcs = $srcs
exit 1
# Install the Surface Go Wifi firmware:
cp ${ath10k}/K1535_Debian/board.bin $out/lib/firmware/ath10k/QCA6174/hw2.1/
cp ${ath10k}/K1535_Debian/board.bin $out/lib/firmware/ath10k/QCA6174/hw3.0/
'';
})