config.logging.persistent enables /dev/pmsg0

- whatever's written to /dev/pmsg0 appears as
/sys/fs/pstore/pmsg-ramoops-0 after reboot

- only works on devices with the relevant device tree
support (gl-ar750 and whatever has it by default)

- nothing in the system is actually writing this file yet

- or reading it at boot time, for that matter
This commit is contained in:
Daniel Barlow
2024-12-17 23:24:31 +00:00
parent b52133a28b
commit 81f5550bf0
4 changed files with 24 additions and 2 deletions

View File

@@ -52,8 +52,9 @@
'';
module = {pkgs, config, lim, ... }:
module = {pkgs, config, lim, lib, ... }:
let
inherit (lib) mkIf;
openwrt = pkgs.openwrt;
firmwareBlobs = pkgs.pkgsBuildBuild.fetchFromGitHub {
owner = "kvalo";
@@ -119,6 +120,9 @@
includePaths = [
"${openwrt.src}/target/linux/ath79/dts"
];
includes = mkIf config.logging.persistent.enable [
./pstore-ramoops.dtsi
];
};
networkInterfaces =

View File

@@ -0,0 +1,10 @@
/ {
reserved-memory {
ramoops@03f00000 {
compatible = "ramoops";
reg = <0x03f00000 0x10000>;
record-size = <0x1000>;
pmsg-size = <0x1000>;
};
};
};