kernel: kmod-ramoops: Include pstore console support
authorBrian Norris <computersforpeace@gmail.com>
Sun, 5 Feb 2023 00:35:33 +0000 (16:35 -0800)
committerHauke Mehrtens <hauke@hauke-m.de>
Sat, 18 Feb 2023 18:58:22 +0000 (19:58 +0100)
Pstore ramoops support is useful even when there isn't an explicit
panic/crash. We can log all kernel messages via a "console", and then
retrieve them in the event of some non-kernel-panic reset (e.g.,
watchdog).

Since the buffer memory is already reserved, there isn't much overhead
to doing this.

The new console files will show up as:

  /sys/fs/pstore/console-ramoops-N

Cc: Hannu Nyman <hannu.nyman@iki.fi>
Signed-off-by: Brian Norris <computersforpeace@gmail.com>
package/kernel/linux/modules/other.mk

index 2bd15dfe67e1a6c160df6bfc9490e396548fea49..1369a4ad54f1cd19b88149aa5e28ced22bcadbf6 100644 (file)
@@ -834,7 +834,8 @@ define KernelPackage/ramoops
   SUBMENU:=$(OTHER_MENU)
   TITLE:=Ramoops (pstore-ram)
   DEFAULT:=m if ALL_KMODS
-  KCONFIG:=CONFIG_PSTORE_RAM
+  KCONFIG:=CONFIG_PSTORE_RAM \
+       CONFIG_PSTORE_CONSOLE=y
   DEPENDS:=+kmod-pstore +kmod-reed-solomon
   FILES:= $(LINUX_DIR)/fs/pstore/ramoops.ko
   AUTOLOAD:=$(call AutoLoad,30,ramoops,1)