osx - Linux Mass Storage kernel module g_mass_storage use with FAT -


i configuring portable (embedded linux based) device becomes mass storage provider once plugged computer. mass storage media must compatible windows , mac, therefore choose fat filesystem (file allocation table).

the fat produced mkdosfs

im facing following issues when connected computer:

windows: - want's repair drive, if allow come no errors found....

mac: - drive mounted stays little while mounted , usable vanish again after while. ends in regular attempt remount unmount again. further see following line dmesg

usbmsc identifier (non-unique) 0x00000000 0xxxxx 0x300 0x100, 2 

if plug windows machine , format exposed drive fat (fat 32) both win , mac boxes happy fat system found on device. implies me mkdosfs not capable of producing valid fat although knowning vfat produces...

had similar issues getting cross os compatibility work? cannot believe 1 facing issue.

here setup routine g_mass_storage kernel module:

kernel:

modprobe libcomposite cd /sys/kernel/config/usb_gadget  mkdir -p usbdisk  cd usbdisk  echo 0xxxxx > idvendor echo 0x0300 > idproduct echo 0x0100 > bcddevice echo 0x0200 > bcdusb   mkdir -p strings/0x409  echo "42" > strings/0x409/serialnumber echo "spam , eggs inc." > strings/0x409/manufacturer echo "my awesome product" > strings/0x409/product   mkdir -p functions/mass_storage.usb0  echo 0 > functions/mass_storage.usb0/stall echo 0 > functions/mass_storage.usb0/lun.0/cdrom echo 0 > functions/mass_storage.usb0/lun.0/ro echo 0 > functions/mass_storage.usb0/lun.0/nofua echo "/dev/mmcblk0p1" > functions/mass_storage.usb0/lun.0/file   mkdir -p configs/c.1/strings/0x409   echo "my mass storage" > configs/c.1/strings/0x409/configuration echo 500 > configs/c.1/maxpower ln -s functions/mass_storage.usb0 configs/c.1  echo ci_hdrc.0 > udc 

formatting:

i have tried following scenarios:

with backing file, fdisk , mkdosfs http://www.linux-usb.org/gadget/file_storage.html

in latest version use block device (sd card) partition , format with

mkdosfs -n label -f 32 /dev/mmcblk0p1 


Comments

Popular posts from this blog

android - Gradle sync Error:Configuration with name 'default' not found -

java - Andrioid studio start fail: Fatal error initializing 'null' -

html - jQuery UI Sortable - Remove placeholder after item is dropped -