public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] Redboot fis load
@ 2011-01-18  2:24 Seeberger Marc-René
  2011-01-18  9:19 ` [ECOS] " John Dallaway
  0 siblings, 1 reply; 2+ messages in thread
From: Seeberger Marc-René @ 2011-01-18  2:24 UTC (permalink / raw)
  To: ecos-discuss

Hello,
I want to save a stripped ELF file as fis file and later on load and execute it with "fis load" and "go" commands. I can load an ELF file raw into ram with "load -r -m xmodem -b 0x80000000" and flash it with "fis create -b 0x80000000 -l 0x1234 -f 0x60000000 -e 0x80000000 xy.elf" or so. But when I try to "fis load xy.elf", the loader only copies the ELF file 1:1 into the ram instead of relocating the different sections into internal and external ram as defined in the ELF file.
As we have three sections for internal and two external rams, I won't use "load -m xmodem" and then flash three binary files by specifying source address, length etc. for each of them and later on do 3 fis load commands followed by a go.
The "load" command is ELF aware, but how can I make the "fis load" command ELF aware? We do not have a file system other than the simple FIS on our embedded system.
Thanks for any hint
Marc-Rene

--
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

* [ECOS] Re: Redboot fis load
  2011-01-18  2:24 [ECOS] Redboot fis load Seeberger Marc-René
@ 2011-01-18  9:19 ` John Dallaway
  0 siblings, 0 replies; 2+ messages in thread
From: John Dallaway @ 2011-01-18  9:19 UTC (permalink / raw)
  To: Seeberger Marc-René; +Cc: ecos-discuss

Hi Marc-Rene

Seeberger Marc-René wrote:

> I want to save a stripped ELF file as fis file and later on load and
> execute it with "fis load" and "go" commands. I can load an ELF file
> raw into ram with "load -r -m xmodem -b 0x80000000" and flash it with
> "fis create -b 0x80000000 -l 0x1234 -f 0x60000000 -e 0x80000000 xy.elf"
> or so. But when I try to "fis load xy.elf", the loader only copies the
> ELF file 1:1 into the ram instead of relocating the different sections
> into internal and external ram as defined in the ELF file.
> As we have three sections for internal and two external rams, I won't
> use "load -m xmodem" and then flash three binary files by specifying
> source address, length etc. for each of them and later on do 3 fis load
> commands followed by a go.
> The "load" command is ELF aware, but how can I make the "fis load"
> command ELF aware? We do not have a file system other than the simple
> FIS on our embedded system.
> Thanks for any hint

The ELF parsing code is currently part of the RedBoot "load" command
implementation:

   load.c(load_elf_image)

You will need to move the parsing code into a separate function and call
it from the RedBoot "fis load" command implementation in response to a
new 'option' switch on the RedBoot command line:

  flash.c(fis_load)

For a truly generic implementation, you should not assume that the flash
is directly addressable.

I hope this helps...

John Dallaway
eCos maintainer

-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss

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

end of thread, other threads:[~2011-01-18  9:19 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-01-18  2:24 [ECOS] Redboot fis load Seeberger Marc-René
2011-01-18  9:19 ` [ECOS] " John Dallaway

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 read-only IMAP folder(s) and NNTP newsgroup(s).