feat(ramoops): add ramoops support to kernel

For more information see:
https://embear.ch/blog/using-ramoops
This commit is contained in:
Patrick Vogelaar 2023-03-07 21:22:40 +01:00
parent 06081b8151
commit 6434d45e04
2 changed files with 52 additions and 0 deletions

View File

@ -0,0 +1,51 @@
From e51531f90df41f3166901e75b693d4bae5ed5a29 Mon Sep 17 00:00:00 2001
From: Patrick Vogelaar <patrick.vogelaar@belden.com>
Date: Tue, 7 Mar 2023 21:17:24 +0100
Subject: [PATCH] feat(ramoops):add ramoops support to kernel
For more information see:
https://embear.ch/blog/using-ramoops
---
arch/arm64/boot/dts/marvell/cn9130-cf-pro.dts | 16 ++++++++++++++++
arch/arm64/configs/cn9130-netmodule_defconfig | 4 ++++
2 files changed, 20 insertions(+)
diff --git a/arch/arm64/boot/dts/marvell/cn9130-cf-pro.dts b/arch/arm64/boot/dts/marvell/cn9130-cf-pro.dts
index 5adb762141a7..07a582df5dd0 100644
--- a/arch/arm64/boot/dts/marvell/cn9130-cf-pro.dts
+++ b/arch/arm64/boot/dts/marvell/cn9130-cf-pro.dts
@@ -19,6 +19,22 @@ chosen {
stdout-path = "serial0:115200n8";
};
+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ ramoops@4200000 {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ compatible = "ramoops";
+ reg = <0x00 0x4200000 0x0 0x100000>; // 1MB at 0x880000000
+ record-size = <0x10000>; // 64kB per record
+ console-size = <0x10000>; // 64kB for console output
+ pmsg-size = <0x1000>; // 4kB for user messages
+ };
+ };
+
aliases {
gpio1 = &cp0_gpio1;
gpio2 = &cp0_gpio2;
diff --git a/arch/arm64/configs/cn9130-netmodule_defconfig b/arch/arm64/configs/cn9130-netmodule_defconfig
index 0e7b656a4fa3..96aaa5d2049b 100644
--- a/arch/arm64/configs/cn9130-netmodule_defconfig
+++ b/arch/arm64/configs/cn9130-netmodule_defconfig
@@ -1190,3 +1190,7 @@ CONFIG_DEBUG_KERNEL=y
# CONFIG_DEBUG_PREEMPT is not set
# CONFIG_FTRACE is not set
CONFIG_MEMTEST=y
+#ramoops
+CONFIG_PSTORE_CONSOLE=y
+CONFIG_PSTORE_PMSG=y
+CONFIG_PSTORE_RAM=y

View File

@ -5,6 +5,7 @@ inherit kernel
SRC_URI = "git://gitlab.com/netmodule/kernel/linux-netmodule.git;protocol=ssh;user=git;branch=5.15/solidrun/base \
file://0001-cn913x-fix-compatible-node-inside-dts.patch \
file://0001-feat-ramoops-add-ramoops-support-to-kernel.patch \
"
SRCREV ?= "be2f2f0c96e85ecec9d807397194e46bb8bea4a5"