From which point onwards the kernel execution starts
Andrzej Kardas
andrzej-kardas at o2.pl
Sat Mar 5 05:41:29 EST 2011
On Sat, Mar 5, 2011 at 12:42, AQ Tast <tasteaq at gmail.com> wrote:
>> Could someone please explain how the kernel initializes, i.e. I
>> want to know how does kernel starts from main function
> http://www.ibm.com/developerworks/linux/library/l-linuxboot/
>
It's quite good article at start, but it is a bit old and doesn't cover
the newest kernel. If you want to get the details i suggest read great
post on Gustawo Duarte blog:
http://duartes.org/gustavo/blog/post/kernel-boot-process
Very useful is Makefile
http://lxr.linux.no/#linux+v2.6.37.2/Makefile
you can trace kernel building process step by step and see what files
are linking into kernel in which order.
On the other hand, you have always up to date documentation of Kernel
Boot Process in documentation directory in kernel sources:
http://lxr.linux.no/#linux+v2.6.37.2/Documentation/x86/boot.txt
If you want to trace linux boot process in source code, you probably
want to start at line:
_start:
# Explicitly enter this as bytes, or the assembler
# tries to generate a 3-byte jump here, which causes
# everything else to push off to the wrong offset.
.byte 0xeb # short (2-byte) jump
.byte start_of_setup-1f
in arch/x86/boot/header.S
(http://lxr.linux.no/#linux+v2.6.37.2/arch/x86/boot/header.S#L108_) for
x86 architecture.
Have fun in exploring :)
--
regards,
Andrzej Kardas
More information about the Kernelnewbies
mailing list