Re: From which point onwards the kernel execution starts

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, Mar 5, 2011 at 12:42, AQ Tast <tasteaq@xxxxxxxxx> 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

_______________________________________________
Kernelnewbies mailing list
Kernelnewbies@xxxxxxxxxxxxxxxxx
http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux