issue with kexec/kdump on imx6ull
Arthur LAMBERT
lambertarthur22 at gmail.com
Wed May 16 03:31:20 PDT 2018
Le Monday 09 Apr 2018 à 15:31:23 (+0100), Russell King - ARM Linux a écrit :
>
> > kernel command line: "console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw earlyprintk maxcpus=1 reset_devices elfcorehdr=0x9b100000 mem=50176K"
>
> This is the command line which the target kernel should boot with, but...
>
> > [ 0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw crashkernel=50M
>
> it appears that it hasn't, so something is still wrong. Without the
> right command line, you won't get the vmcore.
Sorry for my very late answer Russell.
We can see that kexec is able to build the correct command line but instead of booting with this kernel
command line. Kexec boot the target kernel with default kernel command line.
I am currently forcing kernel command line on my target kernel :
CONFIG_CMDLINE="console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw earlyprintk crashkernel=50M"
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
# CONFIG_CMDLINE_EXTEND is not set
CONFIG_CMDLINE_FORCE=y
By just using extend bootlader command line, it seems to be better :
CONFIG_CMDLINE="bazinga"
# CONFIG_CMDLINE_FROM_BOOTLOADER is not set
CONFIG_CMDLINE_EXTEND=y
# CONFIG_CMDLINE_FORCE is not set
New result :
[ 117.998829] Loading crashdump kernel...
[ 118.002830] Bye!
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.16.0-rc7KEXEC (arthur at arthur-bzh) (gcc version 5.4.0 (Buildroot 2017.05-git-38202-gb94bcd1-dirty)) #9 SMP Tue May 15 15:50:55 CEST 2018
[ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
[ 0.000000] CPU: div instructions available: patching division code
[ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.000000] OF: fdt: Machine model: Freescale i.MX6 UlltraLite 14x14 EVK Board
[ 0.000000] OF: fdt: Ignoring memory range 0x80000000 - 0x98000000
[ 0.000000] Memory policy: Data cache writealloc
[ 0.000000] cma: Failed to reserve 64 MiB
[ 0.000000] random: fast init done
[ 0.000000] percpu: Embedded 16 pages/cpu @(ptrval) s36136 r8192 d21208 u65536
[ 0.000000] Built 1 zonelists, mobility grouping off. Total pages: 12446
[ 0.000000] Kernel command line: console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw earlyprintk elfcorehdr=0x9b100000 mem=50176K bazinga
(...)
# cat /proc/cmdline
console=ttymxc0,115200 root=/dev/mmcblk1p2 rootwait rw earlyprintk elfcorehdr=0x9b100000 mem=50176K bazinga
# ls -l /proc/vmcore
-r-------- 1 root root 484450304 Jan 1 00:07 /proc/vmcore
Now I just need to compare behavior between kernel mainline and nxp bsp to understand and fix the kernel freeze
issue with the bsp. At least now I have a working setup. I will try to find some time to work on that
next week.
Do you have a reliable method to analyze vmcore from ARM architecture ?
On your first message you wrote :
>> There's also a ti-keystone2 branch which contains an additional
>> (hacky and untested) patch which allows reading the coredump
>> generated by kexec on a crash.
Thanks for your help !
More information about the linux-arm-kernel
mailing list