Signed-off-by: chenshixu1 <chenshixu1@huawei.com>
Change-Id: I1e91900de1beecc28a54bab87f06715dd88b4d94
This commit is contained in:
chenshixu1 2024-03-09 08:52:35 +08:00
parent 44b52fe977
commit df05500b61
39 changed files with 651 additions and 733 deletions

View File

@ -1,148 +1,173 @@
{
"name": "@ohos/init",
"description": "ohos init process",
"homePage": "https://gitee.com/openharmony",
"version": "4.0.2",
"license": "Apache License 2.0",
"repository": "https://gitee.com/openharmony/startup_init",
"supplier": "Organization: OpenHarmony",
"publishAs": "code-segment",
"segment": {
"destPath": "base/startup/init"
},
"dirs": {},
"scripts": {},
"component": {
"name": "init",
"subsystem": "startup",
"syscap": [
"SystemCapability.Startup.SystemInfo",
"SystemCapability.Startup.SystemInfo.Lite",
"SystemCapability.Base"
],
"adapted_system_type": [
"mini",
"small",
"standard"
],
"rom": "3.9MB",
"ram": "8356KB",
"hisysevent_config": [
"//base/startup/init/services/modules/sysevent/init_events.yaml"
],
"deps": {
"components": [
"safwk",
"c_utils",
"napi",
"ipc",
"config_policy",
"hilog",
"hilog_lite",
"samgr",
"selinux_adapter",
"access_token",
"common",
"dsoftbus",
"hvb",
"hisysevent",
"bounds_checking_function",
"bundle_framework",
"hiprofiler"
],
"third_party": [
"bounds_checking_function",
"selinux",
"libunwind",
"mbedtls",
"zlib",
"cJSON",
"mksh",
"toybox"
]
},
"build": {
"group_type": {
"base_group": [
],
"fwk_group": [
"//base/startup/init/services:startup_init",
"//base/startup/init/services/begetctl:begetctl_cmd",
"//base/startup/init/services/loopevent:loopeventgroup",
"//base/startup/init/services/modules:modulesgroup",
"//base/startup/init/services/param:parameter",
"//base/startup/init/interfaces/innerkits:innergroup",
"//base/startup/init/device_info:device_info_group",
"//base/startup/init/interfaces/kits:kitsgroup"
],
"service_group": [
"//base/startup/init/watchdog:watchdog",
"//base/startup/init/ueventd:startup_ueventd"
]
},
"inner_kits": [
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/",
"header_files": [
"init_socket.h",
"init_file.h",
"init_reboot.h",
"service_control.h",
"beget_ext.h",
"systemcapability.h",
"syspara/parameter.h",
"syspara/parameters.h",
"syspara/param_wrapper.h",
"syspara/sysparam_errno.h",
"syspara/sysversion.h",
"param/init_param.h"
]
},
"name": "//base/startup/init/interfaces/innerkits:libbegetutil"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/fs_manager/",
"header_files": [
"fs_manager.h"
]
},
"name": "//base/startup/init/interfaces/innerkits/fs_manager:libfsmanager_static"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/",
"header_files": [
"service_watcher.h",
"syspara/parameter.h",
"syspara/sysparam_errno.h"
]
},
"name": "//base/startup/init/interfaces/innerkits:libbeget_proxy"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits",
"header_files": [
"init_module_engine/include/init_module_engine.h"
]
},
"name": "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/seccomp/include/",
"header_files": [
"seccomp_policy.h"
]
},
"name": "//base/startup/init/interfaces/innerkits/seccomp:seccomp"
}
],
"test": [
"//base/startup/init/test:testgroup"
]
}
}
}
{
"name": "@ohos/init",
"description": "ohos init process",
"homePage": "https://gitee.com/openharmony",
"version": "4.0.2",
"license": "Apache License 2.0",
"repository": "https://gitee.com/openharmony/startup_init",
"supplier": "Organization: OpenHarmony",
"publishAs": "code-segment",
"segment": {
"destPath": "base/startup/init"
},
"dirs": {},
"scripts": {},
"component": {
"name": "init",
"subsystem": "startup",
"syscap": [
"SystemCapability.Startup.SystemInfo",
"SystemCapability.Startup.SystemInfo.Lite",
"SystemCapability.Base"
],
"adapted_system_type": [
"mini",
"small",
"standard"
],
"rom": "3.9MB",
"ram": "8356KB",
"hisysevent_config": [
"//base/startup/init/services/modules/sysevent/init_events.yaml"
],
"deps": {
"components": [
"safwk",
"c_utils",
"napi",
"ipc",
"config_policy",
"hilog",
"hilog_lite",
"samgr",
"access_token",
"common",
"dsoftbus",
"hvb",
"hisysevent",
"hiprofiler",
"bounds_checking_function",
"bundle_framework",
"selinux",
"selinux_adapter",
"storage_service",
"mbedtls",
"zlib"
],
"third_party": [
"bounds_checking_function",
"selinux",
"libunwind",
"mbedtls",
"zlib",
"cJSON",
"mksh",
"toybox",
"config_policy",
"e2fsprogs",
"f2fs-tools",
"selinux_adapter",
"storage_service"
]
},
"data_deps" : [
"e2fsprogs:blkid",
"e2fsprogs:e2fsck",
"e2fsprogs:libext2_blkid",
"e2fsprogs:mke2fs",
"e2fsprogs:resize2fs",
"e2fsprogs:e2fsdroid"
],
"build": {
"group_type": {
"base_group": [
],
"fwk_group": [
"//base/startup/init/services:startup_init",
"//base/startup/init/services/begetctl:begetctl_cmd",
"//base/startup/init/services/loopevent:loopeventgroup",
"//base/startup/init/services/modules:modulesgroup",
"//base/startup/init/services/param:parameter",
"//base/startup/init/interfaces/innerkits:innergroup",
"//base/startup/init/device_info:device_info_group",
"//base/startup/init/interfaces/kits:kitsgroup"
],
"service_group": [
"//base/startup/init/watchdog:watchdog",
"//base/startup/init/ueventd:startup_ueventd"
]
},
"inner_kits": [
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/",
"header_files": [
"init_socket.h",
"init_file.h",
"init_reboot.h",
"service_control.h",
"beget_ext.h",
"systemcapability.h",
"syspara/parameter.h",
"syspara/parameters.h",
"syspara/param_wrapper.h",
"syspara/sysparam_errno.h",
"syspara/sysversion.h",
"param/init_param.h"
]
},
"name": "//base/startup/init/interfaces/innerkits:libbegetutil"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/fs_manager/",
"header_files": [
"fs_manager.h"
]
},
"name": "//base/startup/init/interfaces/innerkits/fs_manager:libfsmanager_static"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/",
"header_files": [
"service_watcher.h",
"syspara/parameter.h",
"syspara/sysparam_errno.h"
]
},
"name": "//base/startup/init/interfaces/innerkits:libbeget_proxy"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits",
"header_files": [
"init_module_engine/include/init_module_engine.h"
]
},
"name": "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/seccomp/include/",
"header_files": [
"seccomp_policy.h"
]
},
"name": "//base/startup/init/interfaces/innerkits/seccomp:seccomp"
},
{
"header": {
"header_base": "//base/startup/init/interfaces/innerkits/include/param",
"header_files": [
]
},
"name": "//base/startup/init/interfaces/innerkits/zh_extral_dir:export_headers_lib"
}
],
"test": [
"//base/startup/init/test:testgroup"
]
}
}
}

View File

@ -62,11 +62,11 @@ if (!defined(ohos_lite)) {
"//base/startup/init/services/log:agent_log",
"//base/startup/init/services/modules/udid:libudidcomm",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
]
external_deps = [
"access_token:libaccesstoken_sdk",
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"ipc:ipc_core",
"safwk:system_ability_fwk",

View File

@ -29,8 +29,9 @@ shared_library("libinitsync_shared") {
"//base/startup/init/services/log:init_log",
"//third_party/bounds_checking_function:libsec_shared",
]
}
public_external_deps = [ "bounds_checking_function:libsec_shared" ]
}
static_library("libinitsync_static") {
sources = [ "src/init_sync.c" ]
include_dirs = [

View File

@ -33,7 +33,6 @@ config("exported_header_files") {
include_common = [
"./include",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
"//third_party/bounds_checking_function/include",
"//base/startup/init/interfaces/innerkits/include",
"//base/startup/init/interfaces/innerkits/include/param",
"//base/startup/init/interfaces/innerkits/fd_holder",
@ -56,6 +55,7 @@ if (defined(ohos_lite)) {
]
sources = []
include_dirs = include_common
include_dirs += [ "//third_party/bounds_checking_function/include" ]
public_configs = [ ":exported_header_files" ]
deps = [
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
@ -192,7 +192,6 @@ if (defined(ohos_lite)) {
include_dirs = include_common
deps = [
"//base/customization/config_policy/frameworks/config_policy:configpolicy_util_for_init_static",
"//base/startup/init/interfaces/innerkits/control_fd:libcontrolfd",
"//base/startup/init/interfaces/innerkits/fd_holder:fdholder",
"//base/startup/init/interfaces/innerkits/file:libfile",
@ -202,7 +201,6 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/modules/udid:libudidcomm",
"//base/startup/init/services/param/linux:param_client",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
if (startup_begetutil_extra_modules != "") {
@ -210,7 +208,9 @@ if (defined(ohos_lite)) {
}
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"config_policy:configpolicy_util_for_init_static",
"hilog:libhilog_base",
]
public_configs = [ ":exported_header_files" ]
@ -239,7 +239,6 @@ if (defined(ohos_lite)) {
deps = [
":libbegetutil",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
]
if (enable_ohos_startup_init_feature_watcher) {
@ -272,6 +271,7 @@ if (defined(ohos_lite)) {
}
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"hilog:libhilog_base",
"ipc:ipc_single",
@ -307,10 +307,10 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/modules/udid:libudidcomm",
"//base/startup/init/services/param/linux:param_client",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"hilog:libhilog_base",
]

View File

@ -30,10 +30,10 @@ ohos_static_library("libcontrolfd") {
public_configs = [ ":exported_header_files" ]
include_dirs = [
".",
"//third_party/bounds_checking_function/include",
"//base/startup/init/interfaces/innerkits/include",
"//base/startup/init/services/loopevent/include",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"
}

View File

@ -21,8 +21,8 @@ ohos_static_library("libfile") {
include_dirs = [
"//base/startup/init/services/log",
"//base/startup/init/interfaces/innerkits/include",
"//third_party/bounds_checking_function/include",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
public_configs = [ ":exported_header_files" ]
part_name = "init"
subsystem_name = "startup"

View File

@ -30,12 +30,12 @@ ohos_static_library("libfsmanager_static") {
]
include_dirs = [
"//base/startup/init/interfaces/innerkits/include",
"//third_party/bounds_checking_function/include",
"//base/startup/init/interfaces/innerkits/include/param",
"//base/startup/init/interfaces/innerkits/init_module_engine/include",
"//base/startup/init/services/log",
"//base/startup/init/services/param/include",
]
external_deps = [ "bounds_checking_function:libsec_static" ]
deps = [ "//base/startup/init/services/utils:libinit_utils" ]
if (defined(global_parts_info.startup_hvb)) {
sources += [

View File

@ -16,7 +16,6 @@ service_socket_sources =
service_socket_include = [
"//base/startup/init/interfaces/innerkits/include",
"//base/startup/init/services/log",
"//third_party/bounds_checking_function/include",
]
if (defined(ohos_lite)) {
@ -24,6 +23,7 @@ if (defined(ohos_lite)) {
static_library("libsocket") {
sources = service_socket_sources
include_dirs = service_socket_include
include_dirs += [ "//third_party/bounds_checking_function/include" ]
}
}
} else {
@ -32,6 +32,7 @@ if (defined(ohos_lite)) {
ohos_static_library("libsocket") {
sources = service_socket_sources
include_dirs = service_socket_include
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"
}

View File

@ -25,10 +25,9 @@ ohos_shared_library("syscap") {
"//base/startup/init/interfaces/innerkits/include/param",
"//base/startup/init/services/param/include",
]
deps = [
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
]
deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
public_configs = [ ":syscap_config" ]
part_name = "init"

View File

@ -0,0 +1,21 @@
# Copyright (c) 2021-2022 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.
config("exported_header_files") {
visibility = [ ":*" ]
include_dirs = [ "../../innerkits/include/param" ]
}
static_library("export_headers_lib") {
public_configs = [ ":exported_header_files" ]
}

View File

@ -50,10 +50,12 @@ ohos_shared_library("systemparameter") {
deps = [
"//base/startup/init/interfaces/innerkits:libbeget_proxy",
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
]
external_deps = [ "napi:ace_napi" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"napi:ace_napi",
]
relative_install_dir = "module"
subsystem_name = "startup"
part_name = "init"
@ -70,11 +72,13 @@ ohos_shared_library("systemparameterenhance") {
deps = [
"//base/startup/init/interfaces/innerkits:libbeget_proxy",
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
]
symlink_target_name = [ "libsystemparameterv9.z.so" ]
external_deps = [ "napi:ace_napi" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"napi:ace_napi",
]
relative_install_dir = "module"
subsystem_name = "startup"
part_name = "init"

View File

@ -32,14 +32,21 @@ group("startup_init") {
deps = [
"etc:etc_files",
"init/standard:init",
"init/standard:init_early",
"//third_party/e2fsprogs:e2fsprogs",
]
data_deps = [ "init/standard:init_early" ]
deps += [ "//base/startup/init/services/etc:watchdog.cfg" ]
deps += [ "//base/startup/init/services/etc:ueventd.cfg" ]
external_deps = [
"e2fsprogs:libext2_com_err",
"e2fsprogs:libext2_e2p",
"e2fsprogs:libext2_misc",
"e2fsprogs:libext2_quota",
"e2fsprogs:libext2_uuid",
"e2fsprogs:libext2fs",
]
if (use_musl) {
deps += [ "//third_party/f2fs-tools:f2fs-tools" ]
external_deps += [ "f2fs-tools:libf2fs" ]
}
if (enable_ohos_startup_init_feature_watcher) {

View File

@ -26,9 +26,6 @@ common_include_dirs = [
"//base/startup/init/services/log",
"//base/startup/init/interfaces/innerkits/include",
"//base/startup/init/interfaces/innerkits/include/syspara",
"//base/security/selinux_adapter/interfaces/policycoreutils/include",
"//third_party/bounds_checking_function/include",
"//third_party/selinux/libselinux/include",
]
if (defined(ohos_lite)) {
@ -49,6 +46,11 @@ if (defined(ohos_lite)) {
}
include_dirs = common_include_dirs
include_dirs += [
"//base/security/selinux_adapter/interfaces/policycoreutils/include",
"//third_party/bounds_checking_function/include",
"//third_party/selinux/libselinux/include",
]
deps = [
"//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared",
"//base/startup/init/interfaces/innerkits:libbegetutil",
@ -92,12 +94,16 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/param/linux:param_client",
"//base/startup/init/services/sandbox:sandbox",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/cJSON:cjson",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
external_deps = [ "c_utils:utils" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
if (param_test) {
sources += [
@ -112,9 +118,9 @@ if (defined(ohos_lite)) {
}
if (build_selinux) {
deps += [
"//base/security/selinux_adapter:libselinux_parameter_static",
"//third_party/selinux:libselinux",
external_deps += [
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
defines += [ "PARAM_SUPPORT_SELINUX" ]
}
@ -155,12 +161,16 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/log:agent_log",
"//base/startup/init/services/param/linux:param_client",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/cJSON:cjson",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
external_deps = [ "c_utils:utils" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
install_images = [ "updater" ]
install_enable = true
@ -182,13 +192,15 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/log:agent_log",
"//base/startup/init/services/param/linux:param_client",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
if (build_selinux) {
deps += [
"//base/security/selinux_adapter:libselinux_parameter_static",
"//third_party/selinux:libselinux",
external_deps += [
"bounds_checking_function:libsec_shared",
"selinux:libselinux",
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
defines += [ "PARAM_SUPPORT_SELINUX" ]
}
@ -230,19 +242,21 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/loopevent:loopevent",
"//base/startup/init/services/param/linux:param_client",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_shared",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"hilog:libhilog_base",
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
if (build_selinux) {
deps += [
"//base/security/selinux_adapter:libselinux_parameter_static",
"//third_party/selinux:libselinux",
]
defines += [ "PARAM_SUPPORT_SELINUX" ]
external_deps += [
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
}
install_images = [
"system",

View File

@ -24,9 +24,6 @@ init_common_sources = [
"../main.c",
]
FSCRYPT_PATH =
"//foundation/filemanagement/storage_service/services/storage_daemon"
import("//build/ohos.gni")
import("//build/ohos/native_stub/native_stub.gni")
@ -52,7 +49,6 @@ ohos_executable("init_early") {
"//base/startup/init/interfaces/innerkits/fs_manager:libfsmanager_static",
"//base/startup/init/services/log:init_log",
"//base/startup/init/ueventd:libueventd_ramdisk_static",
"//third_party/bounds_checking_function:libsec_static",
]
if (startup_init_extra_static_modules != "") {
deps += [ startup_init_extra_static_modules ]
@ -60,6 +56,7 @@ ohos_executable("init_early") {
install_images = [ "ramdisk" ]
install_enable = true
part_name = "init"
subsystem_name = "startup"
}
ohos_executable("init") {
@ -93,7 +90,6 @@ ohos_executable("init") {
"//base/startup/init/services/init/include",
"//base/startup/init/services/modules/reboot",
"//base/startup/init/services/modules/init_context",
"${FSCRYPT_PATH}/include/libfscrypt",
"//base/startup/init/services/loopevent/task",
"//base/startup/init/services/loopevent/loop",
"//base/startup/init/services/loopevent/include",
@ -102,7 +98,6 @@ ohos_executable("init") {
]
deps = [
"//base/customization/config_policy/frameworks/config_policy:configpolicy_util_for_init_static",
"//base/startup/init/interfaces/innerkits/control_fd:libcontrolfd",
"//base/startup/init/interfaces/innerkits/fd_holder:fdholder",
"//base/startup/init/interfaces/innerkits/fs_manager:libfsmanager_static",
@ -112,20 +107,25 @@ ohos_executable("init") {
"//base/startup/init/services/utils:libinit_utils",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
external_deps = [
"config_policy:configpolicy_util_for_init_static",
"storage_service:libfscryptutils_static",
]
deps += [
"//base/startup/init/ueventd:libueventd_ramdisk_static",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
]
external_deps += [ "storage_service:libfscryptutils_static" ]
deps += [ "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_stub_versionscript" ]
deps += [ "//base/startup/init/interfaces/innerkits/init_module_engine:init_module_engine_sources" ]
deps += [ "//base/startup/init/services/modules:static_modules" ]
deps += [ "${FSCRYPT_PATH}/libfscrypt:libfscryptutils_static" ]
external_deps = [
external_deps += [
"access_token:libnativetoken",
"access_token:libtoken_setproc",
"storage_service:libfscryptutils_static",
]
cflags = []
@ -145,11 +145,7 @@ ohos_executable("init") {
}
if (build_selinux) {
include_dirs += [
"//third_party/selinux/libselinux/include/",
"//base/security/selinux_adapter/interfaces/policycoreutils/include/",
]
deps += [ "//third_party/selinux:libselinux" ]
external_deps += [ "selinux:libselinux" ]
external_deps += [
"selinux_adapter:libload_policy",
"selinux_adapter:librestorecon",

View File

@ -48,7 +48,7 @@ if (defined(ohos_lite)) {
defines = [ "INIT_DMESG" ]
public_configs = [ ":exported_header_files" ]
include_dirs = [ "//third_party/bounds_checking_function/include" ]
external_deps = [ "bounds_checking_function:libsec_static" ]
part_name = "init"
subsystem_name = "startup"
}
@ -57,8 +57,8 @@ if (defined(ohos_lite)) {
sources = base_sources
defines = [ "INIT_AGENT" ]
public_configs = [ ":exported_header_files" ]
include_dirs = [ "//third_party/bounds_checking_function/include" ]
external_deps = [ "hilog:libhilog_base" ]
external_deps = [ "bounds_checking_function:libsec_static" ]
external_deps += [ "hilog:libhilog_base" ]
part_name = "init"
subsystem_name = "startup"
}

View File

@ -59,6 +59,7 @@ if (defined(ohos_lite)) {
sources = common_sources
public_configs = [ ":exported_header_files" ]
include_dirs = common_include
external_deps = [ "bounds_checking_function:libsec_static" ]
defines = [ "_GNU_SOURCE" ]
part_name = "init"
subsystem_name = "startup"

View File

@ -24,9 +24,9 @@ ohos_shared_library("bootchart") {
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/cJSON:cjson",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"

View File

@ -30,7 +30,9 @@ ohos_source_set("libbootevent_static") {
sources = [ "bootevent.c" ]
include_dirs = [ ".." ]
public_configs = [ ":bootevent_static_config" ]
public_external_deps = [ "config_policy:configpolicy_util" ]
public_configs += [ "//base/startup/init/interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]
public_external_deps += [ "bounds_checking_function:libsec_static" ]
if (build_selinux) {
include_dirs += [
"//third_party/selinux/libselinux/include/",

View File

@ -28,10 +28,11 @@ ohos_source_set("libcrashhandler") {
public_configs = [ ":libcrashhandler_config" ]
deps = [
"../../log:init_log",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/libunwind:libunwind",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
public_configs += [ "../../../interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]
part_name = "init"

View File

@ -40,10 +40,11 @@ ohos_shared_library("init_context") {
defines += [ "WITH_SELINUX" ]
}
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/selinux:libselinux",
deps = [ "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine" ]
external_deps += [
"bounds_checking_function:libsec_shared",
"selinux:libselinux",
]
part_name = "init"
@ -66,7 +67,7 @@ ohos_source_set("initcontext_static") {
defines = [ "INIT_SUPPORT_CHIPSET_INIT" ]
public_configs = [ ":initcontext_static_config" ]
public_configs += [ "../../../interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"
}

View File

@ -28,10 +28,9 @@ ohos_shared_library("init_eng") {
include_dirs += [ "../../init/include" ]
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
]
deps = [ "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"

View File

@ -26,7 +26,6 @@ comm_include = [
"//base/startup/init/services/log",
"//base/startup/init/interfaces/innerkits/include",
"//third_party/cJSON",
"//third_party/bounds_checking_function/include",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
]
if (defined(ohos_lite)) {
@ -36,6 +35,7 @@ if (defined(ohos_lite)) {
"OHOS_LITE",
]
include_dirs = comm_include
include_dirs += [ "//third_party/bounds_checking_function/include" ]
sources = [ "param_hook.c" ]
public_configs = [ ":inithook_config" ]
}
@ -50,10 +50,11 @@ if (defined(ohos_lite)) {
"init_hook.c",
"param_hook.c",
]
public_external_deps = [ "bounds_checking_function:libsec_static" ]
if (build_selinux) {
include_dirs += [
"//third_party/selinux/libselinux/include/",
"//base/security/selinux_adapter/interfaces/policycoreutils/include/",
public_external_deps += [
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
defines += [ "WITH_SELINUX" ]
}

View File

@ -23,10 +23,9 @@ ohos_shared_library("rebootmodule") {
"../init_hook",
"//base/startup/init/interfaces/innerkits/include/param",
]
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
]
deps = [ "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
defines = []
part_name = "init"
@ -54,7 +53,7 @@ ohos_source_set("libreboot_static") {
"..",
"../init_hook",
"//base/startup/init/interfaces/innerkits/include/param",
"//third_party/bounds_checking_function/include",
]
public_external_deps = [ "bounds_checking_function:libsec_static" ]
public_configs = [ "//base/startup/init/interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]
}

View File

@ -26,13 +26,11 @@ ohos_shared_library("selinuxadp") {
"//third_party/selinux/libselinux/include/",
"//base/security/selinux_adapter/interfaces/policycoreutils/include/",
]
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/selinux:libselinux",
]
deps = [ "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"selinux:libselinux",
"selinux_adapter:libload_policy",
"selinux_adapter:librestorecon",
]
@ -63,8 +61,10 @@ ohos_source_set("libselinuxadp_static") {
"..",
"../init_hook",
"//base/startup/init/interfaces/innerkits/include/param",
"//third_party/selinux/libselinux/include/",
"//base/security/selinux_adapter/interfaces/policycoreutils/include/",
]
public_external_deps = [
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
public_configs = [ ":selinux_static_config" ]
public_configs += [ "//base/startup/init/interfaces/innerkits/init_module_engine:init_module_engine_exported_config" ]

View File

@ -27,12 +27,12 @@ ohos_shared_library("eventmodule") {
"//base/startup/init/interfaces/innerkits/include/param",
]
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
]
deps = [ "//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine" ]
external_deps = [ "hisysevent:libhisysevent" ]
external_deps = [
"bounds_checking_function:libsec_shared",
"hisysevent:libhisysevent",
]
part_name = "init"
subsystem_name = "startup"

View File

@ -23,15 +23,14 @@ comm_include = [
ohos_shared_library("inittrace") {
sources = [ "init_trace.c" ]
include_dirs = comm_include
include_dirs += [ "//third_party/zlib" ]
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/cJSON:cjson",
"//third_party/zlib:libz",
]
external_deps = [
"bounds_checking_function:libsec_shared",
"zlib:libz",
]
part_name = "init"

View File

@ -80,10 +80,11 @@ if (defined(ohos_lite)) {
include_dirs = comm_include
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/mbedtls:mbedtls_shared",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"
if (target_cpu == "arm64" || target_cpu == "x86_64" ||
@ -117,7 +118,7 @@ if (defined(ohos_lite)) {
sources = [ "udid_comm.c" ]
defines = [ "_GNU_SOURCE" ]
include_dirs = comm_include
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"

View File

@ -37,7 +37,6 @@ param_include_dirs = [
"//base/startup/init/interfaces/innerkits/include/syspara",
"//base/startup/init/interfaces/innerkits/init_module_engine/include",
"//base/startup/init/services/loopevent/include",
"//third_party/bounds_checking_function/include",
"//third_party/cJSON",
"//commonlibrary/utils_lite/include",
"//base/security/selinux_adapter/interfaces/policycoreutils/include",
@ -72,6 +71,7 @@ if (defined(ohos_lite)) {
sources = param_service_sources
sources += param_trigger_sources
include_dirs = param_include_dirs
include_dirs += [ "//third_party/bounds_checking_function/include" ]
public_configs = [ ":exported_header_files" ]
defines += [
@ -109,6 +109,12 @@ if (defined(ohos_lite)) {
"PARAM_SUPPORT_REAL_CHECK",
"SUPPORT_PARAM_LOAD_HOOK",
]
external_deps = [
"bounds_checking_function:libsec_static",
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
public_external_deps = [ "selinux:libselinux" ]
if (param_base_log) {
defines += [ "PARAM_BASE_LOG" ]
@ -130,14 +136,11 @@ if (defined(ohos_lite)) {
}
if (build_selinux) {
include_dirs += [
"//third_party/selinux/libselinux/include/",
"//base/security/selinux_adapter/interfaces/policycoreutils/include/",
]
defines += [
"PARAM_SUPPORT_SELINUX",
"PARAMWORKSPACE_NEED_MUTEX",
]
external_deps += [ "selinux_adapter:libselinux_parameter_static" ]
}
deps = [ "//base/startup/init/services/param/base:param_base" ]
@ -153,6 +156,11 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/log:agent_log",
"//base/startup/init/services/param/base:param_base",
]
external_deps = [
"bounds_checking_function:libsec_static",
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
cflags = [ "-Wno-deprecated-pragma" ]
defines = [

View File

@ -16,10 +16,7 @@ import("//build/ohos.gni")
config("exported_header_files") {
visibility = [ ":*" ]
include_dirs = [
"./include",
"//base/customization/config_policy/interfaces/inner_api/include",
]
include_dirs = [ "./include" ]
}
ohos_static_library("sandbox") {
@ -29,7 +26,6 @@ ohos_static_library("sandbox") {
]
public_configs = [ ":exported_header_files" ]
include_dirs = [
"//third_party/bounds_checking_function/include",
"//third_party/cJSON",
"//base/startup/init/interfaces/innerkits/include",
"//base/startup/init/interfaces/innerkits/include",
@ -41,9 +37,12 @@ ohos_static_library("sandbox") {
deps = [
":chipset-sandbox.json",
":system-sandbox.json",
"//base/customization/config_policy/frameworks/config_policy:configpolicy_util",
"//base/startup/init/services/utils:libinit_utils",
]
external_deps = [
"bounds_checking_function:libsec_static",
"config_policy:configpolicy_util",
]
part_name = "init"
subsystem_name = "startup"
}

View File

@ -41,10 +41,8 @@ if (defined(ohos_lite)) {
ohos_static_library("libinit_utils") {
sources = [ "init_utils.c" ]
public_configs = [ ":exported_header_files" ]
include_dirs = [
"//base/startup/init/interfaces/innerkits/include",
"//third_party/bounds_checking_function/include",
]
include_dirs = [ "//base/startup/init/interfaces/innerkits/include" ]
external_deps = [ "bounds_checking_function:libsec_static" ]
defines = [ "_GNU_SOURCE" ]
part_name = "init"
subsystem_name = "startup"

View File

@ -33,7 +33,6 @@ config("sysparam_simulator_config") {
]
include_dirs = [
"../../../../commonlibrary/utils_lite/include",
"//third_party/bounds_checking_function/include",
"./parameter/src",
"../interfaces/innerkits/include/syspara",
]
@ -46,7 +45,7 @@ ohos_static_library("sysparam_simulator") {
"./parameter/src/param_impl_posix/param_impl_posix.c",
"./parameter/src/parameter_common.c",
]
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
external_deps = [ "bounds_checking_function:libsec_static" ]
defines = [
"INCREMENTAL_VERSION=\"\"",
"BUILD_TYPE=\"\"",

View File

@ -13,10 +13,7 @@
import("//build/ohos.gni")
common_include_dirs = [
".",
"//third_party/bounds_checking_function/include",
]
common_include_dirs = [ "." ]
ohos_executable("BMStartupTest") {
sources = [
@ -26,9 +23,10 @@ ohos_executable("BMStartupTest") {
defines = [ "_GNU_SOURCE" ]
include_dirs = common_include_dirs
deps = [
"../../interfaces/innerkits:libbegetutil",
"//third_party/benchmark:benchmark",
deps = [ "../../interfaces/innerkits:libbegetutil" ]
external_deps = [
"benchmark:benchmark",
"bounds_checking_function:libsec_static",
]
install_images = [ "system" ]
install_enable = true

View File

@ -19,12 +19,9 @@ ohos_executable("client") {
include_dirs = [
"//base/startup/init/services/log",
"//base/startup/init/interfaces/innerkits/include",
"//third_party/bounds_checking_function/include",
]
deps = [
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_static",
]
deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil" ]
external_deps = [ "bounds_checking_function:libsec_static" ]
install_images = [ "system" ]
install_enable = true
part_name = "init"
@ -59,12 +56,9 @@ ohos_executable("server") {
include_dirs = [
"//base/startup/init/services/log",
"//base/startup/init/interfaces/innerkits/include",
"//third_party/bounds_checking_function/include",
]
deps = [
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_static",
]
deps = [ "//base/startup/init/interfaces/innerkits:libbegetutil" ]
external_deps = [ "bounds_checking_function:libsec_static" ]
install_images = [ "system" ]
install_enable = true
part_name = "init"

File diff suppressed because it is too large Load Diff

View File

@ -28,15 +28,14 @@ ohos_shared_library("libparamtestmodule") {
"//base/startup/init/ueventd/include",
"//base/startup/init/device_info",
"//third_party/cJSON",
"//third_party/bounds_checking_function/include",
]
deps = [
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//base/startup/init/services/log:agent_log",
"//third_party/bounds_checking_function:libsec_shared",
]
external_deps = [ "bounds_checking_function:libsec_shared" ]
part_name = "init"
subsystem_name = "startup"
@ -72,11 +71,11 @@ ohos_moduletest("InitModuleTest") {
deps = [
"//base/startup/init/interfaces/innerkits:libbeget_proxy",
"//base/startup/init/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/googletest:gtest_main",
]
external_deps = [
"bounds_checking_function:libsec_shared",
"c_utils:utils",
"hilog:libhilog_base",
"ipc:ipc_single",

View File

@ -237,7 +237,6 @@ ohos_unittest("init_unittest") {
configs = [ "//base/startup/init/test/unittest:utest_config" ]
include_dirs += [
"//base/customization/config_policy/interfaces/innerkits/include",
"//base/startup/init/device_info",
"//base/startup/init/services/init/standard",
"//base/startup/init/interfaces/innerkits/include",
@ -283,10 +282,8 @@ ohos_unittest("init_unittest") {
"//foundation/systemabilitymgr/samgr/interfaces/innerkits/samgr_proxy/include",
"//base/startup/init/ueventd/include",
"//utils/system/safwk/native/include",
"//third_party/bounds_checking_function/include",
"//third_party/cJSON",
"//third_party/zlib",
"//third_party/selinux/libselinux/include/selinux",
"//base/security/access_token/interfaces/innerkits/token_setproc/include",
"//base/security/access_token/interfaces/innerkits/nativetoken/include",
"//base/startup/init/services/sandbox/include",
@ -296,15 +293,10 @@ ohos_unittest("init_unittest") {
]
deps = [
"//base/customization/config_policy/frameworks/config_policy:configpolicy_util_for_init_static",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//third_party/libunwind:libunwind",
"//third_party/mbedtls:mbedtls_shared",
"//third_party/selinux:libselinux",
"//third_party/zlib:libz",
]
defines += [
@ -337,10 +329,15 @@ ohos_unittest("init_unittest") {
external_deps = [
"access_token:libnativetoken",
"access_token:libtoken_setproc",
"bounds_checking_function:libsec_static",
"c_utils:utils",
"config_policy:configpolicy_util_for_init_static",
"hilog:libhilog",
"hisysevent:libhisysevent",
"init:libinit_module_engine",
"mbedtls:mbedtls_shared",
"selinux:libselinux",
"zlib:libz",
]
if (enable_ohos_startup_init_feature_ab_partition) {
@ -366,14 +363,14 @@ ohos_unittest("init_unittest") {
if (defined(build_selinux) && build_selinux) {
sources += [ "param/selinux_unittest.cpp" ]
include_dirs += [
"//third_party/selinux/libselinux/include/",
"//base/security/selinux_adapter/interfaces/policycoreutils/include/",
]
sources += [
"//base/startup/init/services/modules/selinux/selinux_adp.c",
"//base/startup/init/services/modules/selinux/selinux_static.c",
]
external_deps += [
"selinux:libselinux",
"selinux_adapter:libselinux_parameter_static",
]
defines += [
"WITH_SELINUX",
@ -387,9 +384,9 @@ ohos_unittest("init_unittest") {
"//base/startup/init/device_info/device_info_proxy.cpp",
]
include_dirs += [
"//third_party/selinux/libselinux/include/",
"//base/security/access_token/interfaces/innerkits/accesstoken/include",
]
external_deps += [ "selinux:libselinux" ]
defines += [ "PARAM_FEATURE_DEVICEINFO" ]
}

View File

@ -110,7 +110,6 @@ if (defined(ohos_lite)) {
"//base/startup/init/ueventd",
"//base/startup/init/ueventd/include",
"//third_party/cJSON",
"//third_party/bounds_checking_function/include",
"//base/hiviewdfx/hilog_lite/interfaces/native/kits",
"//base/startup/init/interfaces/innerkits/fd_holder",
"//base/startup/init/interfaces/hals",
@ -120,7 +119,9 @@ if (defined(ohos_lite)) {
sources = sysparam_source
sources += param_common_sources
sources += base_sources
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
deps = []
external_deps = [ "bounds_checking_function:libsec_static" ]
if (enable_ohos_startup_init_feature_begetctl_liteos) {
defines += [ "LITEOS_SUPPORT" ]
}

View File

@ -68,7 +68,6 @@ if (defined(ohos_lite)) {
"//base/startup/init/interfaces/innerkits/include",
"//base/startup/init/services/utils",
"//base/startup/init/ueventd/include",
"//third_party/selinux/libselinux/include/selinux",
]
service_ueventd_deps = [
@ -76,7 +75,6 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/log:init_log",
"//base/startup/init/services/utils:libinit_utils",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/selinux:libselinux",
]
#
@ -91,12 +89,13 @@ if (defined(ohos_lite)) {
include_dirs = service_ueventd_include
deps = service_ueventd_deps
defines = [ "__RAMDISK__" ]
external_deps = []
cflags = []
if (build_selinux) {
external_deps = [ "selinux_adapter:librestorecon" ]
external_deps += [ "selinux_adapter:librestorecon" ]
cflags += [ "-DWITH_SELINUX" ]
}
external_deps += [ "selinux:libselinux" ]
public_configs = [ ":libueventd_exported_config" ]
part_name = "init"
subsystem_name = "startup"
@ -115,10 +114,11 @@ if (defined(ohos_lite)) {
]
deps = service_ueventd_deps
deps += [ "//base/startup/init/services/param/linux:param_client" ]
external_deps = [ "selinux:libselinux" ]
cflags = []
deps += [ "//base/startup/init/services/param/base:param_base" ]
if (build_selinux) {
external_deps = [ "selinux_adapter:librestorecon" ]
external_deps += [ "selinux_adapter:librestorecon" ]
cflags += [ "-DWITH_SELINUX" ]
}

View File

@ -37,10 +37,10 @@ if (defined(ohos_lite)) {
"//base/startup/init/services/log/init_commlog.c",
"init_watchdog.c",
]
deps = [
"//base/startup/init/services/log:init_log",
"//third_party/bounds_checking_function:libsec_shared",
]
deps = [ "//base/startup/init/services/log:init_log" ]
external_deps = [ "bounds_checking_function:libsec_shared" ]
defines = [ "LINUX_WATCHDOG" ]
defines += [ "_GNU_SOURCE" ]
install_enable = true