Kdump + Crash in I.MX

Document created by Peter Liu Employee on Jul 7, 2020Last modified by Peter Liu Employee on Jul 7, 2020
Version 2Show Document
  • View in full screen mode

Here is a summary including kdump + crash porting in i.mx, the tool is very useful in crash issue.

Overview

  • What is Kdump + Crash
  • Preconditions
    • kernel
    • kexec
  • Step actions
  • Crash tool
  • Analysis of use cases

 

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

  1. Reboot the system by enter below command:

      $ reboot

  1. Check the related log by enter below command:

      $ ls /sys/fs/pstore/

         console-ramoops-0 pmsg-ramoops-0

1 person found this helpful

Attachments

Outcomes