feat: add (misisng) bluetooth-firmware files

This commit is contained in:
steveej 2024-12-05 10:15:22 +01:00
parent 0727184585
commit 46229fc2b9
4 changed files with 57 additions and 6 deletions

28
flake.lock generated
View file

@ -53,21 +53,39 @@
}, },
"nixpkgs-lib": { "nixpkgs-lib": {
"locked": { "locked": {
"lastModified": 1725233747, "lastModified": 1733096140,
"narHash": "sha256-Ss8QWLXdr2JCBPcYChJhz4xJm+h/xjl4G0c0XlP6a74=", "narHash": "sha256-1qRH7uAUsyQI7R1Uwl4T+XvdNv778H0Nb5njNrqvylY=",
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
}, },
"original": { "original": {
"type": "tarball", "type": "tarball",
"url": "https://github.com/NixOS/nixpkgs/archive/356624c12086a18f2ea2825fed34523d60ccc4e3.tar.gz" "url": "https://github.com/NixOS/nixpkgs/archive/5487e69da40cbd611ab2cadee0b4637225f7cfae.tar.gz"
} }
}, },
"root": { "root": {
"inputs": { "inputs": {
"flake-parts": "flake-parts", "flake-parts": "flake-parts",
"linux-jhovold": "linux-jhovold", "linux-jhovold": "linux-jhovold",
"nixpkgs": "nixpkgs" "nixpkgs": "nixpkgs",
"x13s-bt-linux-firmware": "x13s-bt-linux-firmware"
}
},
"x13s-bt-linux-firmware": {
"flake": false,
"locked": {
"lastModified": 1733240564,
"narHash": "sha256-348f+wuX7x8xqaBRkraTclupdnRcwL/z2l/1Bs/reXc=",
"ref": "refs/heads/main",
"rev": "06aea4d8bfd5ca3624b56162b24339d7b0449913",
"revCount": 4282,
"type": "git",
"url": "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
},
"original": {
"rev": "06aea4d8bfd5ca3624b56162b24339d7b0449913",
"type": "git",
"url": "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git"
} }
} }
}, },

View file

@ -6,6 +6,30 @@
linux-jhovold.url = "github:jhovold/linux/wip/sc8280xp-6.13-rc1"; linux-jhovold.url = "github:jhovold/linux/wip/sc8280xp-6.13-rc1";
linux-jhovold.flake = false; linux-jhovold.flake = false;
x13s-bt-linux-firmware = {
flake = false;
# 2024-12-05 now required by jhovold's (and soon mainline) kernel. need two files from here: hpnv21.b8c hpnv21g.b8c
# url = "https://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git/plain/qca/hpnv21.b8c?id=8d24066f829b97966818fd0d9b5881190670f53f";
url = "git://git.kernel.org/pub/scm/linux/kernel/git/firmware/linux-firmware.git?rev=06aea4d8bfd5ca3624b56162b24339d7b0449913";
# 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";
};
}; };
outputs = outputs =

View file

@ -28,6 +28,7 @@ let
paths = [ paths = [
modulesClosure modulesClosure
x13sPackages.graphics-firmware x13sPackages.graphics-firmware
x13sPackages.bluetooth-firmware
]; ];
}; };
in in
@ -53,7 +54,10 @@ in
environment.systemPackages = [ pkgs.efibootmgr ]; environment.systemPackages = [ pkgs.efibootmgr ];
hardware.enableAllFirmware = true; hardware.enableAllFirmware = true;
hardware.firmware = lib.mkBefore [ x13sPackages.graphics-firmware ]; hardware.firmware = lib.mkBefore [
x13sPackages.graphics-firmware
x13sPackages.bluetooth-firmware
];
boot = { boot = {
initrd.systemd.enable = true; initrd.systemd.enable = true;

View file

@ -47,4 +47,9 @@ in
${lib.getExe pkgs.innoextract} ${gpu-src} ${lib.getExe pkgs.innoextract} ${gpu-src}
cp -v code\$GetExtractPath\$/*/*.mbn "$out/lib/firmware/qcom/sc8280xp/LENOVO/21BX/" cp -v code\$GetExtractPath\$/*/*.mbn "$out/lib/firmware/qcom/sc8280xp/LENOVO/21BX/"
''; '';
bluetooth-firmware = pkgs.runCommand "x13s-bluetooth-firmware" { } ''
mkdir -p $out/lib/firmware/qca
cp -v ${inputs.x13s-bt-linux-firmware}/qca/{hpnv21.b8c,hpnv21g.b8c} $out/lib/firmware/qca/
'';
} }