diff --git a/microsoft/surface/TODO.org b/microsoft/surface/TODO.org index 7db7ea4..125ec7d 100644 --- a/microsoft/surface/TODO.org +++ b/microsoft/surface/TODO.org @@ -3,9 +3,10 @@ - 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 +** DOING Update to kernel 5.10.19 * 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 82% rename from microsoft/surface/kernel/linux-5.10.2/default.nix rename to microsoft/surface/kernel/linux-5.10.19/default.nix index d4f6eb4..ab3dc8c 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 = '' # @@ -44,8 +43,8 @@ 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 @@ -54,8 +53,13 @@ let # 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 +105,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 8642416..1f715b7 100644 --- a/microsoft/surface/repos.nix +++ b/microsoft/surface/repos.nix @@ -2,7 +2,7 @@ { linux-surface = fetchgit { url="https://github.com/linux-surface/linux-surface.git"; - rev="25ab2cf75e5eda5ab9739db1907300010c06dacf"; - sha256="0h8624d7ix1p6ysw9bllmnnwnv164z8xkx56zj3vdczn91vmqcf9"; + rev="f8fab978a480a4ed57e9ebb6928683b2e443c1c5"; + sha256="0zwybprwjckpapxm6gxzh6hwdd1w91g5sjxn6z52zlvvjpkmw959"; }; }