• 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.
13import("//base/startup/init/begetd.gni")
14if (!defined(ohos_lite)) {
15  import("//build/ohos.gni")
16  import("//build/ohos/sa_profile/sa_profile.gni")
17
18  ohos_sa_profile("device_info_profile") {
19    sources = [ "etc/3902.json" ]
20    part_name = "init"
21  }
22
23  ohos_prebuilt_etc("device_info.cfg") {
24    source = "etc/deviceinfoservice.cfg"
25    relative_install_dir = "init"
26    part_name = "init"
27    subsystem_name = "startup"
28  }
29
30  ohos_shared_library("deviceinfoservice") {
31    sources = [
32      "//base/startup/init/interfaces/innerkits/syspara/param_comm.c",
33      "device_info_stub.cpp",
34    ]
35
36    branch_protector_ret = "pac_ret"
37    sanitize = {
38      cfi = true
39      cfi_cross_dso = true
40      debug = false
41    }
42
43    shlib_type = "sa"
44
45    include_dirs = [
46      "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include/",
47      ".",
48      "//base/startup/init/interfaces/innerkits/include",
49      "//base/startup/init/interfaces/innerkits/include/param",
50      "//base/startup/init/interfaces/innerkits/include/syspara",
51      "//base/startup/init/interfaces/innerkits/syspara",
52      "//base/startup/init/interfaces/hals",
53    ]
54    defines = [
55      "INIT_AGENT",
56      "_GNU_SOURCE",
57      "USE_MBEDTLS",
58      "DINFO_TAG=\"DeviceInfoService\"",
59    ]
60    deps = [
61      "//base/startup/init/interfaces/innerkits:libbegetutil",
62      "//base/startup/init/services/log:agent_log",
63      "//base/startup/init/services/modules/udid:libudidcomm",
64      "//base/startup/init/services/utils:libinit_utils",
65      "//third_party/bounds_checking_function:libsec_shared",
66    ]
67
68    external_deps = [
69      "access_token:libaccesstoken_sdk",
70      "c_utils:utils",
71      "ipc:ipc_core",
72      "safwk:system_ability_fwk",
73      "samgr:samgr_proxy",
74    ]
75    install_images = [ "system" ]
76    part_name = "init"
77    subsystem_name = "startup"
78  }
79}
80
81group("device_info_group") {
82  if (!defined(ohos_lite) && enable_ohos_startup_init_feature_deviceinfo) {
83    deps = [
84      ":device_info.cfg",
85      ":device_info_profile",
86      ":deviceinfoservice",
87    ]
88  }
89}
90