public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] RedBoot's load and fileio
@ 2009-09-08  9:01 Sergei Gavrikov
  2009-09-08  9:23 ` Ross Younger
  0 siblings, 1 reply; 3+ messages in thread
From: Sergei Gavrikov @ 2009-09-08  9:01 UTC (permalink / raw)
  To: eCos discuss-list

Hello

Does anybody know what was a reason to suppress in RedBoot an ability
to load files in RAM from a file on the mounted filesystem(s)? A while
ago I was looking for something like

Redboot>load /bin/shell
Redboot>go

keeping in a mind that application would be placed on jffs2 and it was
surprise for me that I cannot do it, because such an ability commented
out in load.c (it is here: load.c:do_load():782). When I did remove
the comment and change that check as `s/fileio_mounted/mount_count/' it
was possible to use the ability to load a stuff directly from the
filesystem.

In RedBoot's ChangeLog:2003-11-27 I saw a record from David Woodhouse

	* cdl/redboot.cdl, fs/fileio.c, include/fs/fileio.h, src/load.c: 
	Support for mounting and loading files from fileio file systems
	such as JFFS2.

and I found nothing about a rejecting the ability. Any comments from
eCos veterans and RedBoot's experts?

Of course, XYZMODEM, TFTP, and HTTP are nice load methods for a debug
cycle, but, we really have not a method to load and run applications
(except `exec' for Linux kernel) from the filesystem, have we? My test
was done for JFFS2 FS and it worked (well, JFFS2 can be bloat for some
targets), but somebody would use, for example, ROMFS FS.  Must we use
a load method from FIS only (and if we must, then why) for such cases
(mount, load and go)? Excuse me, if I missed something.

Thank you for the comments,

Sergei

-- 
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] 3+ messages in thread

* Re: [ECOS] RedBoot's load and fileio
  2009-09-08  9:01 [ECOS] RedBoot's load and fileio Sergei Gavrikov
@ 2009-09-08  9:23 ` Ross Younger
  2009-09-08 10:20   ` Sergei Gavrikov
  0 siblings, 1 reply; 3+ messages in thread
From: Ross Younger @ 2009-09-08  9:23 UTC (permalink / raw)
  To: eCos discuss-list

Hi Sergei,

> Does anybody know what was a reason to suppress in RedBoot an ability
> to load files in RAM from a file on the mounted filesystem(s)? 

Support for loading from fileio is present, but hiding; I think what you
found was the old code. It really lives in fs/fileio.c, switched on by the
option CYGPKG_REDBOOT_FILEIO.

All you should need to do is add CYGPKG_IO_FILEIO to your config, and
resolve any conflicts, before you build RedBoot. Then, the syntax "load -m
fileio /some/file" is what you're looking for.

It all Just Worked for me when I tried it out a few months ago. (I was using
a YAFFS filesystem and my NAND library, but there's no reason why jffs2
shouldn't work.)


Ross

-- 
Embedded Software Engineer, eCosCentric Limited.
Barnwell House, Barnwell Drive, Cambridge CB5 8UU, UK.
Registered in England no. 4422071.                  www.ecoscentric.com

   >>>> Visit us at ESC-UK  http://www.embedded.co.uk <<<<
   >>>> Oct 7-8 on Stand 433 at FIVE ISC, Farnborough <<<<

-- 
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] 3+ messages in thread

* Re: [ECOS] RedBoot's load and fileio
  2009-09-08  9:23 ` Ross Younger
@ 2009-09-08 10:20   ` Sergei Gavrikov
  0 siblings, 0 replies; 3+ messages in thread
From: Sergei Gavrikov @ 2009-09-08 10:20 UTC (permalink / raw)
  To: Ross Younger; +Cc: eCos discuss-list

On Tue, Sep 08, 2009 at 10:22:55AM +0100, Ross Younger wrote:
> Hi Sergei,
> 
> > Does anybody know what was a reason to suppress in RedBoot an ability
> > to load files in RAM from a file on the mounted filesystem(s)? 
> 
> Support for loading from fileio is present, but hiding; I think what you
> found was the old code. It really lives in fs/fileio.c, switched on by the
> option CYGPKG_REDBOOT_FILEIO.
> 
> All you should need to do is add CYGPKG_IO_FILEIO to your config, and
> resolve any conflicts, before you build RedBoot. Then, the syntax "load -m
> fileio /some/file" is what you're looking for.

Hi Ross,

Thank you! I really missed this :-)

grep -qr -- '-m file' $ECOS_REPOSITORY/redboot/current/doc&&echo documented
documented

I will try it. I saw that commented out block in CVS'ed load.c and I
became "to build" my guesses. Once again thank you for the tip.

Regards,

Sergei

-- 
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] 3+ messages in thread

end of thread, other threads:[~2009-09-08 10:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-09-08  9:01 [ECOS] RedBoot's load and fileio Sergei Gavrikov
2009-09-08  9:23 ` Ross Younger
2009-09-08 10:20   ` Sergei Gavrikov

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).