kexec broken on arm (v7) socfpga in later 4 series kernels ?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I use MitySOM-5CSX dev kit (altera cyclone v socfpga) from Critical Link
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

kexec tools version  is

#./kexec --version
kexec-tools 2.0.19



"uboot kernel" and 'kexec kernel' are the same version
(socfpga-4.9.76-ltsi-rt). The "kexec kernel" has just more modules
enabled compared to the default "uboot kernel"

First  the kernel is loaded  with kexec tools

#./kexec -d  -c -l zImagebkx
--dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb
--command-line="root=/dev/mmcblk0p3 rootwait rw earlycon"
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
# kexec -d -e
[ 127.922829] kexec_core: Starting new kernel
[ 127.927024] Disabling non-boot CPUs ...
[ 127.976277] CPU1: shutdown
[ 127.979899] Bye!

but  then nothing happens and no messages on console.

After enabling “Kernel Hacking” -> "Kernel low-level debugging functions "

the kexec'd zImagebkx kernel gives the following result

kexec -d -e
[  134.110855] kexec_core: Starting new kernel
[  134.115064] Disabling non-boot CPUs ...
[  134.176961] CPU1: shutdown
[  134.180624] Bye!
Uncompressing Linux... done, booting the kernel.


and then nothing . At least the “Uncompressing Linux… done, booting
the kernel.” message means that the kexec'd kernel starts to execute
and reaches at least at line 546 of “/arch/arm/boot/compressed/head.S”
file executing the following instruction:

bl decompress_kernel.


According to this patch https://patchwork.kernel.org/patch/6504321/
kexec is supported on socfpga.

Downloading an older series kernel for socfpga (4.1.22)

from (https://github.com/dlaut/linux-socfpga ,  unfortunatelly older
series kernels are not available from official
https://github.com/altera-opensource/linux-socfpga )

and applying the above patch i was able to kexec boot the
4.9.76-ltsi-rt kernel from the 4.1.22 kernel as shown bellow

root@node1:/mnt/test#uname -a
Linux node1 4.1.22-ltsi-altera #2 SMP PREEMPT Mon Jul 29 12:38:06 EEST
2019 armv7l GNU/

We then kexec load the 4.9.76 kernel

root@node1:/mnt/test#./kexec -d  -c -l zImagebkx
--dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb
--command-line="root=/dev/mmcblk0p3 rootwait rw earlycon"

and then start the kernel (successfully!!) with

root@node1:/mnt/test# kexec -d -e
[   46.306102] kexec: Starting new kernel
[   46.309928] Disabling non-boot CPUs ...
[   46.306102] kexec: Starting new kernel
[   46.378053] CPU1: shutdown
[   46.381875] Bye!
Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.76-rt61-ltsi-altera (aggelis@corei5)
(gcc version 4.8.3 20140401 (prerelease) (crosstool-NG l9
[    0.000000] CPU: ARMv7 Processor [413fc090] revision 0 (ARMv7), cr=10c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing
instruction cache
[    0.000000] OF: fdt:Machine model: MitySOM-5CSX Altera SOCFPGA Cyclone V
[    0.000000] cma: Reserved 16 MiB at 0x3f000000
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] percpu: Embedded 15 pages/cpu @ef6bf000 s29184 r8192
d24064 u61440
[    0.000000] Built 1 zonelists#./kexec -d  -c -l zImagebkx
--dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb
--command-line="root=/dev/mmcblk0p3 rootwait rw earlycon" in Zone
order, mobility grouping on.  Total pages: 260416
[    0.000000] Kernel command line: root=/dev/mmcblk0p3 rootwait
[    0.000000] PID hash table entries: 4096 (order: 2, 16384 bytes)

.....
.....
Angstrom v2017.12 - Kernel 4.9.76-rt61-ltsi-altera

node1 login:


Is there something i am missing or kexec broke in later series 4
kernels for arm (socfpga)?

Aggelis Aggelis

_______________________________________________
kexec mailing list
kexec@xxxxxxxxxxxxxxxxxxx
http://lists.infradead.org/mailman/listinfo/kexec




[Index of Archives]     [LM Sensors]     [Linux Sound]     [ALSA Users]     [ALSA Devel]     [Linux Audio Users]     [Linux Media]     [Kernel]     [Gimp]     [Yosemite News]     [Linux Media]

  Powered by Linux