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@42ff0000 {
target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi: 
ramoops@42100000 {
target/linux/mediatek/patches-5.15/105-dts-mt7622-enable-pstore.patch:+ 
ramoops@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@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@box:~ hexdump -C /proc/device-tree/reserved-memory/ramoops@7ff0000/reg
00000000  00 00 00 00 07 ff 00 00  00 00 00 00 00 01 00 00  |................|
00000010
root@box:~ hexdump -C 
/proc/device-tree/reserved-memory/ramoops@7ff0000/record-size
00000000  00 00 10 00                                       |....|
00000004
root@box:~ mount | grep pstore
pstore on /sys/fs/pstore type pstore (rw,noatime)
root@box:~ lsmod | grep pstore
pstore                  9910  1 

but when crashing the kernel with: echo 'c' >/proc/sysrq-trigger
the store is always empty:

root@box:~ ls -l /sys/fs/pstore/

Has anyone succeeded and has maybe a hint for me?

bye, bastian


_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to