linuxppc-dev.lists.ozlabs.org archive mirror
 help / color / mirror / Atom feed
* RE: boot/simple in ROM?
@ 2003-04-25 12:53 Wells, Charles
  2003-04-25 14:48 ` Dan Malek
  0 siblings, 1 reply; 15+ messages in thread
From: Wells, Charles @ 2003-04-25 12:53 UTC (permalink / raw)
  To: 'Dan Malek'; +Cc: linuxppc-embedded


Dan Malek wrote:

>The purpose of all of these "bootloaders" is to convert a rom
>calling sequence into a standard (yes, there is one) Linux start
>up call.

Where is the "standard Linux startup call" documented?

Charlie

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread
* RE: boot/simple in ROM?
@ 2003-04-24 18:06 Kerl, John
  2003-04-24 19:15 ` Kent Borg
  0 siblings, 1 reply; 15+ messages in thread
From: Kerl, John @ 2003-04-24 18:06 UTC (permalink / raw)
  To: 'Kent Borg'; +Cc: linuxppc-embedded


I based mine off boot/simple.  It runs fine from ROM.

Suppose for example I have 32MB SDRAM from 0x00000000
to 0x01ffffff, and 16MB flash from 0xff000000 to 0xffffffff.
The key is that arch/ppc/boot/ld.script, and
arch/ppc/boot/simple/Makefile with -Ttext (say) 0x00400000,
make zImage.initrd an ELF file which should go at 0x00400000.
I build zImage.initrd and store it in flash at 0xff000000,
not at 0x00400000.

There is firmware on the board which initializes the memory
controller, etc.  This firmware then jumps into the image
in flash -- jumps directly to 0xff010000, with the extra
0x00010000 to get around the ELF header -- and zImage.initrd
does start executing there.  It immediately checks its PC and
sees that it's not at 0x00400000 where it belongs, so it copies
itself there (to RAM) and keeps running from there.  Then its
BSS, data and stack are in RAM as they should be.

You can see that zImage.initrd copies itself from *anywhere*
to where it should belong.  This is why, as Dan pointed out,
you can use a single zImage.initrd.  If I am developing,
I TFTP it to the board, say to 0x01000000.  Then I jump to
0x01010000.  If I am happy with it, I store it in flash
at 0xff000000.  Then I jump to 0xff010000.  Wherever I put
it, it will copy itself to where it belongs.


-----Original Message-----
From: Kent Borg [mailto:kentborg@borg.org]
Sent: Thursday, April 24, 2003 10:39 AM
To: Kerl, John
Subject: Re: boot/simple in ROM?


On Thu, Apr 24, 2003 at 10:35:21AM -0700, Kerl, John wrote:
> Why won't it run from ROM?

It puts the stack and bss in ROM.  Am I doing something wrong or using
a bad version??

-kb

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread
* boot/simple in ROM?
@ 2003-04-24 16:33 Kent Borg
  2003-04-24 17:13 ` Dan Malek
  0 siblings, 1 reply; 15+ messages in thread
From: Kent Borg @ 2003-04-24 16:33 UTC (permalink / raw)
  To: linuxppc-embedded


The boot loader thingie in arch/ppc/boot/simple is nifty.  So why
isn't there a provision for putting it on ROM?  (Or is there and I
missed it?)  Because boot/simple decompresses to RAM at 0x0, it seems
obvious that it might be decompressing from ROM.

What is the right way to do this?  (Or, pointers on how to make it
ROMable would be appreciated.)


Thanks,

-kb, the Kent who got as far as Linux booting most of the way but not
finding initrd because he has it messed up.

** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/

^ permalink raw reply	[flat|nested] 15+ messages in thread

end of thread, other threads:[~2003-04-25 14:48 UTC | newest]

Thread overview: 15+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
     [not found] <00032EDD.C22236@borg.org>
2003-04-24 17:44 ` boot/simple in ROM? Jerry Van Baren
2003-04-24 18:02   ` Mark A. Greer
2003-04-24 18:11     ` Basic Config file Kevin A. Sapp
     [not found]       ` <3EA82B56.3070808@ecubics.com>
2003-04-24 20:00         ` Kevin A. Sapp
2003-04-24 20:18           ` Wolfgang Denk
2003-04-25 12:53 boot/simple in ROM? Wells, Charles
2003-04-25 14:48 ` Dan Malek
  -- strict thread matches above, loose matches on Subject: below --
2003-04-24 18:06 Kerl, John
2003-04-24 19:15 ` Kent Borg
2003-04-24 16:33 Kent Borg
2003-04-24 17:13 ` Dan Malek
2003-04-24 17:32   ` Kent Borg
2003-04-24 17:49     ` Mark A. Greer
2003-04-24 18:41       ` Dan Malek
2003-04-24 18:29   ` emanuel stiebler

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).