LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 08-11-2011, 04:45 AM   #1
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Rep: Reputation: 16
on x86 arch, startup_32 is jumped from where?


by searching the code in arch/x86, I found the definition of startup_32
in boot/compressed/head_32.S.

But I couldn't find where it jumps from.
Could some one tell me where ?

and I found there are two startup_32 another in kernel/head_32.S.
where could I found more detail?
 
Old 08-11-2011, 08:10 PM   #2
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
from the bootloader?
 
Old 08-11-2011, 08:28 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,131

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
They both get called.
I found this a great book for this sort of thing.
Couple of years old now, but still o.k. - around the timeframe CFS went into mainline IIRC.

Edit: - just remembered this link too. Well worth a read.

Last edited by syg00; 08-11-2011 at 08:30 PM.
 
1 members found this post helpful.
Old 08-12-2011, 12:17 AM   #4
bsat
Member
 
Registered: Feb 2009
Posts: 347

Rep: Reputation: 72
This article gives the sequence of calls during boot.

http://www.ibm.com/developerworks/li...y/l-linuxboot/
 
Old 08-12-2011, 01:06 AM   #5
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Your links are very helpful.
Let me read them first.
 
Old 08-16-2011, 09:05 AM   #6
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
I read the code in arch/x86/boot/header.S for latest kernel code.

The code in
bootsect_start:
# Normalize the start address
ljmp $BOOTSEG, $start2
while BOOTSET is defined
BOOTSEG = 0x07C0 /* original address of boot-sector */

so header.S is compiled and move to this location?
I think this is the location where MBR will be loaded?

And the start() function mentioned in the article is changed to __start()?
Than who take the responsibility to jump to here?
This is actually 512 bytes after bootsect_start.

Last edited by Richard.Yang; 08-16-2011 at 10:21 AM.
 
Old 08-17-2011, 08:18 PM   #7
Richard.Yang
Member
 
Registered: Sep 2008
Posts: 106

Original Poster
Rep: Reputation: 16
Also, I am wondering whether I could just write the first 512 bytes into a floppy disk.
to make a bootable device.
 
  


Reply



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
LiveCD/USB kits for ARCH x86/x86_64 now ready! linus72 Arch 2 07-30-2010 05:16 PM
[SOLVED] arch - x86 or x86_64? Gerard Lally Linux - Kernel 2 04-29-2010 07:00 PM
Error when compiling kernel at arch/x86/boot/compressed/misc.c ronzo Linux - Kernel 0 03-29-2009 11:04 AM
Cross compiled kernel-2.6.13 for x86-64 arch stops booting under Slackware-10.1 Basel Slackware 4 09-09-2005 12:57 PM
Can't find screen when installing Debian with x86 arch gry-HuhuY5 Linux - Newbie 2 08-11-2005 02:51 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 06:29 AM.

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