Here is a summary including kdump + crash porting in i.mx, the tool is very useful in crash issue.
Besides that, I summary the dumper tools including kdump and pstore, the respective patches shown as below:
Kdump:
Customer can apply below patch in config and cmdline, which has been confirmed on linux os. As memory is very precious to android, so kdump is not worth adopting.
Config:
First kernel:
CONFIG_KEXEC=y
CONFIG_SYSFS=y
CONFIG_DEBUG_INFO=Y
Capture kernel:
CONFIG_CRASH_DUMP=y
CONFIG_PROC_VMCORE=y
Cmdline:
crashkernel=512M
Pstore:
Customer can apply below patch in config and dts showing as below, which has been confirmed on linux and android os.
Config:
CONFIG_PSTORE_PMSG=y
Dts:
+ ramoops@0x91f00000 {
+ compatible = "ramoops";
+ reg = <0 0x91f00000 0 0x00100000>;
+ record-size = <0x00020000>;
+ console-size = <0x00020000>;
+ ftrace-size = <0x00020000>;
+ pmsg-size = <0x00020000>;
+ };
+
decoder_boot: decoder-boot@84000000 {
reg = <0 0x84000000 0 0x2000000>;
no-map;
Reproduce steps
$ reboot
$ ls /sys/fs/pstore/
console-ramoops-0 pmsg-ramoops-0
Dts:
+ ramoops@0x91f00000 {
+ compatible = "ramoops";
+ reg = <0 0x91f00000 0 0x00100000>;
+ record-size = <0x00020000>;
+ console-size = <0x00020000>;
+ ftrace-size = <0x00020000>;
+ pmsg-size = <0x00020000>;
+ };
+
decoder_boot: decoder-boot@84000000 {
reg = <0 0x84000000 0 0x2000000>;
no-map;
where exactly I have to add lines?