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.xml" ] 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 include_dirs = [ 37 "//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include/", 38 ".", 39 "//base/startup/init/services/include/param", 40 "//base/startup/init/interfaces/innerkits/include", 41 "//base/startup/init/interfaces/innerkits/include/syspara", 42 "//base/startup/init/interfaces/innerkits/syspara", 43 "//base/startup/init/interfaces/hals", 44 ] 45 defines = [ 46 "INIT_AGENT", 47 "_GNU_SOURCE", 48 "USE_MBEDTLS", 49 ] 50 deps = [ 51 "//base/startup/init/interfaces/innerkits:libbegetutil", 52 "//third_party/bounds_checking_function:libsec_shared", 53 "//third_party/mbedtls:mbedtls_shared", 54 ] 55 56 external_deps = [ 57 "access_token:libaccesstoken_sdk", 58 "c_utils:utils", 59 "ipc:ipc_core", 60 "safwk:system_ability_fwk", 61 ] 62 install_images = [ "system" ] 63 part_name = "init" 64 subsystem_name = "startup" 65 } 66} 67 68group("device_info_group") { 69 if (!defined(ohos_lite) && enable_ohos_startup_init_feature_deviceinfo) { 70 deps = [ 71 ":device_info.cfg", 72 ":device_info_profile", 73 ":deviceinfoservice", 74 ] 75 } 76} 77