On Nov 4, 2005, at 9:27 AM, Stuart Bass wrote:
I seem to be having problems though in setting up the fat file system on both ramdisks and loop back devices, onto a file in the flash memory (presumably because they are very similar.I can mount, read and write these when they are formatted as ext2, but when formatted as FAT i get a bunch of buffer I/O errors, ie:# umount loop0/Buffer I/O error on device loop0, logical block 41lost page write due to I/O error on loop0
Buffer I/O error on device loop0, logical block 1lost page write due to I/O error on loop0
Buffer I/O error on device loop0, logical block 3lost page write due to I/O error on loop0
Buffer I/O error on device loop0, logical block 5lost page write due to I/O error on loop0
Where is the file which underlies /dev/loop0? Is it on the gumstix flash? Or on a removable MMC or CF card? Or in /tmp? What happens if you create the file, point the gadget at it, then plug the gumstix into a window box, and format the "file" there? ie create the partitions and filesystem from windows, rather than natively on the gumstix -- I'm assuming that the gadget essentially exports a raw device, so that this would work.
The loop device file (in this example) was created as per the directions at http://www.linux-usb.org/gadget/file_storage.html .The ramdisk is formatted using the command mkdosfs -S 1024 /dev/ram0Rather than using a ramdisk, I think if you want the thing to be in RAM, the better way would be to just use a loopback file located under /tmp, which is in RAM.
Another alternative is that I think there's another gadget device (forgot the name) which allows the gaget's own filesystem to show up on the USB host -- or am I misremembering that?