1
0
Fork 0
mirror of https://github.com/NixOS/nixos-hardware synced 2024-11-30 06:49:43 +01:00

Merge branch 'up/master' into microsoft/surface/firmware-surface-go

This commit is contained in:
mexisme 2021-03-06 22:18:02 +13:00
commit 91162d3f17
5 changed files with 35 additions and 18 deletions

View file

@ -3,9 +3,13 @@
- Latest from linux-surface - Latest from linux-surface
- [X] Download github.com/linux-surface/linux-surface kernel patches - [X] Download github.com/linux-surface/linux-surface kernel patches
- [X] Build kernel using downloaded patches - [X] Build kernel using downloaded patches
** TODO Create a function for selecting preferred kernel ** CANCELLED Create a function for selecting preferred kernel
** DONE Fix how Keyboard & Trackpad are not being enabled on SL3 ** DONE Fix how Keyboard & Trackpad are not being enabled on SL3
- https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing - https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
** DONE Update to kernel 5.10.19
:LOGBOOK:
- State "DONE" from "DOING" [2021-03-06 Sat 20:55]
:END:
* Firmware * Firmware
** DONE Remove old firmware binaries ** DONE Remove old firmware binaries
- Looks like the ath10k files aren't needed, any more - Looks like the ath10k files aren't needed, any more

View file

@ -1,5 +1,5 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
{ {
boot.kernelPackages = pkgs.callPackage ./linux-5.10.2 {}; boot.kernelPackages = pkgs.callPackage ./linux-5.10.19 {};
} }

View file

@ -1,10 +1,9 @@
{ config, lib, pkgs, ... }: { config, lib, pkgs, ... }:
let let
repos = (pkgs.callPackage ../../repos.nix {}); repos = (pkgs.callPackage ../../repos.nix {});
# TODO: Can I append the path ./patches instead of a string?
patches = repos.linux-surface + "/patches"; patches = repos.linux-surface + "/patches";
surface_kernelPatches = [ surface_kernelPatches = [
{ name = "microsoft-surface-patches-linux-5.10.2"; { name = "microsoft-surface-patches-linux-5.10.19";
patch = null; patch = null;
extraConfig = '' extraConfig = ''
# #
@ -15,12 +14,17 @@ let
SURFACE_AGGREGATOR_BUS y SURFACE_AGGREGATOR_BUS y
SURFACE_AGGREGATOR_CDEV m SURFACE_AGGREGATOR_CDEV m
SURFACE_AGGREGATOR_REGISTRY m SURFACE_AGGREGATOR_REGISTRY m
SURFACE_ACPI_NOTIFY m SURFACE_ACPI_NOTIFY m
SURFACE_BATTERY m
SURFACE_DTX m SURFACE_DTX m
SURFACE_HID m
SURFACE_PERFMODE m SURFACE_PERFMODE m
SURFACE_HID m
SURFACE_KBD m
BATTERY_SURFACE m
CHARGER_SURFACE m
# #
# These built-in modules are required for the Surface Aggregator Module # These built-in modules are required for the Surface Aggregator Module
# See: https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing # See: https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing
@ -44,18 +48,23 @@ let
# #
# Cameras: IPU3 # Cameras: IPU3
# #
## TODO: Fix for kernel 5.10.2: ## Not yet supported in the patches
##VIDEO_IPU3_IMGU m # VIDEO_IPU3_IMGU m
VIDEO_IPU3_CIO2 m VIDEO_IPU3_CIO2 m
CIO2_BRIDGE y CIO2_BRIDGE y
INT3472 m INTEL_SKL_INT3472 m
# #
# Cameras: Sensor drivers # Cameras: Sensor drivers
# #
VIDEO_OV5693 m VIDEO_OV5693 m
## TODO: Fix for kernel 5.10.2: ## Not yet supported in the patches
##VIDEO_OV8865 m # VIDEO_OV8865 m
#
# ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7
#
APDS9960 m
# #
# Other Drivers # Other Drivers
@ -101,12 +110,16 @@ let
patch = patches + "/5.10/0008-surface-typecover.patch"; patch = patches + "/5.10/0008-surface-typecover.patch";
} }
{ {
name = "ms-surface/0009-cameras"; name = "ms-surface/0009-surface-sensors";
patch = patches + "/5.10/0009-cameras.patch"; patch = patches + "/5.10/0009-surface-sensors.patch";
}
{
name = "ms-surface/0010-cameras";
patch = patches + "/5.10/0010-cameras.patch";
} }
]; ];
in (with pkgs; recurseIntoAttrs (linuxPackagesFor ( in (with pkgs; recurseIntoAttrs (linuxPackagesFor (
callPackage ./linux-5.10.2.nix { callPackage ./linux-5.10.19.nix {
kernelPatches = surface_kernelPatches; kernelPatches = surface_kernelPatches;
} }
))) )))

View file

@ -3,7 +3,7 @@
with stdenv.lib; with stdenv.lib;
buildLinux (args // rec { buildLinux (args // rec {
version = "5.10.2"; version = "5.10.19";
# modDirVersion needs to be x.y.z, will automatically add .0 if needed # modDirVersion needs to be x.y.z, will automatically add .0 if needed
modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; modDirVersion = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg;
@ -13,6 +13,6 @@ buildLinux (args // rec {
src = fetchurl { src = fetchurl {
url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz";
sha256 = "18l1ywp99inm90434fm74w8rjfl4yl974kfcpizg2sp2p8xf311v"; sha256 = "1mml5a30ky0khzj3r6ahybycbbszk86agq62qclwq2kzvsqbprr7";
}; };
} // (args.argsOverride or {})) } // (args.argsOverride or {}))

View file

@ -2,8 +2,8 @@
{ {
linux-surface = fetchgit { linux-surface = fetchgit {
url="https://github.com/linux-surface/linux-surface.git"; url="https://github.com/linux-surface/linux-surface.git";
rev="2b6d2db5bfc7b678c37badc80e0a223bf89b5ef7"; rev="f8fab978a480a4ed57e9ebb6928683b2e443c1c5";
sha256="03qlwxijznmk043zcpwl1yc56zhrlwdaw8k1cymb8zrxfpgw0r14"; sha256="0zwybprwjckpapxm6gxzh6hwdd1w91g5sjxn6z52zlvvjpkmw959";
}; };
ath10k-firmware = fetchgit { ath10k-firmware = fetchgit {