i.mx8mp g_mass_storage module issue

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

i.mx8mp g_mass_storage module issue

1,461件の閲覧回数
liamsul42
Contributor II

I am coming across an issue when attempting to use the g_mass_storage module on a i.mx8mp. Currently after loading the module using, 'modprobe g_mass_storage file=/home/root/LUN/lunimage.img'. The module seems to start with no issues.

dmesg output:

Mass Storage Function, version: 2009/09/11
[ 144.290742] LUN: removable file: (no medium)
[ 144.290749] # of luns: 1 File Count: 0 (fsg_config_from_params in f_mass_storage.c)
[ 144.290753] LUN File: /home/root/LUN/lunfile.img
[ 144.291620] LUN: file: /home/root/LUN/lunfile.img
[ 144.291629] Number of LUNs=1
[ 144.291735] g_mass_storage gadget: Mass Storage Gadget, version: 2009/09/11
[ 144.291741] g_mass_storage gadget: userspace failed to provide iSerialNumber
[ 144.291744] g_mass_storage gadget: g_mass_storage ready

I plug the i.mx8mp into my Windows PC (I have used a Linux PC as well to no avail) and I am able to see the new volume E:/ which is the same size as the lunimage.img. This volume can be opened with no issues as the lunimage.img's filesystem is FAT32. However the volume E:/ does not contain any files that are on the lunimage.img. I am ensuring that I am not plugged into the PC while starting the g_mass_storage module and do not have the backing file mounted when starting it. Any files that are added into the lunimage.img backing file while it is mounted do not appear on the windows side (The backing file is not mounted while plugged into the PC) Also any files added in on the windows E:/ do not appear on the lunimage.img when mounted. Both the imx8mp usb host and the target PC seem to both have their own space equal to the size of the backing file while never being synced with one another.

I am also mounting the lunimage.img backing file to loop0 using 'mount -o loop /home/root/LUN/lunimage.img /mnt/lun'

I have also followed this post which was having similar issues however, these solutions were unable to fix my problems.

Any help would be greatly appreciated!

0 件の賞賛
返信
2 返答(返信)

1,437件の閲覧回数
JosephAtNXP
NXP TechSupport
NXP TechSupport

Hi,

Thank you for your interest in NXP Semiconductor products,

What is the BSP version that you are using? Have you tried adding removable option?

Regards

0 件の賞賛
返信

1,406件の閲覧回数
liamsul42
Contributor II

The BSP I am using for this is Kirkstone (kernel 5.15.71). I have also tried the removable option but the same error still persists.

0 件の賞賛
返信