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 |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
07-08-2012, 04:20 AM
|
#1
|
Member
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40
Rep: 
|
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
|
|
|
07-08-2012, 05:45 AM
|
#2
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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"
|
|
|
07-08-2012, 06:43 AM
|
#3
|
Member
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40
Original Poster
Rep: 
|
Quote:
Originally Posted by pixellany
|
Thanks but I already know that... I want to know how exactly init started..??
|
|
|
07-08-2012, 06:46 AM
|
#4
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
???
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.......
|
|
|
07-08-2012, 06:53 AM
|
#5
|
Member
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40
Original Poster
Rep: 
|
Quote:
Originally Posted by pixellany
???
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..
.
|
|
|
07-08-2012, 07:02 AM
|
#6
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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
|
|
|
07-08-2012, 07:12 AM
|
#7
|
Member
Registered: Jun 2012
Location: India
Distribution: 2.6.x
Posts: 40
Original Poster
Rep: 
|
Quote:
Originally Posted by pixellany
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.
|
|
|
07-08-2012, 10:44 AM
|
#8
|
LQ Veteran
Registered: Nov 2005
Location: Annapolis, MD
Distribution: Mint
Posts: 17,809
|
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.
|
|
|
All times are GMT -5. The time now is 01:15 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|