From c51dcb30a256749c89a76e2b4cf8805ce29903da Mon Sep 17 00:00:00 2001 From: Colin Date: Thu, 23 May 2024 02:07:21 +0000 Subject: [PATCH] linux-postmarketos: add an option for building *with* modem power feature --- pkgs/additional/linux-postmarketos/default.nix | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/pkgs/additional/linux-postmarketos/default.nix b/pkgs/additional/linux-postmarketos/default.nix index 20a08b66..94c5bce0 100644 --- a/pkgs/additional/linux-postmarketos/default.nix +++ b/pkgs/additional/linux-postmarketos/default.nix @@ -7,6 +7,7 @@ , features ? null , kernelPatches ? null , randstructSeed ? "" +, withModemPower ? false }: # keep in sync with linux-megous @@ -67,6 +68,8 @@ let # CONFIG_SECURITY_LANDLOCK=y CONFIG_LSM="landlock,lockdown,yama,loadpin,safesetid,selinux,smack,tomoyo,apparmor,bpf"; + '' + lib.optionalString withModemPower '' + CONFIG_MODEM_POWER=y ''; in linuxManualConfig { @@ -82,6 +85,7 @@ in linuxManualConfig { # this forces me to include the Kconfig inline, instead of fetching it the way i do all the other pmOS kernel stuff. config = parseKconfig KconfigStr; + # these likely aren't *all* required for pinephone: pmOS kernel is shared by many devices kernelPatches = [ (pmPatch { name = "0001-dts-add-dontbeevil-pinephone-devkit"; @@ -99,10 +103,12 @@ in linuxManualConfig { name = "0004-dts-pinetab-make-audio-routing-consistent-with-pinep"; hash = "sha256-0R69silFsQkkgNIcSo4iKjhFzXTGQLma6fZSwAwSj3s="; }) + ] ++ lib.optionals (!withModemPower) [ (pmPatch { name = "0005-dts-pinephone-drop-modem-power-node"; hash = "sha256-59PdMo3hTfSh12pTIG/VzTSrsDQdK18nh+oCtnxvo50="; }) + ] ++ [ (pmPatch { name = "0006-drm-panel-simple-Add-Hannstar-TQTM070CB501"; hash = "sha256-KysfuhXwpSBUgdD2xd1IqbFdNz0GiGtFbP1xD5BeBPI=";