REL 1.0
Page 47 of 69
iWave Systems Technologies Pvt. Ltd.
iW-RainboW-G15D Linux User Manual
5.1.2
USB OTG as device
Connect OTG Cable to OTG Port
To change the directory to kernel modules, execute the below command
root@iWave-G15~/$cd /lib/modules/4.xx.xx-xx/kernel/
Execute below command to insert the file storage module.
root@iWave-G15/lib/modules/4.xx.xx-xx /kernel~/$insmod fs/configfs/configfs.ko
root@iWave-G15/lib/modules/4.xx.xx-xx /kernel~/$insmod drivers/usb/gadget/libcomposite.ko
root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$insmod
drivers/usb/gadget/function/usb_f_mass_storage.ko
root@iWave-G15/lib/modules/4.xx.xx-xx/kernel~/$insmod
drivers/usb/gadget/legacy/g_mass_storage.ko file=/dev/mmcblk2p1 removable=1
After successful module registration, it shows the below debug message.
Mass Storage Function, version: 2009/09/11
LUN: removable file: (no medium)
LUN: removable file: /dev/mmcblk0p1
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@iWave-G15:/lib/modules/4.1.15-2.1.0+gb63f3f5/kernel# g_mass_storage gadget: high-speed
config #1: Linux File-Backed Storage
Then the files and folders from iW-RainboW-G15M-Q7 platform’s eMMC will be displayed on Windows Host
PC as shown in the figure below.