How to capture crash log using kdump

キャンセル
次の結果を表示 
次の代わりに検索 
もしかして: 

How to capture crash log using kdump

1,843件の閲覧回数
Raana
Contributor III

Dear Team,

Right now, I'm using i.Mx8x based custom board.

BSP version is, imx-yocto-L4.14.98_2.0.0_ga

There I'm trying to capture the crash log of my standard kernel if any panic occurs.

I'm using 'kdump' for the same. I'm following below procedure to achieve kdump.

1) Precondition (Kernel)

There are two kernels,
- Standard (production) kernel - kernel we normally boot
- Crash (capture) kernel - kernel specially used for collecting crash dumps

a) Kernel configuration for Standard kernel
CONFIG_KEXEC=y
CONFIG_SYSFS=y
CONFIG_DEBUG_INFO=Y

b) Kernel configuration for capture kernel
CONFIG_CRASH_DUMP=y
CONFIG_PROC_VMCORE=y
(CONFIG_PROC_VMCORE is set by default when CONFIG_CRASH_DUMP is selected.)

NOTE: Keep both a kernel (Image and *.bin) in /boot directory

2) Precondition (kexec)
Install the "kexec-tools" in Yocto.

3) Boot the Standard kernel with boot parameter "crashkernel"
-> setenv bootargs 'crashkernel=256M'

4) Load the capture kernel with following command
kexec -p /boot/Image --command-line="root=/dev/mmcblk0p2 console=ttyLP0,115200 earlycon=lpuart32,0x5a060000,115200 rootwait rootfstype=ext4 ro 1 maxcpus=1 reset_devices"

5) To test,
echo 1 > /proc/sys/kernel/sysrq
echo c > /proc/sysrq-trigger

But my capture kernel is not booting properly. This also getting crashed in-between.

Is my above procedure correct?

Thank You.

Best Regards,

J.P.Raja

ラベル(2)
0 件の賞賛
1 返信

1,783件の閲覧回数
b36401
NXP TechSupport
NXP TechSupport

Here is an article regarding to kdump usage:
https://community.nxp.com/docs/DOC-347175

0 件の賞賛