iMX6ULL g_mass_storage. How to share partition between Windows host PC and EVK.

cancel
Showing results for 
Search instead for 
Did you mean: 

iMX6ULL g_mass_storage. How to share partition between Windows host PC and EVK.

2,669 Views
mannsikchung
Contributor III

Dear All.

I'm using iMX6ULL EVK Board.

I successfully install module, g_mass_storage by below command.

root@imx6ull14x14evk:~# modprobe g_mass_storage file=/dev/mmcblk1p5
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
LUN: file: /dev/mmcblk1p5
Number of LUNs=1
Number of LUNs=1
g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
g_mass_storage gadget: userspace failed to provide iSerialNumber
g_mass_storage gadget: g_mass_storage ready
root@imx6ull14x14evk:~# g_mass_storage gadget: high-speed config #1: Linux File-Backed Storage

But, when I connect my EVK to Windows PC over OTG2, Windows PC recognize mass storage device but can not access the partition before format it using "Computer Manager --> Disk Management" utility.

Though I already formatted the partition using "mkfs.vfat" command in Linux.

So, I format the partition using Windows PC and copy some files to the partition.

After then, I mounted the partition, "/dev/mmcblk1p5" to a directory.

But, I can not read the contents, I copied by Windows PC, from the EVK's mounted directory. 

How can I share the partition, "/dev/mmcblk1p5", with Windows PC and EVK.

Best Regards.

Mannsik

Labels (3)
0 Kudos
3 Replies

461 Views
miguelhortelano
Contributor II

I finally solved the problem.

I needed to format a primary partition using sfdisk prior to format it with mkfs.msdos.

Regards

0 Kudos

461 Views
miguelhortelano
Contributor II

Hi all,

I'm facing a similar issue with our iMX6DL.

I managed to share a partition with Ubuntu, but when I connect it to a Windows 7 PC the volume is detected but not assigned, even though I've formatted the partition as FAT32 from iMX6 side.

DTS are configured as I.MX manual reference states but still can't see the partition from a Windows PC

Some help will be really appreciated.

These are the steps that I'm doing:

  • First I create a 32MB file and give a FAT format

dd if=/dev/zero of=/home/images/tmp_fs bs=32M count=1

mkfs.fat /home/images/tmp_fs

  • Mount it in /tmp

mount -t vfat -o loop /home/images/tmp_fs /tmp

  • Finally use g_mass_storage

cd /lib/modules/4.1.15-6QP+gf3fb134/kernel

insmod fs/configfs/configfs.ko

insmod drivers/usb/gadget/libcomposite.ko

insmod drivers/usb/gadget/function/usb_f_mass_storage.ko

insmod drivers/usb/gadget/legacy/g_mass_storage.ko  file=/dev/loop0 stall=0

Regards

0 Kudos

461 Views
Yuri
NXP TechSupport
NXP TechSupport

Hello,

  Please use section 4.10.2.8 (USB OTG HNP and SRP Support)

of “i.MX_Linux_Reference_Manual.pdf” in Linux doc package.

http://www.nxp.com/webapp/Download?colCode=L4.1.15_2.1.0_LINUX_DOCS&Parent_nodeId=133769948107170617... 

Have a great day,
Yuri

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 Kudos