pstore-test manual
high
- Image Types:
- hmi-armhf
- Image Deployment:
- APT, OSTree
- Type:
- functional
Description
Test the pstore functionality usage
Execution Steps
- For test purpose, you can generate a kernel crash by setting reboot timeout to 10 seconds and trigger a panic:
- While the target reboots enter the U-Boot
- In U-Boot, logs can be displayed or saved using pstore command.
- PStore parameters need to be set during U-Boot configuration and match kernel ramoops parameters
- In the U-Boot execute the below command
- => pstore set 0x30000000 0x100000 0x2000 0x2000
- Then all available dumps can be displayed using:
- => pstore display
- Logs can be saved to an existing directory in an Ext2 or Ext4 partition using pstore save, e.g. on root directory of 1st partition of the 2nd MMC:
- => pstore save mmc 1:1 /
- After reboot, logs ca be found at /sys/fs/pstore:
$ sudo sh -c "echo 1 > /proc/sys/kernel/sysrq
$ sudo sh -c "echo 10 > /proc/sys/kernel/panic
$ sudo sh -c "echo c > /proc/sysrq-trigger
$ sudo ls -l /sys/fs/pstore
Expected
After reboot, logs ca be found at /sys/fs/pstore:
total 0
-r--r--r-- 1 root root 8180 2019-11-15 11:58 console-ramoops-0
-r--r--r-- 1 root root 8136 2019-11-15 11:51 dmesg-ramoops-0
-r--r--r-- 1 root root 7856 2019-11-15 11:51 dmesg-ramoops-1