From: Craig H. <cr...@gu...> - 2006-03-04 22:09:41
|
On Mar 3, 2006, at 2:54 PM, Alexandre Pereira Nunes wrote: > - Using file_storage gadget, making gumstix appear as a "pendrive" > to the windows machine. That would require previous customization > on the gumstix build, afaik. You would have to have a loop > filesystem or some other sort of trick in order to make it work > correctly, but it works fine. It should be pretty easy to have something which is normally mounted loopback on the 'stix where it reads/writes data you want to pass over to windows, then when USB insertion is detected (iirc it triggers a udev event), you unmount the loopback on the gumstix (after closing any open files and whatnot), then use the /sys interface to the file_storage gadget to tell it to export the thing which was just unmounted. Windows will then mount it on its side, and execute the autorun.bat which is on there. When the USB removal event is detected, you reverse the process -- tell /sys to unexport the device, then re-mount it loopback and re-open your files on the gumstix side. C |