[U-Boot] [PATCH v2 8/8] FAT: Make it possible to read from any file position

Tom Rini trini at ti.com
Fri Sep 14 22:49:04 CEST 2012


On Mon, Sep 03, 2012 at 04:17:09PM +0200, Beno??t Th??baudeau wrote:
> Dear Wolfgang Denk,
> 
> On Sunday, September 2, 2012 5:28:09 PM, Wolfgang Denk wrote:
> > Dear Beno??t Th??baudeau,
> > 
> > In message
> > <1285759492.332736.1342790529256.JavaMail.root at advansee.com> you
> > wrote:
> > > When storage devices contain files larger than the embedded RAM, it
> > > is usef> ul to
> > > be able to read these files by chunks, e.g. for a software update
> > > to the
> > > embedded NAND Flash from an external storage device (USB stick, SD
> > > card, et> c.).
> > >
> > > Hence, this patch makes it possible by adding a new FAT API to read
> > > files f> rom a
> > > given position.
> > >
> > > Signed-off-by: Beno??t Th??baudeau <benoit.thebaudeau at advansee.com>
> > > Cc: Wolfgang Denk <wd at denx.de>
> > > ---
> > > Changes for v2:
> > >  - Patch renumbering because of the new v2 1/8.
> > >  - Possible code style changes due to the new v2 1/8.
> > >  - Add missing vairable renaming to fat_write.c.
> > >
> > >  .../fs/fat/fat.c                                   |   88
> > >  ++++++++++++++++> ----
> > >  .../fs/fat/fat_write.c                             |   18 ++--
> > >  2 files changed, 80 insertions(+), 26 deletions(-)
> > 
> > I don't see any command line interface to actually use this code.
> > 
> > How would I put this to use?
> 
> Here is the current "fatload" command line interface:
> fatload <interface> <dev[:part]>  <addr> <filename> [bytes]
> 
> Do you prefer to change it to:
> fatload <interface> <dev[:part]>  <addr> <filename> [offset] [bytes]
> 
> or to have a new dedicated command, or something else?

Lets go with:
fatload <interface> <dev[:part]>  <addr> <filename> [bytes] [offset] and
update the long help text to mention both bytes and offset and that
offset requires bytes.

-- 
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20120914/a2619e25/attachment.pgp>


More information about the U-Boot mailing list