From fd28f0ce04ab44c12190d0fda8062d7abc3cba26 Mon Sep 17 00:00:00 2001 From: Daniel Barlow Date: Wed, 1 Jan 2025 14:11:22 +0000 Subject: [PATCH] rt3200 needs pmsg-size set in its dts for persistent logging --- devices/belkin-rt3200/default.nix | 6 +++++- devices/belkin-rt3200/pstore-pmsg.dtsi | 8 ++++++++ 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 devices/belkin-rt3200/pstore-pmsg.dtsi diff --git a/devices/belkin-rt3200/default.nix b/devices/belkin-rt3200/default.nix index 671f010e..3451e455 100644 --- a/devices/belkin-rt3200/default.nix +++ b/devices/belkin-rt3200/default.nix @@ -113,7 +113,8 @@ }; module = {pkgs, config, lib, lim, ... }: - let firmware = pkgs.stdenv.mkDerivation { + let inherit (lib) mkIf; + firmware = pkgs.stdenv.mkDerivation { name = "wlan-firmware"; phases = ["installPhase"]; installPhase = '' @@ -268,6 +269,9 @@ "${openwrt.src}/target/linux/mediatek/dts" "${config.system.outputs.kernel.modulesupport}/arch/arm64/boot/dts/mediatek/" ]; + includes = mkIf config.logging.persistent.enable [ + ./pstore-pmsg.dtsi + ]; }; # - 0x000000000000-0x000008000000 : "spi-nand0" diff --git a/devices/belkin-rt3200/pstore-pmsg.dtsi b/devices/belkin-rt3200/pstore-pmsg.dtsi new file mode 100644 index 00000000..36977b2f --- /dev/null +++ b/devices/belkin-rt3200/pstore-pmsg.dtsi @@ -0,0 +1,8 @@ +/ { + reserved-memory { + /* make sure address matches upstream */ + ramoops@42ff0000 { + pmsg-size = <0x10000>; + }; + }; +};