diff --git a/microsoft/surface/TODO.org b/microsoft/surface/TODO.org index 488613f..bf1f0f7 100644 --- a/microsoft/surface/TODO.org +++ b/microsoft/surface/TODO.org @@ -3,9 +3,13 @@ - Latest from linux-surface - [X] Download github.com/linux-surface/linux-surface kernel 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 - 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 ** DONE Remove old firmware binaries - Looks like the ath10k files aren't needed, any more diff --git a/microsoft/surface/kernel/default.nix b/microsoft/surface/kernel/default.nix index b280f2d..8240153 100644 --- a/microsoft/surface/kernel/default.nix +++ b/microsoft/surface/kernel/default.nix @@ -1,5 +1,5 @@ { config, lib, pkgs, ... }: { - boot.kernelPackages = pkgs.callPackage ./linux-5.10.2 {}; + boot.kernelPackages = pkgs.callPackage ./linux-5.10.19 {}; } diff --git a/microsoft/surface/kernel/linux-5.10.2/default.nix b/microsoft/surface/kernel/linux-5.10.19/default.nix similarity index 79% rename from microsoft/surface/kernel/linux-5.10.2/default.nix rename to microsoft/surface/kernel/linux-5.10.19/default.nix index d4f6eb4..e13e872 100644 --- a/microsoft/surface/kernel/linux-5.10.2/default.nix +++ b/microsoft/surface/kernel/linux-5.10.19/default.nix @@ -1,10 +1,9 @@ { config, lib, pkgs, ... }: let repos = (pkgs.callPackage ../../repos.nix {}); - # TODO: Can I append the path ./patches instead of a string? patches = repos.linux-surface + "/patches"; surface_kernelPatches = [ - { name = "microsoft-surface-patches-linux-5.10.2"; + { name = "microsoft-surface-patches-linux-5.10.19"; patch = null; extraConfig = '' # @@ -15,12 +14,17 @@ let SURFACE_AGGREGATOR_BUS y SURFACE_AGGREGATOR_CDEV m SURFACE_AGGREGATOR_REGISTRY m + SURFACE_ACPI_NOTIFY m - SURFACE_BATTERY m SURFACE_DTX m - SURFACE_HID 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 # See: https://github.com/linux-surface/surface-aggregator-module/wiki/Testing-and-Installing @@ -44,18 +48,23 @@ let # # Cameras: IPU3 # - ## TODO: Fix for kernel 5.10.2: - ##VIDEO_IPU3_IMGU m + ## Not yet supported in the patches + # VIDEO_IPU3_IMGU m VIDEO_IPU3_CIO2 m CIO2_BRIDGE y - INT3472 m + INTEL_SKL_INT3472 m # # Cameras: Sensor drivers # VIDEO_OV5693 m - ## TODO: Fix for kernel 5.10.2: - ##VIDEO_OV8865 m + ## Not yet supported in the patches + # VIDEO_OV8865 m + + # + # ALS Sensor for Surface Book 3, Surface Laptop 3, Surface Pro 7 + # + APDS9960 m # # Other Drivers @@ -101,12 +110,16 @@ let patch = patches + "/5.10/0008-surface-typecover.patch"; } { - name = "ms-surface/0009-cameras"; - patch = patches + "/5.10/0009-cameras.patch"; + name = "ms-surface/0009-surface-sensors"; + 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 ( - callPackage ./linux-5.10.2.nix { + callPackage ./linux-5.10.19.nix { kernelPatches = surface_kernelPatches; } ))) diff --git a/microsoft/surface/kernel/linux-5.10.2/linux-5.10.2.nix b/microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix similarity index 85% rename from microsoft/surface/kernel/linux-5.10.2/linux-5.10.2.nix rename to microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix index 411a88d..04b97d2 100644 --- a/microsoft/surface/kernel/linux-5.10.2/linux-5.10.2.nix +++ b/microsoft/surface/kernel/linux-5.10.19/linux-5.10.19.nix @@ -3,7 +3,7 @@ with stdenv.lib; 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 = if (modDirVersionArg == null) then concatStringsSep "." (take 3 (splitVersion "${version}.0")) else modDirVersionArg; @@ -13,6 +13,6 @@ buildLinux (args // rec { src = fetchurl { url = "mirror://kernel/linux/kernel/v5.x/linux-${version}.tar.xz"; - sha256 = "18l1ywp99inm90434fm74w8rjfl4yl974kfcpizg2sp2p8xf311v"; + sha256 = "1mml5a30ky0khzj3r6ahybycbbszk86agq62qclwq2kzvsqbprr7"; }; } // (args.argsOverride or {})) diff --git a/microsoft/surface/repos.nix b/microsoft/surface/repos.nix index ba819a7..a1b434f 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -2,8 +2,8 @@ { linux-surface = fetchgit { url="https://github.com/linux-surface/linux-surface.git"; - rev="2b6d2db5bfc7b678c37badc80e0a223bf89b5ef7"; - sha256="03qlwxijznmk043zcpwl1yc56zhrlwdaw8k1cymb8zrxfpgw0r14"; + rev="f8fab978a480a4ed57e9ebb6928683b2e443c1c5"; + sha256="0zwybprwjckpapxm6gxzh6hwdd1w91g5sjxn6z52zlvvjpkmw959"; }; ath10k-firmware = fetchgit {