From 819c2faf145adc1dc64b1d6433120b36197c310b Mon Sep 17 00:00:00 2001 From: wu-chengwen Date: Mon, 5 Sep 2022 19:19:43 +0800 Subject: [PATCH] fix(usb):move init.usb.configfs.cfg to drivers Signed-off-by: wu-chengwen --- services/etc/BUILD.gn | 6 -- services/etc/init.usb.configfs.cfg | 98 ------------------------------ 2 files changed, 104 deletions(-) delete mode 100755 services/etc/init.usb.configfs.cfg diff --git a/services/etc/BUILD.gn b/services/etc/BUILD.gn index cd0e9d58f..d9d71f86a 100755 --- a/services/etc/BUILD.gn +++ b/services/etc/BUILD.gn @@ -110,11 +110,6 @@ if (defined(ohos_lite)) { part_name = "init" } - ohos_prebuilt_etc("init.usb.configfs.cfg") { - source = "//base/startup/init/services/etc/init.usb.configfs.cfg" - part_name = "init" - } - ohos_prebuilt_para("ohos.para") { source = "//base/startup/init/services/etc/param/ohos.para" install_images = [ @@ -223,7 +218,6 @@ if (defined(ohos_lite)) { ":init.cfg", ":init.reboot", ":init.usb.cfg", - ":init.usb.configfs.cfg", ":misc.cfg", ":ohos.para", ":ohos.para.dac", diff --git a/services/etc/init.usb.configfs.cfg b/services/etc/init.usb.configfs.cfg deleted file mode 100755 index 64f669674..000000000 --- a/services/etc/init.usb.configfs.cfg +++ /dev/null @@ -1,98 +0,0 @@ -{ - "jobs" : [{ - "name" : "param:sys.usb.config=none && param:sys.usb.configfs=1", - "condition" : "sys.usb.config=none && sys.usb.configfs=1", - "cmds" : [ - "write /config/usb_gadget/g1/UDC none", - "stop hdcd", - "setparam sys.usb.ffs.ready 0", - "write /config/usb_gadget/g1/bDeviceClass 0", - "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/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}" - ] - }, { - "name" : "param:startup.service.ctl.hdcd=5", - "condition" : "startup.service.ctl.hdcd=5", - "cmds" : [ - "setparam sys.usb.ffs.ready 0" - ] - }, { - "name" : "param:sys.usb.config=hdc && param:sys.usb.configfs=1", - "condition" : "sys.usb.config=hdc && sys.usb.configfs=1", - "cmds" : [ - "start hdcd" - ] - }, { - "name" : "param:sys.usb.ffs.ready=1 && param:sys.usb.config=hdc && param:sys.usb.configfs=1", - "condition" : "sys.usb.ffs.ready=1 && sys.usb.config=hdc && sys.usb.configfs=1", - "cmds" : [ - "write /config/usb_gadget/g1/configs/b.1/strings/0x409/configuration 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=rndis && param:sys.usb.configfs=1", - "condition" : "sys.usb.config=rndis && sys.usb.configfs=1", - "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/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}" - ] - } - ] -}