|
【技术讨论】
linux usbgadget问题
发表于 2019-4-24 11:45:29
浏览:7362
|
回复:3
打印
只看该作者
[复制链接]
楼主
我想将/dev/ram0用USB gadget mass_storage将它模拟成U盘,按步骤操作完成后ubuntu弹出图标但是提示"不能挂载 无法打开MTP设备'[usb:002,014]'",请教大神帮忙看看是什么问题? 下面是我的操作步骤:
mount -t configfs none /sys/kernel/config/
cd /sys/kernel/config/usb_gadget/
mkdir g1
cd g1/
echo "0xABCD" >idVendor
echo "0x1017" >idProduct
mkdir strings/0x409/
echo "012345678ABCDEF" >strings/0x409/serialnumber
echo "Dragon" >strings/0x409/manufacturer
echo "DragonMSC" >strings/0x409/product
mkdir functions/mass_storage.usb0
echo /dev/mmcblk1p1 >functions/mass_storage.usb0/lun.0/file
mkdir configs/c.1 mkdir configs/c.1/strings/0x409/
echo "abc" > configs/c.1/strings/0x409/configuration
cat configs/c.1/strings/0x409/configuration
ln -s functions/mass_storage.usb0/ configs/c.1/
ls /sys/class/udc/
echo ci_hdrc.0 >UDC
|
|