LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 03-27-2014, 08:43 AM   #1
manjunath1990
LQ Newbie
 
Registered: Mar 2014
Posts: 2

Rep: Reputation: Disabled
kexec issue on arm platform


issue:trying to load the second kernel to capture the crash dump when panic ic occurred
performed following pre conditions in menuconfig-
CONFIG_KEXEC=y
CONFIG_SYSFS=y
CONFIG_DEBUG_INFO=Y
CONFIG_CRASH_DUMP=y
CONFIG_PROC_VMCORE=y
CONFIG_PROC_DEVICETREE=y
also allocated the memory for crashkernel :crashkernel=16M@900M
Using kexec-tool 2.0.6 cross compiled for arm platform.
Executed below command to load/boot the second kernel on panic/crash but we are getting "unrecoverable error:" not enough data for mem property

kexec -p uImage_m14a0 --command-line="$(cat /proc/cmdline)"
error:
Unable to find /proc/device-tree//chosen/linux,stdout-path, printing from purgatory is disabled
"unrecoverable error:" not enough data for mem property

please suggest any idea to resolve this issue.

Thanks
Manju
 
Old 09-19-2017, 02:45 PM   #2
samiksha.ambekar
LQ Newbie
 
Registered: Sep 2017
Posts: 2

Rep: Reputation: Disabled
ARM:KEXEC error

Hi Manju,

I am trying to load the second kernel to capture the crash dump when panic occurs.
I am trying this on ARMHF platform with ubuntu.

kexec -p is giving me below error :

sudo kexec -p -d uImage
kernel: 0x36b96008 kernel_size: 0x2cbf00
phys_offset: 0
get_crash_notes_per_cpu: crash_notes addr = 2e9db088, size = 180
Elf header: p_type = 4, p_offset = 0x2e9db088 p_paddr = 0x2e9db088 p_vaddr = 0x0 p_filesz = 0xb4 p_memsz = 0xb4
get_crash_notes_per_cpu: crash_notes addr = 2e9e3088, size = 180
Elf header: p_type = 4, p_offset = 0x2e9e3088 p_paddr = 0x2e9e3088 p_vaddr = 0x0 p_filesz = 0xb4 p_memsz = 0xb4
vmcoreinfo header: p_type = 4, p_offset = 0x5ac8d8 p_paddr = 0x5ac8d8 p_vaddr = 0x0 p_filesz = 0x1024 p_memsz = 0x1024
Elf header: p_type = 1, p_offset = 0x0 p_paddr = 0x0 p_vaddr = 0xc0000000 p_filesz = 0x0 p_memsz = 0x0
Elf header: p_type = 1, p_offset = 0x8000000 p_paddr = 0x8000000 p_vaddr = 0xc8000000 p_filesz = 0x28000000 p_memsz = 0x28000000
elfcorehdr: 0x7f00000
crashkernel: [0 - 0x7ffffff] (128M)
memory range: [0 - 0xffffffffffffffff] (0M)
memory range: [0x8000000 - 0x2fffffff] (640M)
kernel command line: " elfcorehdr=0x7f00000 mem=130048K"
Modified cmdline: elfcorehdr=0x7f00000 mem=130048K root=/dev/mmcblk0p2
unrecoverable error: not enough data for mem property


How did you resolve your issue?
I think it is similar to mine.

Please let me know if you got the resolution.

Thanks,
Samiksha
 
Old 11-15-2017, 08:04 AM   #3
Eli13
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Do you have answer regarding this question?

Hi
I tried to operate kdump on ubunto with success.
kdump-config show return ready for kdump.

but in arm imx6 i get the
unrecoverable error: not enough data for mem property

Note that i did managed to run kexec -e for a loaded kernel with kexec -l vmlinux --cmdline...
kdump-config load failed with that error.

Did someone find why?
Thanks!
Eli
 
Old 11-15-2017, 09:40 AM   #4
samiksha.ambekar
LQ Newbie
 
Registered: Sep 2017
Posts: 2

Rep: Reputation: Disabled
Hi Eli,
I checked the kexec-tools code and it was
failing to create flattened devicetree. I gave my own device tree as argument in /etc/default/kdump-tools.config and passed
--dtb argument. It worked for me after these changes. I am successfully able to get the kdump now on ARM.

Regards,
Samiksha
 
1 members found this post helpful.
Old 11-16-2017, 01:23 PM   #5
Eli13
LQ Newbie
 
Registered: Nov 2017
Posts: 2

Rep: Reputation: Disabled
Kexec mem property problem

Hi Samiksha

from the source of kexec , the problem is here:
if (len < sizeof(buf))
{
printf("len = %d\n" , len);
printf("size of buf = %d\n" , sizeof(buf));
die("unrecoverable error: not enough data for mem property\n");
}

And why it happened?
because the device tree file /proc/device-tree/memory/reg is actually 8 bytes and not 16 bytes
the size of buf is 2 x 64 bit = 16 bytes
so why the device-tree/memory/reg in the imx arm linux is just 8 bytes ( 4 for offset and 4 for size) and not 8 for offset
and 8 for size.

any case , i compiled the sources , modified the code to load the correct address
i got kdump ready for dump
but it is not recording the memory when i trigger sysrq panic.

I guess a kexec for arm , that read the /proc/device-tree/memory/reg device tree should exists somewhere.

Any help will be great!
Thanks,
Eli
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ code not getting compiled for ARM platform nightrapper Programming 12 12-27-2013 11:19 AM
ARM Processor with Linux platform Marvin_G Linux - Hardware 9 12-29-2012 10:30 AM
g++ toolchain for ARM platform yuchankit Slackware 3 10-07-2012 12:33 AM
Compiling/porting linux for arm on a platform santinelli.paolo Linux - Embedded & Single-board computer 2 01-30-2011 10:38 AM
Trouble with gcc compiler on arm platform meda75 Linux - Newbie 6 03-14-2009 11:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 04:07 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration