#!/bin/sh # read-only probe: what reset-reason sources exist grep -q " /sys/kernel/debug " /proc/mounts || mount -t debugfs debugfs /sys/kernel/debug echo "== regmap"; ls /sys/kernel/debug/regmap/ 2>&1 for r in /sys/kernel/debug/regmap/*; do echo "$r name=$(cat $r/name 2>/dev/null)"; done echo "== pstore"; grep pstore /proc/mounts; mkdir -p /sys/fs/pstore 2>/dev/null; mount -t pstore pstore /sys/fs/pstore 2>&1; ls -la /sys/fs/pstore 2>&1 dmesg | grep -iE "ramoops|pstore|pon|wdt|watchdog|reboot" | head -20 echo "== watchdog"; ls -la /dev/watchdog* 2>&1; ls /sys/class/watchdog 2>&1 echo "== dt"; ls /proc/device-tree/reserved-memory 2>&1 | tr '\n' ' '; echo; find /proc/device-tree -name "*pon*" -o -name "*watchdog*" 2>/dev/null | head echo RR-PROBE-END