How to export linux fs using USB MassStorage device - Page 2

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
Re: How to export linux fs using USB MassStorage device
Quoted text here. Click to load it
Good idea, only problem is, that the file system I want to provide is
much bigger than my flash storage or my memory.
So statically creating the file system is out of the question.

Quoted text here. Click to load it
I'm clear on that.
But if changes happen on the embedded device I still can unload
g_file_storage and start it again


Re: How to export linux fs using USB MassStorage device

Imagine a mounted SD-Card combined with data from the embedded system.
Representing multiple partitions or devices are no option either.

Dan


Re: How to export linux fs using USB MassStorage device
Quoted text here. Click to load it

How about some foolery in the SD drivers to make a local image file
containing the local data overlay some clusters on the SD-card, and
put a dummy file in it's FAT pointing to them?

Actually, it's probably better to write a wrapper translation driver
the wraps the SD block device and does the substitution.  But i might
be tempted to try it by modifying the SD driver first...

I think the big problem would be if somebody else wrote to the card
and moved your dummy file - actually, that could be handled just by
finding it and telling the translator where it is.  It's if they made
it non-contiguous that you'd be in pain.


Re: How to export linux fs using USB MassStorage device
Quoted text here. Click to load it

Modify an existing driver - don't like that idea.
The data on the sd-card wont change, the data on the fs might change.
If I can notice that I can disconnect unload g_file store and load it
again.

Dan

Re: How to export linux fs using USB MassStorage device

Quoted text here. Click to load it


Then go with the wrapper driver?

Quoted text here. Click to load it

Not sure the host PC is going to be really happy about you doing
that.  It will survive the disconnect, probably at the cost of an
eventual error message to the user, but you may have to re-enumerate
to reconnect.   I'd be worried about it not re-discovering you.

Re: How to export linux fs using USB MassStorage device
Quoted text here. Click to load it
inside an image file on your linux file
Quoted text here. Click to load it

Ah, okay, point gadget at /dev/zero then...

Seriously, where were you planning to get the data from?

Wherever the data is coming form, if you can represent that as a block
device, you should be able to point gadget at it.


Re: How to export linux fs using USB MassStorage device
Quoted text here. Click to load it

That was the plan.

sry I'm keept bussy here.

Dan

Site Timeline