how to enable the ramoops/pstore on imx8mq evk

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

how to enable the ramoops/pstore on imx8mq evk

2,851 Views
94393400
Contributor III

Hello,

 

Our device with an iMX8mq evk processor running Android 9.0  and Linux version 4.14.98-07257.

We would like to use the ramoops/pstore feature to obtain useful logs related to kernel panics, but it is not working.

In arch/arm64/configs/kwe1901_defconfig , We have the following changes:

 

CONFIG_PSTORE=y
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_RAM=y

 

and in the arch/arm64/boot/dts/freescale/kwe1901.dtsi , we add 

+ reserved-memory {
+ #address-cells = <2>;
+ #size-cells = <2>;
+ ranges;
+
+ ramoops@8f000000 {
+ compatible = "ramoops";
+ reg = <0 0x8f000000 0 0x100000>;
+ record-size = <0x4000>;
+ console-size = <0x4000>;
+ };
+ };

After that we can trace a kernel panic with the following instructions entered from an adb shell:

 

echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

 

But after the device reboots, the folder /sys/fs/pstore is empty

 

Does anyone enabled this function?

Labels (1)
0 Kudos
Reply
4 Replies

2,160 Views
savedstesen
Contributor I

I did follow the guide here and I'm now able to see kernel panics in the /sys/fs/pstore/ folder. Running on a imx8mq running Android 9 with these kernel settings: 

zcat /proc/config.gz |grep PSTORE
CONFIG_PSTORE=y
CONFIG_PSTORE_ZLIB_COMPRESS=y
# CONFIG_PSTORE_LZO_COMPRESS is not set
# CONFIG_PSTORE_LZ4_COMPRESS is not set
CONFIG_PSTORE_CONSOLE=y
CONFIG_PSTORE_PMSG=y
CONFIG_PSTORE_RAM=y
0 Kudos
Reply

2,175 Views
savedstesen
Contributor I

Are there any other options for recording logs across crashes / reboots. We would like to be able to get this as we are seeing crashes sometimes. 

0 Kudos
Reply

2,802 Views
b36401
NXP Employee
NXP Employee

Unfortunately our BSP cannot support warm reboot. So ramoops is not supported.
Sorry for the inconvenience.

0 Kudos
Reply

2,171 Views
savedstesen
Contributor I

@b36401 Are there any other options for recording logs across crashes / reboots. We would like to be able to get this as we are seeing crashes sometimes. 

 
 
0 Kudos
Reply