howto support ramoops (former crashlog.o)
Bastian Bittorf
bb at npl.de
Tue Aug 23 09:47:28 PDT 2022
I'am trying to add ramoops support for a specific mediatek model.
There are alreay a few commit regarding this, but i'am not apply
to harvest a crashlog after a crash-reboot.
# openwrt$ git grep "ramoops@"
package/boot/uboot-mediatek/patches/050-mt7622-enable-pstore.patch:+ ramoops at 42ff0000 {
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi: ramoops at 42100000 {
target/linux/mediatek/patches-5.15/105-dts-mt7622-enable-pstore.patch:+ ramoops at 42ff0000 {
This looks good, e.g. 0x42ff0000 = the upper 48 Megabyte minus 64k
My Router Archer C6U v1 has 128mb RAM, so i go for:
128 * 1024 * 1024 = 134217728 = 0x8000000,
substracting 0x10000 = 0x7ff0000 - so my dts-patch looks like:
+reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ /* 64 KiB reserved for ramoops/pstore */
+ ramoops at 7ff0000 {
+ compatible = "ramoops";
+ reg = <0 0x7ff0000 0 0x10000>;
+ record-size = <0x1000>;
+ };
+};
It builds and the running image has 'pstore' automatically mounted,
and the kernelmodule loads, and is visible in device-tree:
root at box:~ hexdump -C /proc/device-tree/reserved-memory/ramoops at 7ff0000/reg
00000000 00 00 00 00 07 ff 00 00 00 00 00 00 00 01 00 00 |................|
00000010
root at box:~ hexdump -C /proc/device-tree/reserved-memory/ramoops at 7ff0000/record-size
00000000 00 00 10 00 |....|
00000004
root at box:~ mount | grep pstore
pstore on /sys/fs/pstore type pstore (rw,noatime)
root at box:~ lsmod | grep pstore
pstore 9910 1
but when crashing the kernel with: echo 'c' >/proc/sysrq-trigger
the store is always empty:
root at box:~ ls -l /sys/fs/pstore/
Has anyone succeeded and has maybe a hint for me?
bye, bastian
More information about the openwrt-devel
mailing list