1# Copyright (c) 2020-2022 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.
13import("//base/startup/init/begetd.gni")
14group("startup_init") {
15  deps = []
16
17  # for liteos
18  if (defined(ohos_lite) && ohos_kernel_type != "liteos_m") {
19    deps = [
20      "etc:etc_files",
21      "init/lite:init",
22    ]
23
24    # for unittest
25    if (ohos_build_type == "debug") {
26      deps += [ "//base/startup/init/test/unittest/lite:init_test" ]
27    }
28  }
29
30  # for standard
31  if (!defined(ohos_lite)) {
32    deps = [
33      "etc:etc_files",
34      "init/standard:init",
35    ]
36    data_deps = [ "init/standard:init_early" ]
37    deps += [ "//base/startup/init/services/etc:watchdog.cfg" ]
38    deps += [ "//base/startup/init/services/etc:ueventd.cfg" ]
39    external_deps = [
40      "e2fsprogs:blkid",
41      "e2fsprogs:e2fsck",
42      "e2fsprogs:e2fsdroid",
43      "e2fsprogs:libext2_blkid",
44      "e2fsprogs:libext2_com_err",
45      "e2fsprogs:libext2_e2p",
46      "e2fsprogs:libext2_misc",
47      "e2fsprogs:libext2_quota",
48      "e2fsprogs:libext2_uuid",
49      "e2fsprogs:libext2fs",
50      "e2fsprogs:mke2fs",
51      "e2fsprogs:resize2fs",
52    ]
53
54    if (use_musl) {
55      external_deps += [
56        "f2fs-tools:fsck.f2fs",
57        "f2fs-tools:libf2fs",
58        "f2fs-tools:mkfs.f2fs",
59      ]
60    }
61
62    if (enable_ohos_startup_init_feature_watcher) {
63      deps += [
64        "//base/startup/init/services/param/watcher:param_watcher",
65        "//base/startup/init/services/param/watcher:param_watcher.rc",
66        "//base/startup/init/services/param/watcher/sa_profile:param_watcher_profile",
67      ]
68    }
69  }
70}
71