mirror of
https://gitee.com/openharmony/startup_init
synced 2024-12-04 09:14:00 +00:00
665ab179fb
Signed-off-by: sun_fan <sun_fan1@hoperun.com>
238 lines
6.6 KiB
Plaintext
Executable File
238 lines
6.6 KiB
Plaintext
Executable File
# Copyright (c) 2020 Huawei Device Co., Ltd.
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
import("//build/ohos.gni")
|
|
|
|
declare_args() {
|
|
param_security = "dac"
|
|
param_test = "false"
|
|
}
|
|
|
|
ohos_prebuilt_etc("param_watcher.rc") {
|
|
if (use_musl) {
|
|
source = "watcher/etc/param_watcher.cfg"
|
|
} else {
|
|
source = "watcher/etc/param_watcher.rc"
|
|
}
|
|
relative_install_dir = "init"
|
|
part_name = "init"
|
|
}
|
|
|
|
ohos_static_library("param_service") {
|
|
sources = [
|
|
"//base/startup/init_lite/services/utils/init_utils.c",
|
|
"//base/startup/init_lite/services/utils/list.c",
|
|
"adapter/param_libuvadp.c",
|
|
"adapter/param_persistadp.c",
|
|
"manager/param_manager.c",
|
|
"manager/param_message.c",
|
|
"manager/param_trie.c",
|
|
"manager/param_utils.c",
|
|
"service/param_persist.c",
|
|
"service/param_service.c",
|
|
"trigger/trigger_checker.c",
|
|
"trigger/trigger_manager.c",
|
|
"trigger/trigger_processor.c",
|
|
]
|
|
|
|
include_dirs = [
|
|
"include",
|
|
"adapter",
|
|
"//base/startup/init_lite/services/include/param",
|
|
"//base/startup/init_lite/services/include",
|
|
"//base/startup/init_lite/services/init/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//third_party/libuv/include",
|
|
"//third_party/cJSON",
|
|
]
|
|
|
|
defines = [ "PARAM_SUPPORT_SAVE_PERSIST" ]
|
|
|
|
if (param_test == "true") {
|
|
defines += [ "PARAM_TEST" ]
|
|
}
|
|
|
|
if (param_security == "selinux") {
|
|
sources += [ "adapter/param_selinux.c" ]
|
|
defines += [ "PARAM_SUPPORT_SELINUX" ]
|
|
} else {
|
|
sources += [ "adapter/param_dac.c" ]
|
|
defines += [ "PARAM_SUPPORT_DAC" ]
|
|
}
|
|
|
|
deps = [
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
"//third_party/libuv:uv_static",
|
|
]
|
|
part_name = "init"
|
|
subsystem_name = "startup"
|
|
}
|
|
|
|
ohos_shared_library("param_client") {
|
|
sources = [
|
|
"//base/startup/init_lite/services/utils/init_utils.c",
|
|
"client/param_request.c",
|
|
"manager/param_manager.c",
|
|
"manager/param_message.c",
|
|
"manager/param_trie.c",
|
|
"manager/param_utils.c",
|
|
]
|
|
|
|
include_dirs = [
|
|
"include",
|
|
"//base/startup/init_lite/services/include/param",
|
|
"//base/startup/init_lite/services/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//base/hiviewdfx/hilog/interfaces/native/innerkits/include",
|
|
"//third_party/libuv/include",
|
|
]
|
|
|
|
defines = [ "INIT_AGENT" ]
|
|
|
|
if (param_security == "selinux") {
|
|
sources += [ "adapter/param_selinux.c" ]
|
|
defines += [ "PARAM_SUPPORT_SELINUX" ]
|
|
} else {
|
|
sources += [ "adapter/param_dac.c" ]
|
|
defines += [ "PARAM_SUPPORT_DAC" ]
|
|
}
|
|
|
|
if (param_test == "true") {
|
|
defines += [ "PARAM_TEST" ]
|
|
}
|
|
|
|
deps = [
|
|
"//base/startup/init_lite/services/log:agent_log",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
]
|
|
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
|
install_images = [
|
|
"system",
|
|
"updater",
|
|
]
|
|
part_name = "init"
|
|
}
|
|
|
|
ohos_shared_library("param_watcheragent") {
|
|
sources = [
|
|
"watcher/agent/watcher.cpp",
|
|
"watcher/agent/watcher_manager_kits.cpp",
|
|
"watcher/agent/watcher_manager_proxy.cpp",
|
|
"watcher/agent/watcher_stub.cpp",
|
|
]
|
|
|
|
include_dirs = [
|
|
"include",
|
|
"//base/startup/init_lite/services/include/param",
|
|
"//base/startup/init_lite/services/param/watcher/include",
|
|
"//base/startup/init_lite/services/param/watcher/agent",
|
|
"//base/startup/init_lite/services/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//base/update/updateservice/interfaces/innerkits/include",
|
|
]
|
|
|
|
defines = [ "INIT_AGENT" ]
|
|
|
|
deps = [
|
|
"//base/startup/init_lite/services/log:agent_log",
|
|
"//base/startup/init_lite/services/param:param_client",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
"//utils/native/base:utils",
|
|
]
|
|
|
|
external_deps = [
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"ipc:ipc_core",
|
|
"safwk:system_ability_fwk",
|
|
"samgr_L2:samgr_proxy",
|
|
]
|
|
|
|
part_name = "init"
|
|
}
|
|
|
|
ohos_shared_library("param_watcher") {
|
|
sources = [
|
|
"watcher/proxy/watcher_manager.cpp",
|
|
"watcher/proxy/watcher_manager_stub.cpp",
|
|
"watcher/proxy/watcher_proxy.cpp",
|
|
]
|
|
|
|
include_dirs = [
|
|
"include",
|
|
"//base/startup/init_lite/services/include/param",
|
|
"//base/startup/init_lite/services/param/watcher/proxy",
|
|
"//base/startup/init_lite/services/param/watcher/include",
|
|
"//base/startup/init_lite/services/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//third_party/libuv/include",
|
|
"//third_party/cJSON",
|
|
"//utils/native/base/include",
|
|
"//utils/system/safwk/native/include",
|
|
"//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include",
|
|
"//foundation/distributedschedule/safwk/services/safwk/include",
|
|
"//foundation/distributedschedule/safwk/interfaces/innerkits/safwk",
|
|
"//foundation/distributedschedule/samgr/adapter/interfaces/innerkits/include",
|
|
"//foundation/distributedschedule/samgr/interfaces/innerkits/samgr_proxy/include",
|
|
]
|
|
|
|
defines = [ "INIT_AGENT" ]
|
|
|
|
deps = [
|
|
"//base/startup/init_lite/services/log:agent_log",
|
|
"//base/startup/init_lite/services/param:param_client",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
"//utils/native/base:utils",
|
|
]
|
|
|
|
external_deps = [
|
|
"hiviewdfx_hilog_native:libhilog",
|
|
"ipc:ipc_core",
|
|
"safwk:system_ability_fwk",
|
|
"samgr_L2:samgr_proxy",
|
|
]
|
|
install_images = [ "system" ]
|
|
part_name = "init"
|
|
}
|
|
|
|
ohos_executable("param") {
|
|
sources = [ "cmd/param_cmd.c" ]
|
|
include_dirs = [
|
|
"include",
|
|
"//base/startup/init_lite/services/include/param",
|
|
"//base/startup/init_lite/services/include",
|
|
"//base/startup/init_lite/services/log",
|
|
"//base/update/updateservice/interfaces/innerkits/include",
|
|
]
|
|
|
|
defines = [ "INIT_AGENT" ]
|
|
|
|
deps = [
|
|
"//base/startup/init_lite/services/log:agent_log",
|
|
"//base/startup/init_lite/services/param:param_client",
|
|
"//third_party/bounds_checking_function:libsec_static",
|
|
]
|
|
|
|
external_deps = [ "hiviewdfx_hilog_native:libhilog" ]
|
|
|
|
if (param_test == "true") {
|
|
defines += [ "PARAM_TEST" ]
|
|
deps += [ "//base/startup/init_lite/services/param:param_watcheragent" ]
|
|
} else {
|
|
install_images = [
|
|
"system",
|
|
"updater",
|
|
]
|
|
}
|
|
install_enable = true
|
|
part_name = "init"
|
|
}
|