Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What is the difference between the kernel loadaddress and entry point?

I am making my own Linux distribution. The development is going along nicely however i find it hard to understand the difference between the kernel load address and the entry point.

In order for the kernel to be loaded by uBoot i would think that the memory address where the kernel is loaded would always be the same as where the entry (start point) of the kernel would be when it is executed (started).

But i am guessing that because these are two separated value that do not always have to be the same there is a reason for them to be separated.

Could anyone please explain the difference between the two to me?

like image 996
Thomas Nobel Avatar asked Apr 04 '17 10:04

Thomas Nobel


People also ask

What is the entry points in kernel?

The start_kernel is the entry of the generic and architecture independent kernel code, although we will return to the arch/ folder many times. If you look inside of the start_kernel function, you will see that this function is very big. For this moment it contains about 86 calls of functions.

Where is entry point of Linux kernel?

The entry point to Linux kernel modules is an init function that is registered with the kernel by calling the module_init() macro. The registered module init function is then called by kernel code through the do_initcalls() function during kernel startup.

What is U-Boot and how does it work?

U-Boot boots an operating system by reading the kernel and any other required data (e.g. device tree and ramdisk image) into memory, and then executing the kernel with the appropriate arguments. U-Boot's commands are actually generalized commands which can be used to read or write any arbitrary data.

How is kernel loaded memory?

The kernel is typically loaded as an image file, compressed into either zImage or bzImage formats with zlib. A routine at the head of it does a minimal amount of hardware setup, decompresses the image fully into high memory, and takes note of any RAM disk if configured.


1 Answers

Load Address is RAM location where the kernel binary image is to be copied. Entry Point is the Location of the copied binary to be executed by uboot to boot kernel.

If RAM is mapped at 80000000 and kernel LOAD ADDRESS is 80008000. bootm command uncompress the uImage from copied image location to 80008000 address and then calls the kernel entry point (may be the same address : 80008000) to execute the kernel.

like image 81
Rajeshkumar Avatar answered Oct 01 '22 21:10

Rajeshkumar