From a2f5248a32b6a57ef5701accd7de10c9bf8d537a Mon Sep 17 00:00:00 2001 From: sun_fan Date: Tue, 6 Jul 2021 23:42:38 +0800 Subject: [PATCH] updater: modify cfg Signed-off-by: sun_fan --- ohos.build | 2 ++ services/BUILD.gn | 10 +++++++ services/etc/updater_init.cfg | 56 +++++++++++++++++++++++++++++++++++ 3 files changed, 68 insertions(+) create mode 100755 services/etc/updater_init.cfg diff --git a/ohos.build b/ohos.build index 7f2d692d..123b489a 100644 --- a/ohos.build +++ b/ohos.build @@ -3,6 +3,8 @@ "parts": { "updater": { "module_list": [ + "//base/update/updater/services:updater_init.cfg", + "//base/update/updater/services:init.Hi3516DV300.updater.cfg", "//base/update/updater/services/package:libupdaterpackage", "//base/update/updater/services/script:libupdaterscript", "//base/update/updater/services/log:libupdaterlog", diff --git a/services/BUILD.gn b/services/BUILD.gn index 3be4bad4..59a09ba1 100644 --- a/services/BUILD.gn +++ b/services/BUILD.gn @@ -15,6 +15,16 @@ import("//build/ohos.gni") SUBSYSTEM_DIR = "//base/update/updater" +ohos_prebuilt_etc("updater_init.cfg") { + source = "//base/update/updater/services/etc/updater_init.cfg" + part_name = "updater" +} + +ohos_prebuilt_etc("init.Hi3516DV300.updater.cfg") { + source = "//device/hisilicon/hi3516dv300/build/rootfs/init.Hi3516DV300.updater.cfg" + part_name = "updater" +} + ohos_executable("updater") { defines = [ "BUILD_OHOS" ] sources = [ diff --git a/services/etc/updater_init.cfg b/services/etc/updater_init.cfg new file mode 100755 index 00000000..54221af2 --- /dev/null +++ b/services/etc/updater_init.cfg @@ -0,0 +1,56 @@ +{ + "import" : [ + "/init.Hi3516DV300.updater.cfg" + ], + "jobs" : [{ + "name" : "pre-init", + "cmds" : [ + "start ueventd" + ] + }, { + "name" : "init", + "cmds" : [ + "mkdir /system", + "mkdir /vendor", + "mkdir /odm", + "mkdir /hos", + "mkdir /tmp", + "mount tmpfs tmpfs /tmp", + "chown 0 2000 /tmp", + "chmod 0755 /tmp" + ] + }, { + "name" : "post-init", + "cmds" : [ + "start updater", + "start shell" + ] + } + ], + "services" : [{ + "name" : "shell", + "path" : ["/system/bin/sh"], + "uid" : 0, + "gid" : 2000, + "once" : 0, + "importance" : 0, + "caps" : [4294967295] + }, { + "name" : "updater", + "path" : ["/system/bin/updater"], + "uid" : 0, + "gid" : 0, + "once" : 1, + "importance" : 0, + "caps" : [0, 1] + }, { + "name" : "ueventd", + "path" : ["/system/bin/updaterueventd"], + "uid" : 0, + "gid" : 2000, + "once" : 0, + "importance" : 0, + "caps" : [0, 1] + } + ] +} -- Gitee