All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot-Users] usb write command available in u-boot??
@ 2008-05-13 14:15 mahendra varman
  2008-05-13 15:26 ` Markus Klotzbücher
  2008-05-13 19:18 ` Ken.Fuchs at bench.com
  0 siblings, 2 replies; 3+ messages in thread
From: mahendra varman @ 2008-05-13 14:15 UTC (permalink / raw)
  To: u-boot

Hi all

In u-boot under common/cmd_usb.c there are commands for
                usb info , usb tree, usb reset,

I can find usb read command also

There is no command for usb write

Is there is possibility to do a usb write command (eg .. writing some data
into the flash memory stick)  in u-boot level??


Thanks
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.denx.de/pipermail/u-boot/attachments/20080513/3352a16c/attachment.htm 

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

* [U-Boot-Users] usb write command available in u-boot??
  2008-05-13 14:15 [U-Boot-Users] usb write command available in u-boot?? mahendra varman
@ 2008-05-13 15:26 ` Markus Klotzbücher
  2008-05-13 19:18 ` Ken.Fuchs at bench.com
  1 sibling, 0 replies; 3+ messages in thread
From: Markus Klotzbücher @ 2008-05-13 15:26 UTC (permalink / raw)
  To: u-boot


"mahendra varman" <mahendravarman15@gmail.com> writes:

> In u-boot under common/cmd_usb.c there are commands for
> usb info , usb tree, usb reset,
> I can find usb read command also
> There is no command for usb write

That's right.

> Is there is possibility to do a usb write command (eg .. writing some
> data into the flash memory stick)  in u-boot level??

No, not with the current implementation, I'm afraid.

Best regards

Markus Klotzbuecher

--
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-0 Fax: +49-8142-66989-80  Email: office at denx.de

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

* [U-Boot-Users] usb write command available in u-boot??
  2008-05-13 14:15 [U-Boot-Users] usb write command available in u-boot?? mahendra varman
  2008-05-13 15:26 ` Markus Klotzbücher
@ 2008-05-13 19:18 ` Ken.Fuchs at bench.com
  1 sibling, 0 replies; 3+ messages in thread
From: Ken.Fuchs at bench.com @ 2008-05-13 19:18 UTC (permalink / raw)
  To: u-boot

> In u-boot under common/cmd_usb.c there are commands for
>                 usb info , usb tree, usb reset, 
> 
> I can find usb read command also
> 
> There is no command for usb write

Since a bootloader loads things from boot devices as opposed
writing things to boot devices, it makes sense that there would
be no write command to boot devices.

> Is there is possibility to do a usb write command (eg .. writing some
> data into the flash memory stick)  in u-boot level??

Absolutely, but it is potentially dangerous to do.

Raw writes of disk images or individual filesystems may be a
reasonable thing to do and should require only modest changes
to support.  Only a block write function would need to be added.
This is especially useful if the device is soldered to the board
and there is no other way to write the data to the device.

Does anyone have a soldered-on USB storage device?

Crazy data transfer idea:

For simple data transfer, it may be possible to allocate a file
on a FAT16 filesystem that uses exactly one cluster and determine
the block address of that cluster and instruct U-Boot to write
only to that cluster.  This would mean that a cluster could be
written in raw mode via U-Boot and on another system read as a
FAT16 file.  The file length would always be a full cluster in
size, so the file would need to be copied and truncated to the
proper length on the host system.  Again, on U-Boot this would
require only the addition of a block write function.

Writing files to filesystems via U-Boot:

The filesystem support in U-Boot is designed to function in a
read-only mode, but the code is probably based on a read/write
Linux driver, so it may not be that difficult to change to
support write functions.  The filesystems would need to support
file creation, data over-write and file append functions, at a
minimum.

This would require more work than it would be worth, in my
opinion.  But a block write function would be useful for some
(soldered on) devices, if not USB storage.

Sincerely,

Ken Fuchs

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

end of thread, other threads:[~2008-05-13 19:18 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-13 14:15 [U-Boot-Users] usb write command available in u-boot?? mahendra varman
2008-05-13 15:26 ` Markus Klotzbücher
2008-05-13 19:18 ` Ken.Fuchs at bench.com

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.