NAND and vfat

Nancy nancydreaming at gmail.com
Sun Jun 8 22:58:47 EDT 2008


Hi Alaor,
On Mon, Jun 9, 2008 at 6:49 AM, Alaor Koppe <alakoppe at gmail.com> wrote:
> Hi Nancy
>
> I followed what you said but something is wrong. I'm trying to mount
> my board as a device to windows, using the vfat.img as a Backing
> Storage File (with gadget driver).
> Well, I created the file with 50 Mb, indicated the file to driver and
> formated the file as vfat at Windows. I put files in this volume at
> Windows and all works fine, but when I mount the vfat.img at board
> with mount command (-t vfat -o loop vfat.img /mnt/fat), I can't see
> the files that I put with Windows.
> The gadget driver is working fine, and the mount command doesn't
> return error when I mount the loopback file.
> Can be an error on Vfat fs in uclinux? (I'm using 2.6.11.8-hsc0)?
   I think you miss some important VFAT meta data which should be
written on Nand, but due to your wrong operations, they do not.
   Try this:
 # dd bs=1M count=10 if=/dev/zero of=vfat.img
 # loseup /dev/loop0 vfat.img
 # modprobe g_file_storage file=/dev/loop0

 On windows side:
 fast FAT or FAT32 format
 cp files ...
 unload USB device

 On Board:
# rmmod g_file_storage
# mount -t vfat -o loop vfat.img /mnt/fat
# ls /mnt/fat
See it ?

-- 
Best wishes,
Nancy



More information about the linux-mtd mailing list