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 63f932e..41a9b8c 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', ... }: { nixos-x13s = { @@ -193,7 +194,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.lock b/nix/os/devices/steveej-x13s/flake.lock index 4d3d60a..724c6e9 100644 --- a/nix/os/devices/steveej-x13s/flake.lock +++ b/nix/os/devices/steveej-x13s/flake.lock @@ -1,21 +1,5 @@ { "nodes": { - "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" - } - }, "crane": { "inputs": { "nixpkgs": [ @@ -141,22 +125,6 @@ "type": "github" } }, - "mobile-nixos": { - "flake": false, - "locked": { - "lastModified": 1722056346, - "narHash": "sha256-50fcuCppaLMfSOTFO4IkCBs4folToCwlhTgc6IdZFHg=", - "owner": "NixOS", - "repo": "mobile-nixos", - "rev": "717ce90cfadffa449480bae2e155185c651e9993", - "type": "github" - }, - "original": { - "owner": "NixOS", - "repo": "mobile-nixos", - "type": "github" - } - }, "mycelium": { "inputs": { "crane": "crane", @@ -291,11 +259,9 @@ }, "root": { "inputs": { - "ath11k-firmware": "ath11k-firmware", "disko": "disko", "get-flake": "get-flake", "home-manager": "home-manager", - "mobile-nixos": "mobile-nixos", "mycelium": "mycelium", "nixos-x13s": "nixos-x13s", "nixpkgs": "nixpkgs_3", diff --git a/nix/os/devices/steveej-x13s/flake.nix b/nix/os/devices/steveej-x13s/flake.nix index 8a30dbe..110c2ae 100644 --- a/nix/os/devices/steveej-x13s/flake.nix +++ b/nix/os/devices/steveej-x13s/flake.nix @@ -20,17 +20,12 @@ # 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; - }; }; outputs = { self, get-flake, nixpkgs, - ath11k-firmware, ... }: let targetPlatform = "aarch64-linux"; @@ -93,11 +88,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/ - ''; }; }; }