1{ 2 "jobs" : [{ 3 "name" : "boot", 4 "cmds" : [ 5 "mkdir /config 0770 shell shell", 6 "mkdir /dev/usb-ffs 0770 shell shell", 7 "mkdir /dev/usb-ffs/hdc 0770 shell shell", 8 "mount configfs none /config", 9 "mkdir /config/usb_gadget/g1 0770 shell shell", 10 "write /config/usb_gadget/g1/idVendor 0x2207", 11 "write /config/usb_gadget/g1/idProduct 0x0018", 12 "write /config/usb_gadget/g1/os_desc/use 1", 13 "write /config/usb_gadget/g1/bcdDevice 0x0223", 14 "write /config/usb_gadget/g1/bcdUSB 0x0200", 15 "mkdir /config/usb_gadget/g1/strings/0x409 0770", 16 "copy /sys/block/mmcblk0/device/cid /config/usb_gadget/g1/strings/0x409/serialnumber", 17 "write /config/usb_gadget/g1/strings/0x409/manufacturer Rockchip", 18 "write /config/usb_gadget/g1/strings/0x409/product \"HDC Device\"", 19 "mkdir /config/usb_gadget/g1/functions/ffs.hdc", 20 "mkdir /config/usb_gadget/g1/configs/b.1 0770 shell shell", 21 "mkdir /config/usb_gadget/g1/configs/b.1/strings/0x409 0770 shell shell", 22 "write /config/usb_gadget/g1/os_desc/b_vendor_code 0x1", 23 "write /config/usb_gadget/g1/os_desc/qw_sign MSFT100", 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 fcc00000.dwc3" 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:updater.hdc.configfs=1", 45 "condition" : "updater.hdc.configfs=1", 46 "cmds" : [ 47 "setparam sys.usb.config hdc" 48 ] 49 }, { 50 "name" : "param:updater.flashd.configfs=1", 51 "condition" : "updater.flashd.configfs=1", 52 "cmds" : [ 53 "stop hdcd", 54 "setparam sys.usb.config flashd" 55 ] 56 }, { 57 "name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=flashd && param:sys.usb.configfs=1", 58 "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=flashd && sys.usb.configfs=1", 59 "cmds" : [ 60 "write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration hdc", 61 "symlink /config/usb_gadget/g1/functions/ffs.hdc /config/usb_gadget/g1/configs/b.1/f1", 62 "write /config/usb_gadget/g1/UDC ${sys.usb.controller}", 63 "setparam sys.usb.state ${sys.usb.config}" 64 ] 65 }, { 66 "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1", 67 "condition" : "sys.usb.config=hdc && sys.usb.configfs=1", 68 "cmds" : [ 69 "write /config/usb_gadget/g1/idProduct 0x5000", 70 "write /config/usb_gadget/g1/os_desc/use 1" 71 ] 72 } 73 ] 74}