All of lore.kernel.org
 help / color / mirror / Atom feed
* kexec and arm64 advice
@ 2016-10-24 14:42 Simon T
  2016-10-24 22:53 ` Goel, Sameer
  2016-10-25 16:57 ` Geoff Levand
  0 siblings, 2 replies; 5+ messages in thread
From: Simon T @ 2016-10-24 14:42 UTC (permalink / raw)
  To: kexec

Hi,

I'm trying to get kexec working on a cross-compiled arm64/aarch64
system, using Linux kernel 4.4.23. I'm using kexec-tool's master
branch (commit e345e27417db00a9e754ca0ca14b2ec87d0552f7 from
https://git.kernel.org/cgit/linux/kernel/git/geoff/kexec-tools.git). I
initially tried using the patches for linux-kexec's kexec-13 branch
with manual massaging in some spots because kexec-13 is for 4.4.0 not
4.4.23. Both tools and kernel appear to build fine, however when it
comes time to kexec, I encounter this message: "kexec_load failed:
Function not implemented"

Searching through the patches, I don't find any reference to kexec_load itself.

Should I be applying a different version of kexec-tools, or
linux-kexec patches, to my build? (I'm restricted to 4.4.23 as the
base kernel)

Is there a way post compile to check if the kexec_load function is
implemented, aside from actually deploying the image and calling
kexec? I've run strings against the Image but it doesn't give an exact
match for kexec_load (see below).

Anything else I should be looking at?

# kexec -l /mnt/target/boot/vmlinux --initrd=/tmp/root.sfs
Modified cmdline:root=/dev/mmcblk0p2
Unable to find /proc/device-tree/chosen/[linux,]stdout-path, printing
from purgatory is disabled
kexec_load failed: Function not implemented
entry       = 0x8095f000 flags = 0xb70000
nr_segments = 4
segment[0].buf   = 0x7fa0f64010
segment[0].bufsz = 0x7fbc00
segment[0].mem   = 0x80080000
segment[0].memsz = 0x8d0000
segment[1].buf   = 0x20cc0830
segment[1].bufsz = 0xe515
segment[1].mem   = 0x80950000
segment[1].memsz = 0xf000
segment[2].buf   = 0x20ccf840
segment[2].bufsz = 0x6080
segment[2].mem   = 0x8095f000
segment[2].memsz = 0x7000
segment[3].buf   = 0x7f9e843010
segment[3].bufsz = 0x2720000
segment[3].mem   = 0xc0000000
segment[3].memsz = 0x2720000

(I've also tried kexec -l with boot/Image instead of boot/vmlinux)

$ grep -i kexec .config
CONFIG_KERNEL_KEXEC=y
CONFIG_PACKAGE_kexec-tools=y
CONFIG_KEXEC_TOOLS_TARGET_NAME="aarch64"
# CONFIG_KEXEC_TOOLS_kdump is not set
CONFIG_KEXEC_ZLIB=y
# CONFIG_KEXEC_LZMA is not set

$ strings <build_dir>/arch/arm64/boot/Image  | grep kexec_load
Wcompat_sys_kexec_load
Wsys_kexec_load

Thanks!

Simon

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kexec and arm64 advice
  2016-10-24 14:42 kexec and arm64 advice Simon T
@ 2016-10-24 22:53 ` Goel, Sameer
  2016-10-25 11:59   ` Simon T
  2016-10-25 16:57 ` Geoff Levand
  1 sibling, 1 reply; 5+ messages in thread
From: Goel, Sameer @ 2016-10-24 22:53 UTC (permalink / raw)
  To: Simon T, kexec

It seems that the kexec_load syscall is not defined. Can you please 
check the configs of your running kernel once again?

Thanks,
Sameer

On 10/24/2016 8:42 AM, Simon T wrote:
> Hi,
>
> I'm trying to get kexec working on a cross-compiled arm64/aarch64
> system, using Linux kernel 4.4.23. I'm using kexec-tool's master
> branch (commit e345e27417db00a9e754ca0ca14b2ec87d0552f7 from
> https://git.kernel.org/cgit/linux/kernel/git/geoff/kexec-tools.git). I
> initially tried using the patches for linux-kexec's kexec-13 branch
> with manual massaging in some spots because kexec-13 is for 4.4.0 not
> 4.4.23. Both tools and kernel appear to build fine, however when it
> comes time to kexec, I encounter this message: "kexec_load failed:
> Function not implemented"
>
> Searching through the patches, I don't find any reference to kexec_load itself.
>
> Should I be applying a different version of kexec-tools, or
> linux-kexec patches, to my build? (I'm restricted to 4.4.23 as the
> base kernel)
>
> Is there a way post compile to check if the kexec_load function is
> implemented, aside from actually deploying the image and calling
> kexec? I've run strings against the Image but it doesn't give an exact
> match for kexec_load (see below).
>
> Anything else I should be looking at?
>
> # kexec -l /mnt/target/boot/vmlinux --initrd=/tmp/root.sfs
> Modified cmdline:root=/dev/mmcblk0p2
> Unable to find /proc/device-tree/chosen/[linux,]stdout-path, printing
> from purgatory is disabled
> kexec_load failed: Function not implemented
> entry       = 0x8095f000 flags = 0xb70000
> nr_segments = 4
> segment[0].buf   = 0x7fa0f64010
> segment[0].bufsz = 0x7fbc00
> segment[0].mem   = 0x80080000
> segment[0].memsz = 0x8d0000
> segment[1].buf   = 0x20cc0830
> segment[1].bufsz = 0xe515
> segment[1].mem   = 0x80950000
> segment[1].memsz = 0xf000
> segment[2].buf   = 0x20ccf840
> segment[2].bufsz = 0x6080
> segment[2].mem   = 0x8095f000
> segment[2].memsz = 0x7000
> segment[3].buf   = 0x7f9e843010
> segment[3].bufsz = 0x2720000
> segment[3].mem   = 0xc0000000
> segment[3].memsz = 0x2720000
>
> (I've also tried kexec -l with boot/Image instead of boot/vmlinux)
>
> $ grep -i kexec .config
> CONFIG_KERNEL_KEXEC=y
> CONFIG_PACKAGE_kexec-tools=y
> CONFIG_KEXEC_TOOLS_TARGET_NAME="aarch64"
> # CONFIG_KEXEC_TOOLS_kdump is not set
> CONFIG_KEXEC_ZLIB=y
> # CONFIG_KEXEC_LZMA is not set
>
> $ strings <build_dir>/arch/arm64/boot/Image  | grep kexec_load
> Wcompat_sys_kexec_load
> Wsys_kexec_load
>
> Thanks!
>
> Simon
>
> _______________________________________________
> kexec mailing list
> kexec@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/kexec
>

-- 
Qualcomm Innovation Center, Inc.
The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
a Linux Foundation Collaborative Project.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kexec and arm64 advice
  2016-10-24 22:53 ` Goel, Sameer
@ 2016-10-25 11:59   ` Simon T
  0 siblings, 0 replies; 5+ messages in thread
From: Simon T @ 2016-10-25 11:59 UTC (permalink / raw)
  To: Goel, Sameer; +Cc: kexec

Hi Sameer,

The running kernel and the kernel I am trying to kexec into are the
same -- for testing purposes I'm just trying to kexec into a second
copy of the same kernel I'm running. The .config file has kexec
defined:

$ grep -i kexec .config
CONFIG_KERNEL_KEXEC=y
CONFIG_PACKAGE_kexec-tools=y
CONFIG_KEXEC_TOOLS_TARGET_NAME="aarch64"
# CONFIG_KEXEC_TOOLS_kdump is not set
CONFIG_KEXEC_ZLIB=y
# CONFIG_KEXEC_LZMA is not set

Is there another way to verify if the kernel actually built with the
kexec_load syscall or not?

Thanks,

Simon

On Mon, Oct 24, 2016 at 11:53 PM, Goel, Sameer <sgoel@codeaurora.org> wrote:
> It seems that the kexec_load syscall is not defined. Can you please check
> the configs of your running kernel once again?
>
> Thanks,
> Sameer
>
>
> On 10/24/2016 8:42 AM, Simon T wrote:
>>
>> Hi,
>>
>> I'm trying to get kexec working on a cross-compiled arm64/aarch64
>> system, using Linux kernel 4.4.23. I'm using kexec-tool's master
>> branch (commit e345e27417db00a9e754ca0ca14b2ec87d0552f7 from
>> https://git.kernel.org/cgit/linux/kernel/git/geoff/kexec-tools.git). I
>> initially tried using the patches for linux-kexec's kexec-13 branch
>> with manual massaging in some spots because kexec-13 is for 4.4.0 not
>> 4.4.23. Both tools and kernel appear to build fine, however when it
>> comes time to kexec, I encounter this message: "kexec_load failed:
>> Function not implemented"
>>
>> Searching through the patches, I don't find any reference to kexec_load
>> itself.
>>
>> Should I be applying a different version of kexec-tools, or
>> linux-kexec patches, to my build? (I'm restricted to 4.4.23 as the
>> base kernel)
>>
>> Is there a way post compile to check if the kexec_load function is
>> implemented, aside from actually deploying the image and calling
>> kexec? I've run strings against the Image but it doesn't give an exact
>> match for kexec_load (see below).
>>
>> Anything else I should be looking at?
>>
>> # kexec -l /mnt/target/boot/vmlinux --initrd=/tmp/root.sfs
>> Modified cmdline:root=/dev/mmcblk0p2
>> Unable to find /proc/device-tree/chosen/[linux,]stdout-path, printing
>> from purgatory is disabled
>> kexec_load failed: Function not implemented
>> entry       = 0x8095f000 flags = 0xb70000
>> nr_segments = 4
>> segment[0].buf   = 0x7fa0f64010
>> segment[0].bufsz = 0x7fbc00
>> segment[0].mem   = 0x80080000
>> segment[0].memsz = 0x8d0000
>> segment[1].buf   = 0x20cc0830
>> segment[1].bufsz = 0xe515
>> segment[1].mem   = 0x80950000
>> segment[1].memsz = 0xf000
>> segment[2].buf   = 0x20ccf840
>> segment[2].bufsz = 0x6080
>> segment[2].mem   = 0x8095f000
>> segment[2].memsz = 0x7000
>> segment[3].buf   = 0x7f9e843010
>> segment[3].bufsz = 0x2720000
>> segment[3].mem   = 0xc0000000
>> segment[3].memsz = 0x2720000
>>
>> (I've also tried kexec -l with boot/Image instead of boot/vmlinux)
>>
>> $ grep -i kexec .config
>> CONFIG_KERNEL_KEXEC=y
>> CONFIG_PACKAGE_kexec-tools=y
>> CONFIG_KEXEC_TOOLS_TARGET_NAME="aarch64"
>> # CONFIG_KEXEC_TOOLS_kdump is not set
>> CONFIG_KEXEC_ZLIB=y
>> # CONFIG_KEXEC_LZMA is not set
>>
>> $ strings <build_dir>/arch/arm64/boot/Image  | grep kexec_load
>> Wcompat_sys_kexec_load
>> Wsys_kexec_load
>>
>> Thanks!
>>
>> Simon
>>
>> _______________________________________________
>> kexec mailing list
>> kexec@lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/kexec
>>
>
> --
> Qualcomm Innovation Center, Inc.
> The Qualcomm Innovation Center, Inc. is a member of the Code Aurora Forum,
> a Linux Foundation Collaborative Project.

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kexec and arm64 advice
  2016-10-24 14:42 kexec and arm64 advice Simon T
  2016-10-24 22:53 ` Goel, Sameer
@ 2016-10-25 16:57 ` Geoff Levand
  2016-10-26 13:52   ` Simon T
  1 sibling, 1 reply; 5+ messages in thread
From: Geoff Levand @ 2016-10-25 16:57 UTC (permalink / raw)
  To: Simon T, kexec

On 10/24/2016 07:42 AM, Simon T wrote:
> Both tools and kernel appear to build fine, however when it
> comes time to kexec, I encounter this message: "kexec_load failed:
> Function not implemented"

It seems your kernel needs kexec support. Try something like:

  cat /proc/config.gz | gunzip | egrep 'KEXEC'

-Geoff

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: kexec and arm64 advice
  2016-10-25 16:57 ` Geoff Levand
@ 2016-10-26 13:52   ` Simon T
  0 siblings, 0 replies; 5+ messages in thread
From: Simon T @ 2016-10-26 13:52 UTC (permalink / raw)
  To: Geoff Levand; +Cc: kexec

On Tue, Oct 25, 2016 at 5:57 PM, Geoff Levand <geoff@infradead.org> wrote:
> On 10/24/2016 07:42 AM, Simon T wrote:
>> Both tools and kernel appear to build fine, however when it
>> comes time to kexec, I encounter this message: "kexec_load failed:
>> Function not implemented"
>
> It seems your kernel needs kexec support. Try something like:
>
>   cat /proc/config.gz | gunzip | egrep 'KEXEC'

Aha, yes you are correct it is not compiled in, even though it was in
my .config. I will investigate my config files and build scripts
further,

Thanks,

Simon

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

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2016-10-26 13:53 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-24 14:42 kexec and arm64 advice Simon T
2016-10-24 22:53 ` Goel, Sameer
2016-10-25 11:59   ` Simon T
2016-10-25 16:57 ` Geoff Levand
2016-10-26 13:52   ` Simon T

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.