Rename cfg option from "enable" --> "replace"

- Allows for @qzed's kernel patch: 22ef83836c
This commit is contained in:
mexisme 2021-03-06 15:29:13 +13:00
parent 128b64dada
commit 98d19435d0
4 changed files with 17 additions and 12 deletions

View file

@ -65,15 +65,19 @@ The most effective fix to-date is to remove the `board-2.bin` file or replace it
`board.bin` file.
The derivative in `firmware/surface-go/ath10k/` can configure this, if you set the option
`config.hardware.microsoft-surface.firmware.surface-go-ath10k.enable` to `true`.
`config.hardware.microsoft-surface.firmware.surface-go-ath10k.replace` to `true`.
Note that this is slightly destructive, as it deletes all the `board.bin` and `board-2.bin` files
for the `ath10k` QCA6174 device, and replaces them with KillerNetworking's version.
_*NOTE:*_ This is destructive, as it deletes all the `board.bin` and `board-2.bin` files for the
`ath10k` QCA6174 device, and replaces them with KillerNetworking's version.
This is the only way (currently) to force the driver to use the new firmware.
For more details, see: https://github.com/linux-surface/linux-surface/wiki/Surface-Go#wifi-firmware
There was an attempt to get this firmware incorporated into the aggregate `board-2.bin`,
_*NOTE:*_ There's some work to patch the kernel to make it easier to override which firmware file
to use for QCA6174, which would obviate this more-destructuve approach:
- https://github.com/linux-surface/kernel/commit/22ef83836c4aa89e9eb98de9b47ed24b6c2a1d45
_*NOTE:*_ There was an attempt to get this firmware incorporated into the aggregate `board-2.bin`,
but (as of this writing) the request appears to have been ignored:
- https://github.com/linux-surface/linux-surface/issues/41

View file

@ -14,15 +14,16 @@
- [X] Install the binaries
** DONE Remove `ipts` firmware derivative
- This is only needed on the 4.19 kernel
** DOING Investigate problem with ath10k wifi firmware on Surface Go
** DONE Investigate problem with ath10k wifi firmware on Surface Go
:LOGBOOK:
- State "DOING" from "TODO" [2021-02-09 Tue 17:19]
- State "DONE" from "DOING" [2021-03-06 Sat 15:27]
:END:
*** DONE README entry explaining problem(s) with nonfree firmware on Surface Go
:LOGBOOK:
- State "DONE" from "TODO" [2021-02-09 Tue 17:17]
:END:
*** DOING Create derivative for `ath10k` firmware on Surface Go
*** DONE Create derivative for `ath10k` firmware on Surface Go
:LOGBOOK:
- State "DOING" from "TODO" [2021-02-09 Tue 17:18]
:END:
@ -31,8 +32,8 @@
- [X] Download `board.bin` from Killer Networks?
- [X] Install ath10k firmware fix for Surface Go
- `board-2.bin` needs to be removed / replaced with `board.bin`
- [ ] Add a config option for enabling the Surface Go Firmware
- [ ] Replace the vendorised `board.bin` with a `fetchurl`
- [X] Add a config option for enabling the Surface Go Firmware
- [-] Replace the vendorised `board.bin` with a `fetchurl`
- Getting HTTP 406 when using `fetchurl` or `nix-prefetch-url` that has to be diagnosed
* Support Tools
** TODO Incorporate @hpfr's function(s) from this commit:

View file

@ -5,14 +5,14 @@ in
{
options = {
hardware.microsoft-surface.firmware.surface-go-ath10k = {
enable = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
replace = lib.mkEnableOption ''Use the "board.bin" firmware for ath10k-based WiFi on Surface Go.'';
};
};
config = lib.mkIf cfg.enable {
config = lib.mkIf cfg.replace {
hardware.enableAllFirmware = true;
hardware.firmware = [
(pkgs.callPackage ./ath10k.nix {})
(pkgs.callPackage ./ath10k-replace.nix {})
];
boot.extraModprobeConfig = lib.mkDefault ''