From: Aggelis Aggelis <aggelis@gmail.com>
To: linux-arm-kernel@lists.infradead.org
Subject: kexec arm support
Date: Mon, 9 Sep 2019 20:58:58 +0300 [thread overview]
Message-ID: <CAKUkA52n+g4=G8r47P4Jt1LpUaPStEkLUNmU6szSCW9sYhW4Mw@mail.gmail.com> (raw)
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 we load kernel with
#./kexec --version
kexec-tools 2.0.19
kexec -d -l zImagebkx --dtb=socfpga_cyclone5_mitysom5csx_devkit.dtb
--command-line="root=/dev/mmcblk0p3 rootwait rw earlycon"
syscall kexec_file_load not available.
kernel: 0xb6a9d008 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=0x00007cf4
kexec_load: entry = 0x8000 flags = 0x280000
nr_segments = 2
segment[0].buf = 0xb6a9d008
segment[0].bufsz = 0x4a55cc
segment[0].mem = 0x8000
segment[0].memsz = 0x4a6000
segment[1].buf = 0x8e610
segment[1].bufsz = 0x7cf4
segment[1].mem = 0x1799000
segment[1].memsz = 0x8000
and kexec kernel with
kexec -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 no messages on console. The same kernel boots
successfully with U-Boot
using kernel 4.1.22 from https://github.com/dlaut/linux-socfpga and
applying the patch described in
https://patchwork.kernel.org/patch/6504321/
i successfully kexeced 4.9.76 kernel from 4.1.22 using the same
kexec-tools 2.0.19.
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/L
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 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)
[ 0.000000] Dentry cache hash table entries: 131072 (order: 8, 1048576 bytes)
[ 0.000000] Inode-cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] allocated 1048576 bytes of page_ext
...
...
Angstrom v2017.12 - Kernel 4.9.76-rt61-ltsi-altera
node1 login:
The kexec patch applied on the 4.1.22 kernel (enabling kexec on
socfpga) is already present in 4.9.76 kernel.
Did something break in kexec implementation in later 4 series kernels?
Aggelis Aggelis
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
next reply other threads:[~2019-09-09 17:59 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-09-09 17:58 Aggelis Aggelis [this message]
2019-09-09 18:10 ` kexec arm support Russell King - ARM Linux admin
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAKUkA52n+g4=G8r47P4Jt1LpUaPStEkLUNmU6szSCW9sYhW4Mw@mail.gmail.com' \
--to=aggelis@gmail.com \
--cc=linux-arm-kernel@lists.infradead.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).