public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Jerry Van Baren <gerald.vanbaren@ge.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Kernel loading and memory layout
Date: Wed, 21 Jan 2009 07:34:10 -0500	[thread overview]
Message-ID: <49771642.1050705@ge.com> (raw)
In-Reply-To: <57472.29819.qm@web39802.mail.mud.yahoo.com>

Vinay Venkataraghavan wrote:
> Greetings,
> 
> I am new to using uboot but have gone through the code to a certain
> degree but still have some questions.
> 
> 1. Where does uboot transfer control to the linux kernel. By this I
> mean which file in the source code would I look for this.
> 
> Would it for example be in :  arch/powerpc/boot and in one of the
> assembly language files?

You could start with the "bootm" command in common/cmd_bootm.c and read 
its logic and comments (just skim the code and comments till you get to 
the end where it does the transfer to the loaded program).

> 2. I went through and did a lot of reading on how grub loads a linux kernel. 
> 
> Is the memory layout of uboot similar to that of grub. If not, how
> and where do I find more information on how does uboot layout the
> memory and where is the real-mode portion of the kernel loaded and
> where is the protected mode portion of the kernel loaded etc.

It is totally different from grub.  Grub is a second++ stage bootloader 
that runs after the PC-BIOS does the first stage initialization and 
loads grub.

U-Boot is generally the first and only bootloader (booting from NAND 
flash requires a very compact, simple first stage bootloader, which 
makes u-boot a second stage bootloader).

U-Boot loads the linux kernel in RAM where ever you tell it to and then 
jumps to the linux kernel entry point.  The linux kernel, on start up, 
relocates itself to where *it* wants to live and then proceeds.

>    Any pointers to the source code would greatly help.
> 
> Any other information to get me started along these lines would be of great help.
> 
> Thank you.
> Vinay

Best regards,
gvb

  parent reply	other threads:[~2009-01-21 12:34 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-21  0:09 [U-Boot] Kernel loading and memory layout Vinay Venkataraghavan
2009-01-21  3:24 ` Roman Mashak
2009-01-21 12:34 ` Jerry Van Baren [this message]
2009-01-21 19:03   ` Wolfgang Denk
2009-01-21 22:12     ` Vinay Venkataraghavan
2009-01-21 23:20       ` Roman Mashak

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=49771642.1050705@ge.com \
    --to=gerald.vanbaren@ge.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox