* boot/simple in ROM?
@ 2003-04-24 16:33 Kent Borg
2003-04-24 17:13 ` Dan Malek
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-24 16:33 Kent Borg
@ 2003-04-24 17:13 ` Dan Malek
2003-04-24 17:32 ` Kent Borg
2003-04-24 18:29 ` emanuel stiebler
0 siblings, 2 replies; 12+ messages in thread
From: Dan Malek @ 2003-04-24 17:13 UTC (permalink / raw)
To: Kent Borg; +Cc: linuxppc-embedded
Kent Borg wrote:
> The boot loader thingie in arch/ppc/boot/simple is nifty. So why
> isn't there a provision for putting it on ROM?
Well, you normally place it in ROM along with the kernel that is
attached.
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. They also perform any hardware specific "fixups" that
may be necessary prior to calling Linux. Another feature is it
isolates boot rom changes from Linux changes.
The old PPCBoot, and probably the new U-boot, kind of perform
some of these functions. The reason I'm not a fan of doing this
is if we make a change to the Linux calling sequence (which happens
rarely) you also have to update the boot rom to match. Not a good
thing, IMHO.
The other really nice thing about these bootloaders, compressed
kernels, and attached initrd, is you can boot the identical image
from all "devices." For example, during development you can tftp
load the image, get everything working, then place the exact same
bits into a flash rom. Simply jump to the first location of the
image and it will boot from flash.
It's relatively easy to adapt these loaders to any custom product
requirements.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: boot/simple in ROM?
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:29 ` emanuel stiebler
1 sibling, 1 reply; 12+ messages in thread
From: Kent Borg @ 2003-04-24 17:32 UTC (permalink / raw)
To: Dan Malek; +Cc: linuxppc-embedded
On Thu, Apr 24, 2003 at 01:13:35PM -0400, Dan Malek wrote:
> The other really nice thing about these bootloaders, compressed
> kernels, and attached initrd, is you can boot the identical image
> from all "devices." For example, during development you can tftp
> load the image, get everything working, then place the exact same
> bits into a flash rom. Simply jump to the first location of the
> image and it will boot from flash.
Yes, but disappointingly the ppc/boot/simple I am using (from 2.4
devel) won't run from ROM. Is there a better boot loader I should be
using?
Thanks,
-kb
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: boot/simple in ROM?
[not found] <00032EDD.C22236@borg.org>
@ 2003-04-24 17:44 ` Jerry Van Baren
2003-04-24 18:02 ` Mark A. Greer
0 siblings, 1 reply; 12+ messages in thread
From: Jerry Van Baren @ 2003-04-24 17:44 UTC (permalink / raw)
To: linuxppc-embedded
The "simple" boot loaders are loaders, they are NOT bootroms. They expect
the board to have a firmware/bootrom/monitor that does the necessary very
low level very hardware specific initialization (things like setting up
memory maps, initializing the SDRAM controller, etc.). The "simple" boot
loaders do the added steps necessary for starting linux, so they are
necessary but NOT sufficient.
gvb
At 01:32 PM 4/24/2003 -0400, kentborg@borg.org wrote:
>On Thu, Apr 24, 2003 at 01:13:35PM -0400, Dan Malek wrote:
> > The other really nice thing about these bootloaders, compressed
> > kernels, and attached initrd, is you can boot the identical image
> > from all "devices." For example, during development you can tftp
> > load the image, get everything working, then place the exact same
> > bits into a flash rom. Simply jump to the first location of the
> > image and it will boot from flash.
>
>Yes, but disappointingly the ppc/boot/simple I am using (from 2.4
>devel) won't run from ROM. Is there a better boot loader I should be
>using?
>
>Thanks,
>
>-kb
>
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-24 17:32 ` Kent Borg
@ 2003-04-24 17:49 ` Mark A. Greer
2003-04-24 18:41 ` Dan Malek
0 siblings, 1 reply; 12+ messages in thread
From: Mark A. Greer @ 2003-04-24 17:49 UTC (permalink / raw)
To: Kent Borg; +Cc: Dan Malek, linuxppc-embedded
Kent Borg wrote:
>On Thu, Apr 24, 2003 at 01:13:35PM -0400, Dan Malek wrote:
>
>
>>The other really nice thing about these bootloaders, compressed
>>kernels, and attached initrd, is you can boot the identical image
>>from all "devices." For example, during development you can tftp
>>load the image, get everything working, then place the exact same
>>bits into a flash rom. Simply jump to the first location of the
>>image and it will boot from flash.
>>
>>
>
>Yes, but disappointingly the ppc/boot/simple I am using (from 2.4
>devel) won't run from ROM. Is there a better boot loader I should be
>using?
>
>
You're a little sparse on info here but try lopping off the first 64KB
of your zImage (or jump 0x10000 into the zImage that you have).
Mark
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-24 17:44 ` Jerry Van Baren
@ 2003-04-24 18:02 ` Mark A. Greer
0 siblings, 0 replies; 12+ messages in thread
From: Mark A. Greer @ 2003-04-24 18:02 UTC (permalink / raw)
To: Jerry Van Baren; +Cc: linuxppc-embedded
Jerry Van Baren wrote:
>
> The "simple" boot loaders are loaders, they are NOT bootroms. They
> expect
> the board to have a firmware/bootrom/monitor that does the necessary very
> low level very hardware specific initialization (things like setting up
> memory maps, initializing the SDRAM controller, etc.). The "simple" boot
> loaders do the added steps necessary for starting linux, so they are
> necessary but NOT sufficient.
In general this is true. However, it is possible to put enough hw init
in the simple boot loader (bootwrapper as I and others now call it) to
run linux. This has been done in the past.
Mark
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ 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; 12+ 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] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-24 17:13 ` Dan Malek
2003-04-24 17:32 ` Kent Borg
@ 2003-04-24 18:29 ` emanuel stiebler
1 sibling, 0 replies; 12+ messages in thread
From: emanuel stiebler @ 2003-04-24 18:29 UTC (permalink / raw)
To: linuxppc-embedded
Dan Malek wrote:
>
> The old PPCBoot, and probably the new U-boot, kind of perform
> some of these functions. The reason I'm not a fan of doing this
> is if we make a change to the Linux calling sequence (which happens
> rarely) you also have to update the boot rom to match. Not a good
> thing, IMHO.
That's a very small price to pay for all the luxury of having a smarter
boot-monitor.
And, how many times was the linux calling sequence changed in the last
two years ?
cheers
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-24 17:49 ` Mark A. Greer
@ 2003-04-24 18:41 ` Dan Malek
0 siblings, 0 replies; 12+ messages in thread
From: Dan Malek @ 2003-04-24 18:41 UTC (permalink / raw)
To: Mark A. Greer; +Cc: Kent Borg, linuxppc-embedded
Mark A. Greer wrote:
> You're a little sparse on info here but try lopping off the first 64KB
> of your zImage (or jump 0x10000 into the zImage that you have).
Oh yeah...good point. It's just a reflex for me to check this, so
I seldom think of it anymore. I think some board builds automatically
chop this in the makefile with a 'dd' command (or, they used to) :-)
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-24 18:06 boot/simple in ROM? Kerl, John
@ 2003-04-24 19:15 ` Kent Borg
0 siblings, 0 replies; 12+ messages in thread
From: Kent Borg @ 2003-04-24 19:15 UTC (permalink / raw)
To: Kerl, John; +Cc: linuxppc-embedded
On Thu, Apr 24, 2003 at 11:06:32AM -0700, Kerl, John wrote:
> 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
...suddenly I GET it! I was being too clever and trying to link for
my ROM address, and of course that will put the stack and bss in ROM.
Duh.
When I simply burn my 0x800000 RAM image at 0xfec00000 the bss and
stack are still down in 0x800000-range, and it works great.
Thanks to all for having such patience,
-kb, the Kent who is glad he didn't ask such a question on, say, the
qmail list.
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
* RE: boot/simple in ROM?
@ 2003-04-25 12:53 Wells, Charles
2003-04-25 14:48 ` Dan Malek
0 siblings, 1 reply; 12+ 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] 12+ messages in thread
* Re: boot/simple in ROM?
2003-04-25 12:53 Wells, Charles
@ 2003-04-25 14:48 ` Dan Malek
0 siblings, 0 replies; 12+ messages in thread
From: Dan Malek @ 2003-04-25 14:48 UTC (permalink / raw)
To: Wells, Charles; +Cc: linuxppc-embedded
Wells, Charles wrote:
> Where is the "standard Linux startup call" documented?
It's found in the code and in lots of archive discussions.
It boils down to building a board descriptor structure or
using bi_recs created at a known address. The kernel is
uncompressed to location 0 and the bootloader jumps there
when finished.
-- Dan
** Sent via the linuxppc-embedded mail list. See http://lists.linuxppc.org/
^ permalink raw reply [flat|nested] 12+ messages in thread
end of thread, other threads:[~2003-04-25 14:48 UTC | newest]
Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-04-24 18:06 boot/simple in ROM? Kerl, John
2003-04-24 19:15 ` Kent Borg
-- strict thread matches above, loose matches on Subject: below --
2003-04-25 12:53 Wells, Charles
2003-04-25 14:48 ` Dan Malek
[not found] <00032EDD.C22236@borg.org>
2003-04-24 17:44 ` Jerry Van Baren
2003-04-24 18:02 ` Mark A. Greer
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).