提交 eecf29fa 编写于 作者: Y yannikli

Add usb rndis storage

Signed-off-by: Nyannikli <liyanqing18@huawei.com>
Change-Id: I6ee88823566124418d62c9f0f8828d5372249ded
上级 91ca5757
......@@ -10,7 +10,10 @@
"write /config/usb_gadget/g1/bDeviceSubClass 0",
"write /config/usb_gadget/g1/bDeviceProtocol 0",
"rm /config/usb_gadget/g1/configs/b.1/f1",
"rm /config/usb_gadget/g1/functions/rndis.rn0",
"rm /config/usb_gadget/g1/configs/b.1/rndis.rn0",
"rmdir /config/usb_gadget/g1/functions/rndis.rn0",
"rm /config/usb_gadget/g1/configs/b.1/mass_storage.usb",
"rmdir /config/usb_gadget/g1/functions/mass_storage.usb",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
......@@ -40,7 +43,53 @@
"cmds" : [
"mkdir /config/usb_gadget/g1/functions/rndis.rn0",
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration rndis",
"symlink /config/usb_gadget/g1/functions/rndis.rn0 /config/usb_gadget/g1/configs/b.1/f1",
"symlink /config/usb_gadget/g1/functions/rndis.rn0 /config/usb_gadget/g1/configs/b.1/rndis.rn0",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=rndis_hdc && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=rndis_hdc && sys.usb.configfs=1",
"cmds" : [
"mkdir /config/usb_gadget/g1/functions/rndis.rn0",
"symlink /config/usb_gadget/g1/functions/rndis.rn0 /config/usb_gadget/g1/configs/b.1/rndis.rn0",
"start hdcd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=rndis_hdc && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=rndis_hdc && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration rndis_hdc",
"symlink /config/usb_gadget/g1/functions/ffs.hdc /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=storage && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=storage && sys.usb.configfs=1",
"cmds" : [
"mkdir /config/usb_gadget/g1/functions/mass_storage.usb",
"write /config/usb_gadget/g1/functions/mass_storage.usb/lun.0/file /dev/block/mmcblk0p11",
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration mass_storage",
"symlink /config/usb_gadget/g1/functions/mass_storage.usb /config/usb_gadget/g1/configs/b.1/mass_storage.usb",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
}, {
"name" : "param:sys.usb.config=storage_hdc && param:sys.usb.configfs=1",
"condition" : "sys.usb.config=storage_hdc && sys.usb.configfs=1",
"cmds" : [
"mkdir /config/usb_gadget/g1/functions/mass_storage.usb",
"write /config/usb_gadget/g1/functions/mass_storage.usb/lun.0/file /dev/block/mmcblk0p11",
"symlink /config/usb_gadget/g1/functions/mass_storage.usb /config/usb_gadget/g1/configs/b.1/mass_storage.usb",
"start hdcd"
]
}, {
"name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=storage_hdc && param:sys.usb.configfs=1",
"condition" : "sys.usb.ffs.ready=1 && sys.usb.config=storage_hdc && sys.usb.configfs=1",
"cmds" : [
"write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration storage_hdc",
"symlink /config/usb_gadget/g1/functions/ffs.hdc /config/usb_gadget/g1/configs/b.1/f1",
"write /config/usb_gadget/g1/UDC ${sys.usb.controller}",
"setparam sys.usb.state ${sys.usb.config}"
]
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册