using the openmoko neo101 in mass storage mode

Andy Green andy at openmoko.com
Wed Jun 4 08:29:27 CEST 2008


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Somebody in the thread at some point said:
| On Fri, May 30, 2008 at 11:53:29AM -0700, Matt Mets wrote:
|> I believe this has been discussed at some point, but there is a
|> file-storage module that emulates a mass storage device:
|> http://www.linux-usb.org/gadget/file_storage.html
|>
|> I don't see it included in the preview ASU package, but it should be
|> trivial to build separately.
|>
|> The issue (that I see, anyway) is that it requires exclusive access to
|> the drive that it uses for the storage.
|
| I think we could get around with pretending to be a digital camera / media
| player instead. IIRC the protocol prefered by windows for these is more
| like a file server protocol (i.e. commands at file level) although maybe
| windows doesn't allow to download files from media players and may not
| allow to upload on cameras.
| But that should get around the exclusive access problem.
|
| Also there could be an image file which is shared via USB storage so no
| need to unmount the SD card.

That is true, Joerg also mentioned a separate partition which works as
well.  Each requires a fixed allocation of storage from the medium but
it isn't death.

The thing that bothers me is the effective requirement to force unmount
the filesystem either way.  It's for sure you wanted that filesystem
mounted in the device when it isn't presented as mass storage gadget, so
it limits you to scenarios where you never hold the files in there open
long term.  So media playing or camera kind of usage would be OK as we
are familiar with from mp3 players as mass storage, but there are many
other kinds of access that hold a handle open on the file long term, eg,
database file.  Especially when it's your /home that is getting shared,
on a Linux box you might have a few painful bleeding stumps if you
plugged it in and forced umount (which some folk anyway deliver by
looking in lsof -n | grep mountpoint and killing everything).

Another side of it is I use the GTA02 tethered by USB cable to a host
for power and Ethernet-over-USB access, if I used the mass storage
gadget as well then I would likely not want the modal behaviour that my
storage filesystem is forced unmounted the whole while I am hooked to
the host.  I would transfer files and then want to do something with the
files during a session.

These objections don't really kill mass storage gadget as something to
consider, but sharing a filesystem at the network layer just doesn't
have these problems and acts like we are used to in normal Linux usage.
~ It's annoying that basically Windows will drive us to decide which way
to jump or if to implement both, but there we are.

- -Andy
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Fedora - http://enigmail.mozdev.org

iEYEARECAAYFAkhGNkcACgkQOjLpvpq7dMqVGgCgj7Wy6LD876ZswAC9v5dY7sUx
jgEAoIQu908bvFh+JV2YPV2BxyY07+Tm
=3H8q
-----END PGP SIGNATURE-----




More information about the community mailing list