How to export linux fs using USB MassStorage device

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

-Michael

Reply to
Michael Schnell
Loading thread data ...

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.

Reply to
cs_posting

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.

Reply to
cs_posting

em inside an image file on your linux file

it

That was the plan.

sry I'm keept bussy here.

Dan

Reply to
Dan Danillo

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

Dan

Reply to
Dan Danillo

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

Reply to
Dan Danillo

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.

Reply to
cs_posting

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.