[U-Boot-Users] U-Boot-NG ?

Sascha Hauer
2007-07-03T09:02:48Z

On Tue, Jul 03, 2007 at 09:22:29AM +0200, Wolfgang Denk wrote:
> In message <20070703000910.GA15081@pengutronix.de> you wrote:
> >
> > > You don't? How do you uncompress an image then?
> >
> > On Arm by default zImages are used to generate the uImage, so the kernel
> > decompresses itself.
>
> For the Linux kernel, maybe. But there are many more things than just
> Linux. Think for example about FPGA images, etc.

That's why it's configurable.

>
> > > Do you mean you don't relocate the code any more?
> >
> > It still gets copied from the address U-Boot starts (Flash) to RAM, but
> > pointer offsets are not recalculated. This means that you must not use
> > statically initialized pointers during startup since the code is not
> > running at its link address.
>
> Are you doing this for all architectures now?

PowerPC was the only architecture compiling with -fPIC.

>
> > The Arm part has done this for years. On PowerPC we have the luxury of
>
> Yes, and this is my major critique to the ARM (and the MIPS, and
> maybe other) ports. We should fix this. Like on PowerPC, U-Boot
> should always be copied to the upper end of RAM instead of a
> precalculated address, as this cannot cope with different RAM sizes.
>

If you insist on going to the upper end of RAM, yes. But why do you want
to go there? On PowerPC you could go to the upper end of the smallest
available RAM, which leaves enough space for U-Boot. Or you could link
to 4MB or something in RAM and put the malloc area behind that. 4MB in
RAM leaves enough space for copying kernel images to 0.

> > having SRAM, so we can setup a stack and do SDRAM initialization in C
> > before jumping to RAM.
>
> Not all PowerPC processors have on-chip or other static RAM; in some
> cases we use (for example) the data cache as memory. Similar
> techniqes should be possible on all architectures.

Not on Arm, as far as I know. At least I have not seen any examples. But
on Arm you have the 'naked' attribute allowing it to run C code from the
reset vector on. Apex does this.

Regards,
Sascha

--
Pengutronix - Linux Solutions for Science and Industry
Entwicklungszentrum Nord http://www.pengutronix.de