From 08af694944df56fe2c9b7d8cb4c5141eb54acd83 Mon Sep 17 00:00:00 2001 From: Adam Stephens Date: Wed, 7 Feb 2024 09:39:52 -0500 Subject: [PATCH] fix: efi vars reading crashes --- packages/default.nix | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/packages/default.nix b/packages/default.nix index 3a0e389..837cb32 100644 --- a/packages/default.nix +++ b/packages/default.nix @@ -15,7 +15,21 @@ let src = sources.linux; - kernelPatches = args.kernelPatches or [ ]; + kernelPatches = (args.kernelPatches or [ ]) ++ [ + { + # fix resets when reading EFI vars + name = "qcom-shm-bridge-tz"; + patch = ( + pkgs.fetchurl { + url = "https://lore.kernel.org/lkml/20240205182810.58382-1-brgl@bgdev.pl/t.mbox.gz"; + hash = "sha256-apwfO/bhVd8jzsHpOPFQXshzdwfg5Zcelf2vCDtlCtI="; + } + ); + extraStructuredConfig = { + QCOM_TZMEM_MODE_SHMBRIDGE = lib.kernel.yes; + }; + } + ]; extraMeta.branch = lib.versions.majorMinor version; } );