This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5748: AM5748 Kexec issue

Part Number: AM5748

Hi,

We are trying to debug the kernel crash using kdump. But cant able to generate even crashdump for kernel crash. 

We have configure below configuration in kernel and download kdump-tools, kexec related files from debian and installed on custom board.

CONFIG_KEXEC=y
CONFIG_CRASH_DUMP=y
CONFIG_DEBUG_INFO=y
CONFIG_MAGIC_SYSRQ=y
CONFIG_PROC_VMCORE=y

We disabled watchdog also from reboot when trigger happened.

While passing kexec command we are getting kexec_file_load not avialable. Any configuration is missing?

root@sd:/boot# kexec -d -l /boot/zImage --dtb=/boot/am574x-idk.dtb --command-line="console=ttyO2,115200n8 root=PARTUUID=dbf29694-02 rw rootfstype=ext4 rootwait crashkernel=64M"

syscall kexec_file_load not available.


kernel: 0xb6b3b008 kernel_size: 0x336200
MEMORY RANGES
0000000080000000-000000009fffffff (0)
00000000ac000000-00000000fecfffff (0)
zImage header: 0x016f2818 0x00000000 0x00336200
zImage size 0x336200, file size 0x336200
zImage requires 0x00347200 bytes
Kernel: address=0x80008000 size=0x01063a00
DT : address=0x8106d000 size=0x000184ed
kexec_load: entry = 0x80008000 flags = 0x280000
nr_segments = 2
segment[0].buf = 0xb6b3b008
segment[0].bufsz = 0x336204
segment[0].mem = 0x80008000
segment[0].memsz = 0x337000
segment[1].buf = 0x452008
segment[1].bufsz = 0x184ed
segment[1].mem = 0x8106d000
segment[1].memsz = 0x19000

and starting service also im getting this below log

root@AMxxxx~# systemctl start kdump-tools.service
[ 51.164896] kdump-tools[1158]: Starting kdump-tools: Creating symlink /var/lib/kdump/vmlinuz.
[ 51.178211] kdump-tools[1158]: Creating symlink /var/lib/kdump/initrd.img.
[ 51.185858] kdump-tools[1158]: /usr/sbin/kdump-config: line 201: file: command not found
[ 51.198261] kdump-tools[1158]: Invalid symlink : /var/lib/kdump/initrd.img ... failed!
[ 51.199251] kdump-tools[1158]: Creating symlink /var/lib/kdump/initrd.img.
[ 51.205708] kdump-tools[1158]: /usr/sbin/kdump-config: line 201: file: command not found
[ 51.217959] kdump-tools[1158]: Invalid symlink : /var/lib/kdump/vmlinuz ... failed!
[ 51.218940] kdump-tools[1158]: Creating symlink /var/lib/kdump/vmlinuz.
[ 51.251533] kdump-tools[1158]: /usr/sbin/kdump-config: line 516: file: command not found
[ 51.272736] kdump-tools[1158]: syscall kexec_file_load not available.
[ 51.273740] kdump-tools[1158]: No kernel specified
[ 51.274634] kdump-tools[1158]: kexec-tools 2.0.18
[ 51.275280] kdump-tools[1158]: Usage: kexec [OPTION]... [kernel]
[ 51.275926] kdump-tools[1158]: Directly reboot into a new kernel
[ 51.276565] kdump-tools[1158]: -h, --help Print this help.
[ 51.277192] kdump-tools[1158]: -v, --version Print the version of kexec.
[ 51.277852] kdump-tools[1158]: -f, --force Force an immediate kexec,
[ 51.278491] kdump-tools[1158]: don't call shutdown.
[ 51.279132] kdump-tools[1158]: -i, --no-checks Fast reboot, no memory integrity checks.
[ 51.279759] kdump-tools[1158]: -x, --no-ifdown Don't bring down network interfaces.
[ 51.281359] kdump-tools[1158]: -y, --no-sync Don't sync filesystems before kexec.
[ 51.282052] kdump-tools[1158]: -l, --load Load the new kernel into the
[ 51.282734] kdump-tools[1158]: current kernel.
[ 51.283417] kdump-tools[1158]: -p, --load-panic Load the new kernel for use on panic.
[ 51.284196] kdump-tools[1158]: -u, --unload Unload the current kexec target kernel.
[ 51.284893] kdump-tools[1158]: If capture kernel is being unloaded
[ 51.285666] kdump-tools[1158]: specify -p with -u.
[ 51.286367] kdump-tools[1158]: -e, --exec Execute a currently loaded kernel.
[ 51.287032] kdump-tools[1158]: -t, --type=TYPE Specify the new kernel is of this type.
[ 51.290331] kdump-tools[1158]: --mem-min=<addr> Specify the lowest memory address to
[ 51.291094] kdump-tools[1158]: load code into.
[ 51.291714] kdump-tools[1158]: --mem-max=<addr> Specify the highest memory address to
[ 51.292347] kdump-tools[1158]: load code into.
[ 51.292963] kdump-tools[1158]: --reuseinitrd Reuse initrd from first boot.
[ 51.293515] kdump-tools[1158]: --print-ckr-size Print crash kernel region size.
[ 51.294168] kdump-tools[1158]: --load-preserve-context Load the new kernel and preserve
[ 51.294824] kdump-tools[1158]: context of current kernel during kexec.
[ 51.295398] kdump-tools[1158]: --load-jump-back-helper Load a helper image to jump back
[ 51.295964] kdump-tools[1158]: to original kernel.
[ 51.296573] kdump-tools[1158]: --entry=<addr> Specify jump back address.
[ 51.297355] kdump-tools[1158]: (0 means it's not jump back or
[ 51.298029] kdump-tools[1158]: preserve context)
[ 51.298429] kdump-tools[1158]: to original kernel.
[ 51.298947] kdump-tools[1158]: -s, --kexec-file-syscall Use file based syscall for kexec operation
[ 51.299465] kdump-tools[1158]: -c, --kexec-syscall Use the kexec_load syscall for for compatibility
[ 51.299859] kdump-tools[1158]: with systems that don't support -s (default)
[ 51.300331] kdump-tools[1158]: -a, --kexec-syscall-auto Use file based syscall for kexec and fall
[ 51.300717] kdump-tools[1158]: back to the compatibility syscall when file based
[ 51.301113] kdump-tools[1158]: syscall is not supported or the kernel did not
[ 51.302620] kdump-tools[1158]: understand the image
[ 51.303016] kdump-tools[1158]: -d, --debug Enable debugging to help spot a failure.
[ 51.303391] kdump-tools[1158]: -S, --status Return 0 if the type (by default crash) is loaded.
[ 51.303770] kdump-tools[1158]: Supported kernel file types and options:
[ 51.304154] kdump-tools[1158]: uImage
[ 51.304524] kdump-tools[1158]: --command-line=STRING Set the kernel command line to STRING.
[ 51.304897] kdump-tools[1158]: --append=STRING Set the kernel command line to STRING.
[ 51.305277] kdump-tools[1158]: --initrd=FILE Use FILE as the kernel's initial ramdisk.
[ 51.305650] kdump-tools[1158]: --ramdisk=FILE Use FILE as the kernel's initial ramdisk.
[ 51.306019] kdump-tools[1158]: --dtb=FILE Use FILE as the fdt blob.
[ 51.306385] kdump-tools[1158]: --atags Use ATAGs instead of device-tree.
[ 51.306756] kdump-tools[1158]: --page-offset=PAGE_OFFSET
[ 51.637830] kdump-tools[1158]: Set PAGE_OFFSET of crash dump vmcore
[ 51.638249] kdump-tools[1158]: zImage
[ 51.638624] kdump-tools[1158]: --command-line=STRING Set the kernel command line to STRING.
[ 51.638993] kdump-tools[1158]: --append=STRING Set the kernel command line to STRING.
[ 51.639361] kdump-tools[1158]: --initrd=FILE Use FILE as the kernel's initial ramdisk.
[ 51.639731] kdump-tools[1158]: --ramdisk=FILE Use FILE as the kernel's initial ramdisk.
[ 51.640216] kdump-tools[1158]: --dtb=FILE Use FILE as the fdt blob.
[ 51.640590] kdump-tools[1158]: --atags Use ATAGs instead of device-tree.
[ 51.640956] kdump-tools[1158]: --page-offset=PAGE_OFFSET
[ 51.641326] kdump-tools[1158]: Set PAGE_OFFSET of crash dump vmcore
[ 51.641691] kdump-tools[1158]: Architecture options:
[ 51.642060] kdump-tools[1158]: --image-size=<size>
[ 51.642429] kdump-tools[1158]: Specify the assumed total image size of
[ 51.642797] kdump-tools[1158]: the kernel that is about to be loaded,
[ 51.643188] kdump-tools[1158]: including the .bss section, as reported
[ 51.643561] kdump-tools[1158]: by 'arm-linux-size vmlinux'. If not
[ 51.643931] kdump-tools[1158]: specified, this value is implicitly set
[ 51.644301] kdump-tools[1158]: to the compressed images size * 4.
[ 51.644682] kdump-tools[1158]: --dt-no-old-root
[ 51.645054] kdump-tools[1158]: do not reuse old kernel root= param.
[ 51.645424] kdump-tools[1158]: while creating flatten device tree.
[ 51.645894] kdump-tools[1158]: failed to load kdump kernel ... failed!

Can you explain the steps to enable the kdump for while crash happened?

Thanks

Uthayakumar RH