From 7b70b5ec860722270f77c25cbcf0f0deac81e292 Mon Sep 17 00:00:00 2001 From: Colin Date: Tue, 15 Aug 2023 10:49:07 +0000 Subject: [PATCH] linux-megous: build WITHOUT modem_power module, for better eg25-manager compatibility --- pkgs/additional/linux-megous/default.nix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/pkgs/additional/linux-megous/default.nix b/pkgs/additional/linux-megous/default.nix index 299508c8..0676151b 100644 --- a/pkgs/additional/linux-megous/default.nix +++ b/pkgs/additional/linux-megous/default.nix @@ -1,5 +1,6 @@ { lib , buildLinux +, fetchpatch , fetchFromGitHub , pkgs # something inside nixpkgs calls `override` on the kernel and passes in extra arguments @@ -40,6 +41,9 @@ let SCHED_DEBUG = lib.mkForce no; # determines /sys/kernel/debug/sched # SUNRPC_DEBUG = lib.mkForce no; # i use NFS though + # modem_power is incompatible with eg25-manager: + MODEM_POWER = no; + # taken from mobile-nixos config?? or upstream megous config?? RTL8723CS = module; BT_HCIUART_3WIRE = yes; @@ -107,6 +111,15 @@ let pkgs.kernelPatches.bridge_stp_helper pkgs.kernelPatches.request_key_helper # (patchDefconfig kernelConfig) + { + # Drop modem-power from DT to allow eg25-manager to have full control. + # source: + name = "remove-modem-power-from-devicetree"; + patch = fetchpatch { + url = "https://gitlab.com/postmarketOS/pmaports/-/raw/164e9f010dcf56642d8e6f422a994b927ae23f38/device/main/linux-postmarketos-allwinner/0007-dts-pinephone-drop-modem-power-node.patch"; + sha256 = "nYCoaYj8CuxbgXfy5q43Xb/ebe5DlJ1Px571y1/+lfQ="; + }; + } ];