changing kernel load address on rpi4
Posted: Sat Oct 30, 2021 3:46 am
I am trying to learn systems programming. I have create a simple kernel, which prints Hello World to the UART on a Raspberry pi 4 model B. Source code can be found here. It works perfectly when kernel load address is 0x80000(which is the default load address). I would like to change the load address of the kernel and it should still be functional.
Here's the source code.
https://github.com/SikkiLadho/Leo
I tried to change the kernel_address=[any_address_other_than_defaul](for example kernel_address=0x7F78E), and I cannot see the Hello World printed on the UART. I tried reflecting this change of load_address in the linker script, but it still would not print Hello World.
My kernel only prints Hello World, when it is loaded to 0x80000. How can I successfully load it at the different address?
Here's the source code.
https://github.com/SikkiLadho/Leo
I tried to change the kernel_address=[any_address_other_than_defaul](for example kernel_address=0x7F78E), and I cannot see the Hello World printed on the UART. I tried reflecting this change of load_address in the linker script, but it still would not print Hello World.
Code: Select all
SECTIONS
{
. = 0x7F78E;
.text.boot : { *(.text.boot) }
.text : { *(.text) }
.rodata : { *(.rodata) }
.data : { *(.data) }
. = ALIGN(0x8);
bss_begin = .;
.bss : { *(.bss*) }
bss_end = .;
}