Subject: Re: boot NetBSD using u-boot
To: None <port-powerpc@netbsd.org>
From: Sam Pham <anhmn@yahoo.com>
List: port-powerpc
Date: 10/05/2005 14:10:59
Thank you for your tip.  Since I'm a newbie to both
u-boot and NetBSD, could someone point me to some
pointers/documentation/books that explain how to boot
NetBSD in powerpc embedded environment and/or what
NetBSD expects from the bootloader?  In particular,
the handoff process between a bootloader such as
u-boot and NetBSD would help a lot.

I really appreciate any help.

Sam
 

--- Doug Fraser <dwfraser@onebox.com> wrote:

> One note that may help, configure to have an
> internal
> symbol table. For the powerpc port, if you set
> r3 and r4 to zero on boot, it will use the internal
> symbol table, so you can load and boot a pure binary
> instead of loading using an ELF loader.
> 
> If you set r3 and r4 to anything other than zero, it
> goes looking for a symbol table at the address in
> r3,
> with a length given in r4. If it does not find a
> valid
> symbol table there it crashes....
> 
> Using the internal symbols simplifies life.
> We use this to load gzipped binaries from FLASH.
> 
> Doug
> 
> -- 
> Douglas Fraser
> dwfraser@onebox.com
> 
> 
> 
> -----Original Message-----
> From:     Sam Pham <anhmn@yahoo.com>
> Sent:     Tue, 4 Oct 2005 11:09:43 -0700 (PDT)
> To:       Doug Fraser
> <dwfraser@onebox.com>;briggs@netbsd.org
> Cc:       port-powerpc@netbsd.org
> Subject:  RE: Re: boot NetBSD using u-boot
> 
> Thank you for your responses.  uboot documentation
> misled me to think that stage 2 loader is needed to
> boot NetBSD.  I'll try to boot it directly using
> tftp.
>  However, I'll need to configure the kernel for my
> eval board first.  Thanks.
> 
> Sam
> 
> 
> --- Doug Fraser <dwfraser@onebox.com> wrote:
> 
> > We are using a very simple initializer for the
> > Marvell bridge then
> > bootstrapping NetBSD from FLASH. That minimally
> > configured kernel
> > just knows about the disk drive, and mounts it,
> > loads the real run time
> > kernel and that is the end.
> > 
> > So, the initializer lives in low RAM. The kernel
> we
> > use as the boot
> > loader runs in high RAM, and the kernel it loads
> to
> > disk lives in low
> > RAM. It works quite well. We also keep a rescue
> > kernel in FLASH
> > so that if we have disk problems, we can boot the
> > rescue kernel and
> > do disk and network operations from there. The
> whole
> > thing fits in
> > eight Megabytes of FLASH.
> > 
> > Just a thought....
> > 
> > -- 
> > Douglas Fraser
> > dwfraser@onebox.com
> > 
> > 
> > 
> > -----Original Message-----
> > From:     Allen Briggs <briggs@netbsd.org>
> > Sent:     Mon, 3 Oct 2005 17:07:27 -0400
> > To:       Sam Pham <anhmn@yahoo.com>
> > Cc:       port-powerpc@netbsd.org
> > Subject:  Re: boot NetBSD using u-boot
> > 
> > On Mon, Oct 03, 2005 at 01:48:50PM -0700, Sam Pham
> > wrote:
> > > I'd like to port NetBSD on the mpc8540eval
> board,
> > > which has u-boot on it.  My understanding is
> that
> > > u-boot needs the stage 2 NetBSD loader to boot
> > NetBSD.
> > 
> > That seems to be what it wants, but you can also
> > just download
> > kernel code and jump to it ('tftp' and 'go').
> > 
> > The stage 2 loader usually lives in
> > arch/<plat>/stand/...
> > and is different for each system because it's kind
> > of a
> > bridge between the kernel and the host system.  It
> > might
> > have knowledge of devices and filesystem formats
> > that the
> > host system's ROM (u-boot, in your case) doesn't.
> > 
> > It's not clear to me why the 'stage 2 loader' that
> > uboot
> > expects couldn't be a kernel for development.  A
> > stage 2
> > loader would be really nice for being able to
> store
> > the
> > kernel on, say, a SATA controller on PCI or some
> > such,
> > but for development, you're probably just
> > downloading
> > with an ICE or via tftp.
> > 
> > -allen
> > 
> > -- 
> >                   Use NetBSD! 
> > http://www.NetBSD.org/
> > 
> > 
> > 
> 
> 
> __________________________________________________
> Do You Yahoo!?
> Tired of spam?  Yahoo! Mail has the best spam
> protection around 
> http://mail.yahoo.com 
> 
> 
> 



	
		
______________________________________________________ 
Yahoo! for Good 
Donate to the Hurricane Katrina relief effort. 
http://store.yahoo.com/redcross-donate3/