• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# Copyright (c) 2021 Huawei Device Co., Ltd.
2# Licensed under the Apache License, Version 2.0 (the "License");
3# you may not use this file except in compliance with the License.
4# You may obtain a copy of the License at
5#
6#     http://www.apache.org/licenses/LICENSE-2.0
7#
8# Unless required by applicable law or agreed to in writing, software
9# distributed under the License is distributed on an "AS IS" BASIS,
10# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
11# See the License for the specific language governing permissions and
12# limitations under the License.
13
14import("//base/update/updater/updater_default_cfg.gni")
15import("//build/ohos.gni")
16
17updater_path = rebase_path("${updater_absolutely_path}", ".")
18
19updater_normal_path = "${updater_path}/services/etc/updater_normal.cfg"
20if (!ohos_indep_compiler_enable) {
21updater_usb_init_cfg_path = "//base/startup/init/services/etc/init.usb.cfg"
22updater_init_usb_configfs_path_cfg =
23    "//drivers/peripheral/usb/cfg/init.usb.configfs.cfg"
24updater_faultloggerd_cfg =
25    "//base/hiviewdfx/faultloggerd/services/config/faultloggerd.cfg"
26
27ohos_prebuilt_etc("updater_faultloggerd.cfg") {
28  source = "${updater_faultloggerd_cfg}"
29  install_images = [ "updater" ]
30  subsystem_name = "updater"
31  part_name = "updater"
32}
33}
34
35ohos_prebuilt_etc("updater_common.cfg") {
36  source = "updater_common.cfg"
37  install_images = [ "updater" ]
38  subsystem_name = "updater"
39  part_name = "updater"
40}
41
42ohos_prebuilt_etc("updater_hdcd.cfg") {
43  source = "updater_hdcd.cfg"
44  install_images = [ "updater" ]
45  subsystem_name = "updater"
46  part_name = "updater"
47}
48if (!ohos_indep_compiler_enable) {
49ohos_prebuilt_etc("updater_init_usb.cfg") {
50  source = "${updater_usb_init_cfg_path}"
51  install_images = [ "updater" ]
52  subsystem_name = "updater"
53  part_name = "updater"
54}
55
56ohos_prebuilt_etc("updater_init_usb_configfs.cfg") {
57  source = "${updater_init_usb_configfs_path_cfg}"
58  install_images = [ "updater" ]
59  subsystem_name = "updater"
60  part_name = "updater"
61}
62}
63
64ohos_prebuilt_etc("updater_normal.cfg") {
65  source = "${updater_normal_path}"
66  module_install_dir = "etc/init"
67  install_images = [ "system" ]
68  subsystem_name = "updater"
69  part_name = "updater"
70}
71
72group("updater_files") {
73  deps = [
74    ":updater_common.cfg",
75    ":updater_normal.cfg",
76  ]
77  if (!ohos_indep_compiler_enable) {
78    deps += [
79      ":updater_faultloggerd.cfg",
80      ":updater_init_usb.cfg",
81      ":updater_init_usb_configfs.cfg",
82    ]
83  }
84  if (build_variant == "root") {
85    deps += [ ":updater_hdcd.cfg" ]
86  }
87}
88