From jim at OnJapan.net  Sun May 29 22:17:44 2005
From: jim at OnJapan.net (Jim Tittsler)
Date: Mon May 30 06:47:49 2005
Subject: Netwinder boot process
Message-ID: <C7587D8F-DD36-4939-B809-22872407A4F9@OnJapan.net>

Where can I find documentation about the NetWinder boot process?  I  
would like to TFTP an Inferno kernel to the NetWinder and boot it.   
I'm TFTPing something, but not actually running it... since I assume  
it doesn't look enough like the "kernel" format it is expecting.  I  
see messages on the serial port about "data seg reloc to", "bss seg  
reloc to", and "Assuming A.OUT kernel.  It then copies data to  
0xC000... and I'm guessing jumps there.

Are there still documents online somewhere that explain the boot  
sequence?  Can I boot a non-Linux kernel more easily by breaking into  
the boot process earlier and using the "Debug" mode?  (Is it  
documented?)

Jim


From ralphs at netwinder.org  Mon May 30 07:05:09 2005
From: ralphs at netwinder.org (Ralph Siemsen)
Date: Mon May 30 07:10:17 2005
Subject: Netwinder boot process
In-Reply-To: <C7587D8F-DD36-4939-B809-22872407A4F9@OnJapan.net>
References: <C7587D8F-DD36-4939-B809-22872407A4F9@OnJapan.net>
Message-ID: <429AF365.9070905@netwinder.org>

Jim Tittsler wrote:
> Where can I find documentation about the NetWinder boot process?  I  
> would like to TFTP an Inferno kernel to the NetWinder and boot it.   I'm 
> TFTPing something, but not actually running it... since I assume  it 
> doesn't look enough like the "kernel" format it is expecting.  I  see 
> messages on the serial port about "data seg reloc to", "bss seg  reloc 
> to", and "Assuming A.OUT kernel.  It then copies data to  0xC000... and 
> I'm guessing jumps there.

Yep, that's pretty much it.  If the image is not recognize as ELF, then 
its asssumed to be a.out and execution actually begins 20 bytes into the 
image... the first 20 bytes typically being NOP instructions.  All of 
the zImage and similar binary formats are treated this way.

> Are there still documents online somewhere that explain the boot  
> sequence? 

There are a few notes scattered in the Firmware-HOWTO, particularly 
section 3.7 and chapter 5.  Anything else, just ask and I'll try to find 
you an answer :)

 > Can I boot a non-Linux kernel more easily by breaking into
 > the boot process earlier and using the "Debug" mode?  (Is it 
documented?)

About the only difference is that in "debug" mode, there is no "struct 
param" prepared prior to execution of the kernel.  TFTP is much more 
convenient but if you prefer the serial route it can be used.

Some things to consider- the raw image you are loading, is it fully 
linked and all relocs have been processed?  Is it PIC code or does it 
have to be run at a specific address?

-R

