How to export linux fs using USB MassStorage device

Jul 09, 2009 26 Replies

o some means needs to be introduced that the files don't change while a connection is established.

-Michael

inside an image file on your linux file

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.

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.

em inside an image file on your linux file

it

That was the plan.

sry I'm keept bussy here.

Dan

Yep, thats an issue, but first let me ghet started.

Dan

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

Then go with the wrapper driver?

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.

Join the Discussion

Have something to add? Share your thoughts — no account required.

Didn't find your answer?

Ask the community — no account required