Re: How can I boot a program from flash on ML403?

4 messages, 2 authors, 2007-02-15 · open the first message on its own page

Re: How can I boot a program from flash on ML403?

From: Lorenz Kolb <hidden>
Date: 2007-02-13 19:04:14

Hi,

I wasted a lot of time making fitting u-boot into the 64K of BRAM, just to
see data2mem from EDK 8.1 crashing

Thus my current (dirty) solution is:

Using SREC Bootloader from Xilinx' EDK to load a U-Boot and make U-Boot load
Linux both located on flash.
Actually, it is quick and dirty, but it works fine for testing...

Greetings,

Lorenz Kolb


On Tue, 13 Feb 2007 20:17:00 +0800
yunfeizhang@sjtu.edu.cn wrote:
hi, all:
   I want to porting u-boot to ML403,but first I should master booting a
common app from flash first.Who can tell how to do that?Any details about
u-boot on ML403 is also prefered
   Thanks for all your kindness!

RE: How can I boot a program from flash on ML403?

From: Leonid <hidden>
Date: 2007-02-15 04:57:13

Sent: Tuesday, February 13, 2007 10:57 AM Lorenz Kolb:
Thus my current (dirty) solution is:
Using SREC Bootloader from Xilinx' EDK to load a U-Boot and make
U-Boot=20
load Linux both located on flash.
Actually, it is quick and dirty, but it works fine for testing...
I use the same scheme (called 3-stage boot) but I don't see what is
dirty about it. For testing/debugging you even can load u-boot directly
into memory using XMD. Of course, image must be compiled to run from
memory, not flash.

BTW, do you (or anybody) have XTEMAC drivers for ML403 u-boot?

Regards,

Leonid.

Re: RE: How can I boot a program from flash on ML403?

From: Lorenz Kolb <hidden>
Date: 2007-02-15 07:12:25

Hi Leonid,
I use the same scheme (called 3-stage boot) but I don't see what is dirty
about it. For testing/debugging you even can load u-boot directly into
memory using XMD. Of course, image must be compiled to run from memory, not
flash.

actually I call it dirty as SREC is a quite stupid format (for a bootloader,
as it has to be decoded first) and so the loader wastes a lot of time at
least for productive use we do not want this three stage boot.

Actually my partner and I even fitted an u-boot directly into BRAM (if it is
loaded via XMD), unfortunately the binutils of ELDK from W. Denk screwed the
elf (sections were out of segment) and even after fixing that manually (with
a hex editor) data2mem from Xilinx messes something up.
BTW, do you (or anybody) have XTEMAC drivers for ML403 u-boot?
Actually we did not yet focus on that, we currently mount our NFS by placing
a small initrd image on flash that loads drivers for opb_ethernet and mounts
an nfs volume an chroots to it.

Best Regards,

Lorenz

RE: RE: How can I boot a program from flash on ML403?

From: Leonid <hidden>
Date: 2007-02-15 15:55:07

On Wednesday, February 14, 2007 11:12 PM Lorenz Kolb
quoted
I use the same scheme (called 3-stage boot) but I don't see what is
dirty
quoted
about it. For testing/debugging you even can load u-boot directly
into
quoted
memory using XMD. Of course, image must be compiled to run from
memory,=20
quoted
not flash.
actually I call it dirty as SREC is a quite stupid format (for a=20
bootloader,
as it has to be decoded first) and so the loader wastes a lot of time
at
least for productive use we do not want this three stage boot.
[Leonid] When I use "3-stage boot" name I actually don't mean that SREC
format used in production. This is too slow indeed. Here how it works
for me:
- u-boot is ALWAYS compiled to run directly from RAM. You can place it
on flash using JTAG or u-boot itself on later stage (see below).
Compilation results include binary (for flash burning), ELF and SREC
files.
- Early boot (tiny BRAM based program) wakes up, checks whether u-boot
presents on the flash (can be different criteria) or wait for some input
or read some config to know where pick up u-boot from. If it's on the
flash already, early boot copies u-boot to RAM and launches it,
otherwise waits for SREC file to be sent via serial interface, copies it
into RAM and starts.
- u-boot does the rest of job (linux boot, etc...). On this stage you
can use u-boot to program u-boot image (compiled to run from RAM) onto
the flash for next reboot.

This scheme works perfectly for ARM, Xilinx and actually is a good
choice for any architecture where CPU itself fetches boot code from boot
location into memory (ARM) or code can reside in RAM from the very
beginning (FPGA with soft/hard CPU cores). In traditional approach (with
relocation) u-boot kind of contains both functionalities which probably
best choice for traditional PPC boards. =20
Actually my partner and I even fitted an u-boot directly into BRAM (if
it > is loaded via XMD),=20
[Leonid] I also use XMD but load u-boot ELF directly to RAM. Early boot
is not used in this setup and this is quickest and most convenient way
for debug.

Best Regards,

Leonid.
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help