Page 1 of 1
KExec support?
Posted: Sat Dec 28, 2024 3:11 pm
by Hypex
Hello again.
So one day I was looking up something Linux related and stumbled upon a useful little feature: KExec. Or kexec as they would call it.
So, I think it would be useful to have support for feature of kexec. Is it possible or do we have hardware limitation?
The X1000 boot is slow (against the X5000 and all else) so it would be great to reboot into a kernel without waiting for CFE to catch up!
This would be a boon for kernel testing. Install a few in a row. Or install the latest. Then immediately boot it!
Has this kernel feature been tested before on the X1000 or X5000?
Re: KExec support?
Posted: Sun Dec 29, 2024 1:02 pm
by xeno74
Hypex wrote: Sat Dec 28, 2024 3:11 pm
This would be a boon for kernel testing. Install a few in a row. Or install the latest. Then immediately boot it!
Has this kernel feature been tested before on the X1000 or X5000?
No, I haven't tested it yet but it is interesting.
Re: KExec support?
Posted: Fri Jan 03, 2025 8:10 am
by sailorMH
It looks interesting, kexec-tools package exists in ppc64 debian sid. I will try it.
Re: KExec support?
Posted: Fri Jan 03, 2025 2:26 pm
by Hypex
sailorMH wrote: Fri Jan 03, 2025 8:10 am
It looks interesting, kexec-tools package exists in ppc64 debian sid. I will try it.
I wound have tried to install it myself but I didn't see it enabled in the kernel config so didn't think it would work. Not sure if I tried anyway. Should probably install Debian again since it remains popular on ppc.
Re: KExec support?
Posted: Fri Jan 03, 2025 2:31 pm
by xeno74
Hypex wrote: Fri Jan 03, 2025 2:26 pm
I wound have tried to install it myself but I didn't see it enabled in the kernel config so didn't think it would work. Not sure if I tried anyway. Should probably install Debian again since it remains popular on ppc.
I will add the KExec support.
Code: Select all
CONFIG_KEXEC_CORE=y
CONFIG_KEXEC=y
Re: KExec support?
Posted: Fri Jan 03, 2025 4:37 pm
by xeno74
I tested it today. Further information and downloads:
github.com
Re: KExec support?
Posted: Sat Jan 04, 2025 4:07 pm
by Hypex
xeno74 wrote: Fri Jan 03, 2025 4:37 pm
I tested it today. Further information and downloads:
github.com
Wow great! Thanks for your efforts. Hopefully I can test it out soon.

Re: KExec support?
Posted: Fri Mar 14, 2025 2:19 pm
by Hypex
So I tested it myself and can confirm the memory error:
Code: Select all
/proc/device-tree/chosen/linux,kernel-end: No such file or directory
For ppc32 it's in this line which looks optional depending on a crash kernel:
https://github.com/mjg59/kexec-tools/bl ... ppc.c#L425
For ppc64:
https://github.com/mjg59/kexec-tools/bl ... c64.c#L354
What I don't understand is, that kexec is a lowlevel tool, so why is it looking in public DTB variables and not using private kernel API?
It also looks like an old issue we are caught up on:
https://lore.kernel.org/all/alpine.LRH. ... ytel.be/T/
I was looking through some lists and found a comment about 'linux,kernel-end' being removed from kernel start up but now I can't find the reference! So I wonder if there are many ppc64 people using kexec feature? Or pp64el these days? If kexec needs it then why is it removed? Is kexec code obsolete and needs updating to find it elsewhere?
In the meantime, aside from patching it back into the code near by prom_init, a work around could be to set it manually. Such as from CFE using setenv with linux,kernel-end. Just need to know the kernel top from ELF info listed on load. Or, from Linux itself, which is easy to see without a ramdisk.
Re: KExec support?
Posted: Tue Mar 18, 2025 6:31 am
by Hypex
Another thread:
https://linuxppc-dev.ozlabs.narkive.com ... -directory#
These are old issues. I searched here:
https://github.com/torvalds/linux
I got one result for "linux,kernel-end" so it's in there. Why is it missing? What am I missing?
https://github.com/torvalds/linux/blob/ ... ore.c#L165