Boot kernel with kexec on socfpga

I use MitySOM-5CSX dev kit (cyclone v)and i would like to boot to a different kernel using kexec.

In my configuration:

KERNEL : https://github.com/altera-opensource/linux-socfpga/archive/socfpga-4.9.76-ltsi-rt.zip 
COMPILER : https://releases.linaro.org/archive/14.04/components/toolchain/binaries/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux.tar.bz2

In the kernel configuration kexec is enabled 
zcat /proc/config.gz |grep KEXEC
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC=y

and the default kernel cmdline is

# cat /proc/cmdline 
root=/dev/mmcblk0p3 rootwait rw earlycon

First the kernel is loaded

# kexec -d -l zImagebkx --dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb --command-line="root=/dev/mmcblk0p3 rw rootwait earlycon" 
kernel: 0xb69a8008 kernel_size: 0x4a55c8
MEMORY RANGES
0000000000000000-000000003fffffff (0)
zImage header: 0x016f2818 0x00000000 0x004a55c8
zImage size 0x4a55c8, file size 0x4a55c8
kexec_load: entry = 0x8000 flags = 0x280000
nr_segments = 2
segment[0].buf   = 0xb69a8008
segment[0].bufsz = 0x4a55c8
segment[0].mem   = 0x8000
segment[0].memsz = 0x4a6000
segment[1].buf   = 0x48fb0
segment[1].bufsz = 0x7cf4
segment[1].mem   = 0x1744000
segment[1].memsz = 0x8000

and then try to start a new kernel

# kexec -d -e 
[ 1047.666926] kexec_core: Starting new kernel
[ 1047.671121] Disabling non-boot CPUs ...
[ 1047.728309] CPU1: shutdown
[ 1047.731981] Bye!

And then nothing. Finally after a while the board reboots automatically to U-boot

the kexec version used is

# kexec --version 
kexec-tools 2.0.14

The above kernel boots normally with uboot and i can see output in ttyS0.

Does anyone have a successful experience with booting a socfpga kernel with kexec ?

It has been done successfully. In case you hadn’t seen this link yet, and in case it helps:
https://patchwork.kernel.org/patch/6504321/

I have seen this link and you are right it means that kexec is working in cyclone5 socfpga but i still do not have any results .

I have also used the latest kexec tool 2.0.19 with no luck .


#./kexec --version 
kexec-tools 2.0.19

#./kexec -d  -c -l zImagebkx --dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb --command-line="console=ttyS0,115200 root=/dev/mmcblk0p3 rw rootwait"
syscall kexec_file_load not available.
kernel: 0xb6ab1008 kernel_size: 0x4a55c8
MEMORY RANGES
0000000000000000-000000003fffffff (0)
zImage header: 0x016f2818 0x00000000 0x004a55c8
zImage size 0x4a55c8, file size 0x4a55c8
zImage requires 0x004b65c8 bytes
Kernel: address=0x00008000 size=0x0178fce8
DT    : address=0x01799000 size=0x00007d00
kexec_load: entry = 0x8000 flags = 0x280000
nr_segments = 2
segment[0].buf   = 0xb6ab1008
segment[0].bufsz = 0x4a55cc
segment[0].mem   = 0x8000
segment[0].memsz = 0x4a6000
segment[1].buf   = 0x8e630
segment[1].bufsz = 0x7d00
segment[1].mem   = 0x1799000
segment[1].memsz = 0x8000

and then try to start the new new kernel but

# kexec -d -e 
[  127.922829] kexec_core: Starting new kernel
[  127.927024] Disabling non-boot CPUs ...
[  127.976277] CPU1: shutdown
[  127.979899] Bye!

and then nothing no messages on console.