1{ 2 "jobs" : [{ 3 "name" : "boot", 4 "cmds" : [ 5 "mkdir /dev/usb-ffs 0770 shell shell", 6 "mkdir /dev/usb-ffs/hdc 0770 shell shell", 7 "mount configfs none /config", 8 "mkdir /config/usb_gadget/g1 0770 shell shell", 9 "write /config/usb_gadget/g1/idVendor 0x12D1", 10 "write /config/usb_gadget/g1/idProduct 0x5000", 11 "write /config/usb_gadget/g1/os_desc/use 1", 12 "write /config/usb_gadget/g1/bcdDevice 0x0223", 13 "write /config/usb_gadget/g1/bcdUSB 0x0200", 14 "mkdir /config/usb_gadget/g1/strings/0x409 0770", 15 "copy /sys/block/mmcblk0/device/cid /config/usb_gadget/g1/strings/0x409/serialnumber", 16 "write /config/usb_gadget/g1/strings/0x409/manufacturer HISILICON", 17 "write /config/usb_gadget/g1/strings/0x409/product \"HDC Device\"", 18 "mkdir /config/usb_gadget/g1/functions/ffs.hdc", 19 "mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell", 20 "mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell", 21 "write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1", 22 "write /config/usb_gadget/g1/os_desc/qw_sign MSFT100", 23 "write /config/usb_gadget/g1/configs/b.1/bmAttributes 0xc0", 24 "write /config/usb_gadget/g1/configs/b.1/MaxPower 500", 25 "symlink /config/usb_gadget/g1/configs/b.1 /config/usb_gadget/g1/os_desc/b.1", 26 "mount functionfs hdc /dev/usb-ffs/hdc uid=2000,gid=2000", 27 "setparam sys.usb.configfs 1", 28 "setparam sys.usb.controller 5100000.udc-controller" 29 ] 30 }, { 31 "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1", 32 "condition" : "sys.usb.config=none && sys.usb.configfs=1", 33 "cmds" : [ 34 "write /config/usb_gadget/g1/os_desc/use 0", 35 "setparam sys.usb.ffs.ready 0" 36 ] 37 }, { 38 "name" : "param:init.svc.hdcd=stopped", 39 "condition" : "init.svc.hdcd=stopped", 40 "cmds" : [ 41 "setparam sys.usb.ffs.ready 0" 42 ] 43 }, { 44 "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1", 45 "condition" : "sys.usb.config=hdc && sys.usb.configfs=1", 46 "cmds" : [ 47 "write /config/usb_gadget/g1/idProduct 0x5000", 48 "write /config/usb_gadget/g1/os_desc/use 1" 49 ] 50 } 51 ] 52} 53