From 39fb4bb20e3d429ba541927d265e35a87b886534 Mon Sep 17 00:00:00 2001 From: Ioannis Koutras Date: Sun, 26 Mar 2023 20:20:39 +0200 Subject: [PATCH 1/2] microsoft-surface: upgrade kernel 6.1.6 to 6.1.18 --- microsoft/surface/common/kernel/default.nix | 2 +- .../{linux-6.1.6 => linux-6.1.18}/default.nix | 8 +-- .../{linux-6.1.6 => linux-6.1.18}/patches.nix | 49 +++++++++++++------ microsoft/surface/common/repos.nix | 4 +- microsoft/surface/surface-go/default.nix | 2 +- 5 files changed, 43 insertions(+), 22 deletions(-) rename microsoft/surface/common/kernel/{linux-6.1.6 => linux-6.1.18}/default.nix (80%) rename microsoft/surface/common/kernel/{linux-6.1.6 => linux-6.1.18}/patches.nix (65%) diff --git a/microsoft/surface/common/kernel/default.nix b/microsoft/surface/common/kernel/default.nix index f8044d3..ffb4d2b 100644 --- a/microsoft/surface/common/kernel/default.nix +++ b/microsoft/surface/common/kernel/default.nix @@ -7,7 +7,7 @@ in { imports = [ ./linux-5.19.17 ./linux-6.0.17 - ./linux-6.1.6 + ./linux-6.1.18 ]; options.microsoft-surface.kernelVersion = mkOption { diff --git a/microsoft/surface/common/kernel/linux-6.1.6/default.nix b/microsoft/surface/common/kernel/linux-6.1.18/default.nix similarity index 80% rename from microsoft/surface/common/kernel/linux-6.1.6/default.nix rename to microsoft/surface/common/kernel/linux-6.1.18/default.nix index 86c17a9..cbf228d 100644 --- a/microsoft/surface/common/kernel/linux-6.1.6/default.nix +++ b/microsoft/surface/common/kernel/linux-6.1.18/default.nix @@ -8,7 +8,7 @@ let cfg = config.microsoft-surface; - version = "6.1.6"; + version = "6.1.18"; extraMeta.branch = "6.1"; patchDir = repos.linux-surface + "/patches/${extraMeta.branch}"; kernelPatches = pkgs.callPackage ./patches.nix { @@ -20,17 +20,17 @@ let inherit version extraMeta kernelPatches; src = fetchurl { url = "mirror://kernel/linux/kernel/v6.x/linux-${version}.tar.xz"; - sha256 = "sha256-Pk2OVh2lcDogWujXsr7WxcZPxCme68v9IEgeY7V9XuM="; + sha256 = "sha256-hCrBXv8Ob7DBUP34P09qr2tMEjnc+MFOIidiDsCuFB4="; }; }; in { options.microsoft-surface.kernelVersion = mkOption { - type = types.enum [ "6.1.6" ]; + type = types.enum [ "6.1.18" ]; }; - config = mkIf (cfg.kernelVersion == "6.1.6") { + config = mkIf (cfg.kernelVersion == "6.1.18") { boot = { inherit kernelPackages; }; diff --git a/microsoft/surface/common/kernel/linux-6.1.6/patches.nix b/microsoft/surface/common/kernel/linux-6.1.18/patches.nix similarity index 65% rename from microsoft/surface/common/kernel/linux-6.1.6/patches.nix rename to microsoft/surface/common/kernel/linux-6.1.18/patches.nix index 7b3cfdc..78c7cea 100644 --- a/microsoft/surface/common/kernel/linux-6.1.6/patches.nix +++ b/microsoft/surface/common/kernel/linux-6.1.18/patches.nix @@ -36,6 +36,11 @@ # SURFACE_HOTPLUG = module; + # + # Intel Touch Host Controller + # + HID_ITHC = module; + # # IPTS touchscreen # @@ -94,31 +99,47 @@ patch = patchDir + "/0004-ipts.patch"; } { - name = "ms-surface/0005-surface-sam"; - patch = patchDir + "/0005-surface-sam.patch"; + name = "ms-surface/0005-ithc"; + patch = patchDir + "/0005-ithc.patch"; } { - name = "ms-surface/0006-surface-sam-over-hid"; - patch = patchDir + "/0006-surface-sam-over-hid.patch"; + name = "ms-surface/0006-surface-sam"; + patch = patchDir + "/0006-surface-sam.patch"; } { - name = "ms-surface/0007-surface-button"; - patch = patchDir + "/0007-surface-button.patch"; + name = "ms-surface/0007-surface-sam-over-hid"; + patch = patchDir + "/0007-surface-sam-over-hid.patch"; } { - name = "ms-surface/0008-surface-typecover"; - patch = patchDir + "/0008-surface-typecover.patch"; + name = "ms-surface/0008-surface-button"; + patch = patchDir + "/0008-surface-button.patch"; } { - name = "ms-surface/0009-cameras"; - patch = patchDir + "/0009-cameras.patch"; + name = "ms-surface/0009-surface-typecover"; + patch = patchDir + "/0009-surface-typecover.patch"; } { - name = "ms-surface/0010-amd-gpio"; - patch = patchDir + "/0010-amd-gpio.patch"; + name = "ms-surface/0010-surface-shutdown"; + patch = patchDir + "/0010-surface-shutdown.patch"; } { - name = "ms-surface/0011-rtc"; - patch = patchDir + "/0011-rtc.patch"; + name = "ms-surface/0011-surface-gpe"; + patch = patchDir + "/0011-surface-gpe.patch"; + } + { + name = "ms-surface/0012-cameras"; + patch = patchDir + "/0012-cameras.patch"; + } + { + name = "ms-surface/0013-amd-gpio"; + patch = patchDir + "/0013-amd-gpio.patch"; + } + { + name = "ms-surface/0014-rtc"; + patch = patchDir + "/0014-rtc.patch"; + } + { + name = "ms-surface/0015-intel-thread-director"; + patch = patchDir + "/0015-intel-thread-director.patch"; } ] diff --git a/microsoft/surface/common/repos.nix b/microsoft/surface/common/repos.nix index f10ad9a..982fefd 100644 --- a/microsoft/surface/common/repos.nix +++ b/microsoft/surface/common/repos.nix @@ -4,8 +4,8 @@ linux-surface = fetchFromGitHub { owner = "linux-surface"; repo = "linux-surface"; - rev = "91240ac43dfdfb3e68bbc604def84685a218fab9"; - sha256 = "sha256-Jf7tthFWj67Esjx+/ZwG7BYlN7zWS26e1TbsznNxE9Q="; + rev = "efe7ddadd4aad3d1a6531334fe086931ec8640a1"; + sha256 = "sha256-WgJHLY4vU4lsZ6M0hOng8TMVRALxQeSwQM4QX6DzrbI="; }; # This is the owner and repo for the pre-patched kernel from the "linux-surface" project: diff --git a/microsoft/surface/surface-go/default.nix b/microsoft/surface/surface-go/default.nix index b57d73e..b4f990e 100644 --- a/microsoft/surface/surface-go/default.nix +++ b/microsoft/surface/surface-go/default.nix @@ -17,7 +17,7 @@ in { ../../../common/cpu/intel/kaby-lake ]; - microsoft-surface.kernelVersion = "6.1.6"; + microsoft-surface.kernelVersion = "6.1.18"; boot.kernelParams = [ "i915.enable_rc6=1" From b7c184da76c87dde8ae25446e0ccb252b6ff7a02 Mon Sep 17 00:00:00 2001 From: louib Date: Mon, 27 Mar 2023 20:49:46 -0400 Subject: [PATCH 2/2] fix: add missing touch-ft5406 export to raspberry-pi config --- raspberry-pi/4/default.nix | 1 + 1 file changed, 1 insertion(+) diff --git a/raspberry-pi/4/default.nix b/raspberry-pi/4/default.nix index ab399f7..07ae53f 100644 --- a/raspberry-pi/4/default.nix +++ b/raspberry-pi/4/default.nix @@ -11,6 +11,7 @@ ./poe-hat.nix ./poe-plus-hat.nix ./tc358743.nix + ./touch-ft5406.nix ./pwm0.nix ./pkgs-overlays.nix ];