LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 07-08-2012, 04:20 AM   #1
manoj7410
Member
 
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40

Rep: Reputation: Disabled
Question Study about Kernel bootup..


hi..
I want to know the complete boot process of linux kernel after the step of bringing the kernel image into the RAM.
.
.
I mean, I have studied about first stage/middilestage and second stage boot loaders... but what happens inside the RAM with kernel image.. who starts the kernel??
I came to know that init/main.c is the source for it..
.
.
Can I get some links to study about it... ??

Thanks

Maddy
 
Old 07-08-2012, 05:45 AM   #2
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
Google is your friend:
http://www.google.com/search?q=linux...ient=firefox-a

short answer: kernel is loaded into RAM and de-compressed, then the boot loader transfers control to the kernel. The kernel then calls "init"
 
Old 07-08-2012, 06:43 AM   #3
manoj7410
Member
 
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40

Original Poster
Rep: Reputation: Disabled
Lightbulb

Quote:
Originally Posted by pixellany View Post
Google is your friend:
http://www.google.com/search?q=linux...ient=firefox-a

short answer: kernel is loaded into RAM and de-compressed, then the boot loader transfers control to the kernel. The kernel then calls "init"
Thanks but I already know that... I want to know how exactly init started..??
 
Old 07-08-2012, 06:46 AM   #4
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
???
the kernel issues the "init" command, and the init program starts running. It uses /etc/inittab to set specific configurations.

Or maybe I don't understand your question.......
 
Old 07-08-2012, 06:53 AM   #5
manoj7410
Member
 
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by pixellany View Post
???
the kernel issues the "init" command, and the init program starts running. It uses /etc/inittab to set specific configurations.

Or maybe I don't understand your question.......
My question is:
my second stage boot loadar fetches the kernel and put it into RAM, Now very first task that happens is start_kernel(). That is available in kernel/init/main.c .... I want to understand the working of the start_kernel()... I think it will be clear to you now..
.
 
Old 07-08-2012, 07:02 AM   #6
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
OK---it seems that you are reading the source code. (You have more patience than I do....)

I will GUESS that the function "start_kernel()" will either call "init"--or it will call some other function which in turn calls init.

Have you read any of the links that Google found? If the answer is not there, then your options include:
---read the source code
---buy a book on the kernel---eg this one: http://www.google.com/url?sa=t&rct=j...PTDaEA&cad=rja
 
Old 07-08-2012, 07:12 AM   #7
manoj7410
Member
 
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40

Original Poster
Rep: Reputation: Disabled
Unhappy

Quote:
Originally Posted by pixellany View Post
OK---it seems that you are reading the source code. (You have more patience than I do....)

I will GUESS that the function "start_kernel()" will either call "init"--or it will call some other function which in turn calls init.

Have you read any of the links that Google found? If the answer is not there, then your options include:
---read the source code
---buy a book on the kernel---eg this one: http://www.google.com/url?sa=t&rct=j...PTDaEA&cad=rja
thanks..
you are right about involking init through start_kernel().. but starting init is the last step of start_kernel().. What happens before that..??
No one is helping me...
.
.
Even books are not defining it. every place is providing the code of internal functions but not the theortical functionality of those functions. well,
thanks again.
 
Old 07-08-2012, 10:44 AM   #8
pixellany
LQ Veteran
 
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809

Rep: Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743Reputation: 743
If it's not in the books, then you may just have to hunker down and read the code. Without really knowing anything about the kernel, I'll guess that the early stages are all about detecting hardware, setting up drivers, and initializing data structures in RAM. I would be surprised if a good book on the kernel did not give some flow charts to show what is happening.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Study on the configuration of the Linux kernel ahubaux General 8 08-22-2011 08:38 PM
How can i study linux kernel? huhaizhi Linux - Kernel 9 05-28-2008 05:37 AM
Kernel Panics During Bootup kcanaday Linux - General 3 01-22-2007 06:10 PM
Bootup kernel vs. installed kernel person132 Slackware - Installation 10 10-07-2006 06:42 PM
update to new kernel ,bootup still boot old kernel? kalmen Linux - General 3 06-21-2003 06:55 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 01:15 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration