Thread (3 messages) flat view 3 messages, 2 authors, 2025-10-18

Re: [PPC] t1024rdb: CONFIG_KERNEL_START=0x0 equivalent for ppc64 (Kernel 3.16.85)

From: Alex Fetzner <hidden>
Date: 2025-10-18 19:58:43

Thanks Christophe
quoted
How do I appropriately alter a ppc64 kernel to have entry point 0x0?
After working with the issue further, I determined my original question was 
ill-formed because I had an incomplete understanding. 
Even with the CONFIG_KERNEL_START you can't expect any kernel to have a
virtual start address of 0, because the KERNEL needs to be above user space.

But you shouldn't need that. It is the role of the loader to set the MMU
so that the kernel is running with the correct virtual address.

I don't understand why you need the virtual starting address of vmlinux
to be 0x0.
Indeed, it doesn't make sense for kernel start address 0x0.
As I am trying to make a stand-in for another kernel image without changing
the U-Boot load address, I saw that the original vmlinux ELF header had
Entry point address: 0x0 
But critically, as I now understand, it also had 
Type: DYN , not EXEC

What I determined is that I needed CONFIG_RELOCATABLE=y; I did not need to
alter the load address. After making a relocatable kernel, I was able to get 
it to boot on my hardware.
Here is what I get with ppc64e_defconfig with v6.18-rc1:
Thank you for taking the time to find this for me.

Kind regards,
Alex
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help