diff --git a/flake.lock b/flake.lock index c5cd20b..03b4e3b 100644 --- a/flake.lock +++ b/flake.lock @@ -33,6 +33,22 @@ "type": "github" } }, + "ath11k-firmware": { + "flake": false, + "locked": { + "lastModified": 1720482684, + "narHash": "sha256-p6ifwtRNUOyQ2FN2VhSXS6dcrvrtiFZawu/iVXQ4uR0=", + "ref": "refs/heads/main", + "rev": "bb527dcebac835c47ed4f5428a7687769fa9b1b2", + "revCount": 152, + "type": "git", + "url": "https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git" + }, + "original": { + "type": "git", + "url": "https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git" + } + }, "brainwart_x13s-nixos": { "flake": false, "locked": { @@ -823,6 +839,7 @@ "inputs": { "adamcstephens_stop-export": "adamcstephens_stop-export", "aphorme_launcher": "aphorme_launcher", + "ath11k-firmware": "ath11k-firmware", "brainwart_x13s-nixos": "brainwart_x13s-nixos", "colmena": "colmena", "crane": "crane", @@ -860,6 +877,7 @@ "salut": "salut", "sops-nix": "sops-nix", "srvos": "srvos", + "x13s-bt-firmware": "x13s-bt-firmware", "yofi": "yofi" } }, @@ -1057,6 +1075,18 @@ "type": "github" } }, + "x13s-bt-firmware": { + "flake": false, + "locked": { + "narHash": "sha256-FCWkZp+MtEGS5lS5+pxmpCl4wU9GGRegolebcmCN7RU=", + "type": "file", + "url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=2ba1beaae0c649ce8a50baecc8df9e81cd524e65" + }, + "original": { + "type": "file", + "url": "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=2ba1beaae0c649ce8a50baecc8df9e81cd524e65" + } + }, "yofi": { "inputs": { "flake-utils": "flake-utils_4", diff --git a/flake.nix b/flake.nix index 768c194..a63a5c2 100644 --- a/flake.nix +++ b/flake.nix @@ -119,6 +119,31 @@ flake = false; url = "github:espanso/espanso/db97658d1d80697a635b57801696c594eacf057b"; }; + + x13s-bt-firmware = { + flake = false; + + # revisions for this file: https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/log/qca/hpbtfw21.tlv + + # 2024-07-29 + # not working well + # url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=d118dc8ad5562ac0ae0c07be748cbe35a9361b47"; + + # 2024-05-30 + # url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=436b0a920352d13290043d9ec9e50c420ab10f92"; + + # 2023-12-18 + # not working well + # url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=598f5bd22361d7e92eebe8452d1f8013a1d35b9a"; + + # 2013-01-17 + url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpbtfw21.tlv?id=2ba1beaae0c649ce8a50baecc8df9e81cd524e65"; + }; + + ath11k-firmware = { + url = "git+https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"; + flake = false; + }; }; outputs = inputs @ { @@ -337,6 +362,18 @@ buildInputs = [ ]; }; + + x13s-bt-firmware = pkgs.runCommand "x13s-bt-firmware" {} '' + mkdir -p $out/lib/firmware/qca + cp -v ${self}/misc/x13s_bt_firmware/hpnv21g.b8c.crypt.fw $out/lib/firmware/qca/hpnv21.bin + cp -v ${inputs.x13s-bt-firmware} $out/lib/firmware/qca//hpbtfw21.tlv + ''; + + x13s-ath11k-firmware = pkgs.runCommand "x13s-ath11k-firmware-before" {} '' + mkdir -p $out/lib/firmware/ath11k/WCN6855/hw2.1/ + cp -v ${inputs.ath11k-firmware}/WCN6855/hw2.1/{board-2,regdb}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/ + cp -v ${inputs.ath11k-firmware}/WCN6855/hw2.1/1.1/WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41/{amss,m3}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/ + ''; }; formatter = pkgs.alejandra; diff --git a/misc/x13s_bt_firmware/hpnv21g.b8c.crypt.fw b/misc/x13s_bt_firmware/hpnv21g.b8c.crypt.fw new file mode 100755 index 0000000..ea5b5b8 Binary files /dev/null and b/misc/x13s_bt_firmware/hpnv21g.b8c.crypt.fw differ diff --git a/nix/os/devices/steveej-x13s/configuration.nix b/nix/os/devices/steveej-x13s/configuration.nix index 16727f0..3068a0a 100644 --- a/nix/os/devices/steveej-x13s/configuration.nix +++ b/nix/os/devices/steveej-x13s/configuration.nix @@ -7,6 +7,7 @@ nodeName, localDomainName, system, + packages', ... }: { nixpkgs.overlays = [ @@ -236,7 +237,8 @@ }; hardware.firmware = lib.mkBefore [ - nodeFlake.packages.${system}.x13s-ath11k-firmware + packages'.x13s-bt-firmware + packages'.x13s-ath11k-firmware ]; # see https://linrunner.de/tlp/ diff --git a/nix/os/devices/steveej-x13s/flake.nix b/nix/os/devices/steveej-x13s/flake.nix index 4e3f1a9..d749c07 100644 --- a/nix/os/devices/steveej-x13s/flake.nix +++ b/nix/os/devices/steveej-x13s/flake.nix @@ -20,9 +20,11 @@ # nixos-x13s.inputs.nixpkgs.follows = "nixpkgs"; mycelium.url = "github:threefoldtech/mycelium"; - ath11k-firmware = { - url = "git+https://git.codelinaro.org/clo/ath-firmware/ath11k-firmware.git"; - flake = false; + + nix-snapshotter = { + url = "github:yu-re-ka/nix-snapshotter"; + # url = "github:pdtpartners/nix-snapshotter"; + inputs.nixpkgs.follows = "nixpkgs"; }; nix-snapshotter = { @@ -99,11 +101,6 @@ }; }; packages.${targetPlatform} = { - x13s-ath11k-firmware = nixpkgs.legacyPackages.${targetPlatform}.runCommand "x13s-ath11k-firmware-before" {} '' - mkdir -p $out/lib/firmware/ath11k/WCN6855/hw2.1/ - cp -v ${ath11k-firmware}/WCN6855/hw2.1/{board-2,regdb}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/ - cp -v ${ath11k-firmware}/WCN6855/hw2.1/1.1/WLAN.HSP.1.1-03125-QCAHSPSWPL_V1_V2_SILICONZ_LITE-3.6510.41/{amss,m3}.bin $out/lib/firmware/ath11k/WCN6855/hw2.1/ - ''; }; }; }