* From which point onwards the kernel execution starts
@ 2011-03-05 5:42 AQ Tast
2011-03-05 8:26 ` Mulyadi Santosa
0 siblings, 1 reply; 7+ messages in thread
From: AQ Tast @ 2011-03-05 5:42 UTC (permalink / raw)
To: kernelnewbies
Hello Everyone,
I am studying bootloaders and wanted to know which function exactly the
kernel starts from , i.e. where is the main function?
I been through the init/main.c file and I think most likely this is the
file. Could someone please explain how the kernel initializes, i.e. I
want to know how does kernel starts from main function
^ permalink raw reply [flat|nested] 7+ messages in thread
* From which point onwards the kernel execution starts
2011-03-05 5:42 From which point onwards the kernel execution starts AQ Tast
@ 2011-03-05 8:26 ` Mulyadi Santosa
2011-03-05 10:41 ` Andrzej Kardas
0 siblings, 1 reply; 7+ messages in thread
From: Mulyadi Santosa @ 2011-03-05 8:26 UTC (permalink / raw)
To: kernelnewbies
On Sat, Mar 5, 2011 at 12:42, AQ Tast <tasteaq@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/
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* From which point onwards the kernel execution starts
2011-03-05 8:26 ` Mulyadi Santosa
@ 2011-03-05 10:41 ` Andrzej Kardas
2011-03-06 8:01 ` Mulyadi Santosa
0 siblings, 1 reply; 7+ messages in thread
From: Andrzej Kardas @ 2011-03-05 10:41 UTC (permalink / raw)
To: kernelnewbies
On Sat, Mar 5, 2011 at 12:42, AQ Tast <tasteaq@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
^ permalink raw reply [flat|nested] 7+ messages in thread* From which point onwards the kernel execution starts
2011-03-05 10:41 ` Andrzej Kardas
@ 2011-03-06 8:01 ` Mulyadi Santosa
2011-03-06 10:26 ` Andrzej Kardas
0 siblings, 1 reply; 7+ messages in thread
From: Mulyadi Santosa @ 2011-03-06 8:01 UTC (permalink / raw)
To: kernelnewbies
Hi :)
On Sat, Mar 5, 2011 at 17:41, Andrzej Kardas <andrzej-kardas@o2.pl> wrote:
> 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
Wow!!!! great blog post there... a must read for me and possibly the
rest of all newbies here....
Oh and I forgot my usual tips in such case: use qemu...attach gdb to
qemu's gdb stub.... use -s and -S options...it will stop the guest
invocation right from the initial startup. Assuming you compile guest
kernel with frame pointer and sufficient debug symbols, it would be
easy for you to explore the kernel code :)
--
regards,
Mulyadi Santosa
Freelance Linux trainer and consultant
blog: the-hydra.blogspot.com
training: mulyaditraining.blogspot.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2011-03-08 8:13 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-05 5:42 From which point onwards the kernel execution starts AQ Tast
2011-03-05 8:26 ` Mulyadi Santosa
2011-03-05 10:41 ` Andrzej Kardas
2011-03-06 8:01 ` Mulyadi Santosa
2011-03-06 10:26 ` Andrzej Kardas
2011-03-07 16:18 ` Mulyadi Santosa
2011-03-08 8:13 ` Ashwath
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).