部件化整改

Signed-off-by: chengjinsong2 <chengjinsong2@huawei.com>
Change-Id: Ifcaca368f142c8b9754dca97bdfd1ed0c73f2968
This commit is contained in:
chengjinsong2 2023-06-29 08:33:38 -07:00
parent 51014d2a12
commit 9ef065c6c1
15 changed files with 51 additions and 41 deletions

View File

@ -18,6 +18,8 @@
"SystemCapability.Startup.SystemInfo"
],
"adapted_system_type": [
"mini",
"small",
"standard"
],
"rom": "3.9MB",
@ -42,12 +44,20 @@
"access_token",
"common",
"dsoftbus",
"hvb"
"hvb",
"hisysevent_native",
"profiler",
"toybox",
"mksh"
],
"third_party": [
"cJSON",
"bounds_checking_function",
"selinux"
"selinux",
"mbedtls",
"zlib",
"cjson",
"thirdparty_selinux",
"bounds_checking_function"
]
},
"build": {

View File

@ -52,8 +52,7 @@ ohos_static_library("libfsmanager_static") {
]
defines = [ "SUPPORT_HVB" ]
public_deps = [ "//base/startup/hvb/libhvb:libhvb_static" ]
external_deps = [ "hvb:hvb_static" ]
}
public_configs = [ ":libfsmanager_exported_configs" ]
part_name = "init"

View File

@ -156,8 +156,6 @@ if (defined(ohos_lite)) {
"//third_party/bounds_checking_function:libsec_shared",
]
deps += [ "//base/startup/init/services/param/base:param_base" ]
if (build_selinux) {
deps += [
"//base/security/selinux:libselinux_parameter_static",

View File

@ -62,6 +62,7 @@ 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",
@ -73,9 +74,6 @@ ohos_executable("init") {
deps += [ "//base/startup/init/services/param/base:param_base" ]
deps += [
"//base/customization/config_policy/frameworks/config_policy:configpolicy_util_for_init_static",
"//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken",
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
"//base/startup/init/ueventd:libueventd_ramdisk_static",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
@ -85,7 +83,10 @@ ohos_executable("init") {
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 = [
"access_token:libnativetoken",
"access_token:libtoken_setproc",
]
cflags = []
if (use_musl) {
@ -108,10 +109,10 @@ ohos_executable("init") {
"//third_party/selinux/libselinux/include/",
"//base/security/selinux/interfaces/policycoreutils/include/",
]
deps += [
"//base/security/selinux:libload_policy",
"//base/security/selinux:librestorecon",
"//third_party/selinux:libselinux",
deps += [ "//third_party/selinux:libselinux" ]
external_deps += [
"selinux:libload_policy",
"selinux:librestorecon",
]
cflags += [ "-DWITH_SELINUX" ]
}
@ -130,7 +131,7 @@ ohos_executable("init") {
if (defined(global_parts_info.developtools_hiprofiler)) {
defines += [ "SUPPORT_PROFILER_HIDEBUG" ]
external_deps = [ "hiprofiler:libhidebug_init" ]
external_deps += [ "hiprofiler:libhidebug_init" ]
}
if (asan_detector) {
defines += [ "ASAN_DETECTOR" ]

View File

@ -49,7 +49,7 @@ if (defined(ohos_lite)) {
public_configs = [ ":exported_header_files" ]
include_dirs = [ "//third_party/bounds_checking_function/include" ]
part_name = "startup"
part_name = "init"
subsystem_name = "startup"
}

View File

@ -23,12 +23,11 @@ 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 = [ "init:libinit_module_engine" ]
part_name = "init"
subsystem_name = "startup"
if (target_cpu == "arm64") {

View File

@ -29,7 +29,7 @@ ohos_shared_library("init_context") {
include_dirs += [ "../../init/include" ]
external_deps = [ "init:libinit_module_engine" ]
external_deps = []
defines = [ "INIT_SUPPORT_CHIPSET_INIT" ]
if (build_selinux) {
@ -41,6 +41,7 @@ ohos_shared_library("init_context") {
}
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/selinux:libselinux",
]

View File

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

View File

@ -23,9 +23,11 @@ ohos_shared_library("rebootmodule") {
"../init_hook",
"//base/startup/init/services/include/param",
]
deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
deps = [
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
]
external_deps = [ "init:libinit_module_engine" ]
defines = []
part_name = "init"
subsystem_name = "startup"

View File

@ -26,13 +26,15 @@ ohos_shared_library("selinuxadp") {
"//base/security/selinux/interfaces/policycoreutils/include/",
]
deps = [
"//base/security/selinux:libload_policy",
"//base/security/selinux:librestorecon",
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_module_engine",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/selinux:libselinux",
]
external_deps = [ "init:libinit_module_engine" ]
external_deps = [
"selinux:libload_policy",
"selinux:librestorecon",
]
part_name = "init"
subsystem_name = "startup"

View File

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

View File

@ -28,13 +28,12 @@ ohos_shared_library("inittrace") {
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 = [ "init:libinit_module_engine" ]
part_name = "init"
subsystem_name = "startup"
if (target_cpu == "arm64") {

View File

@ -78,12 +78,11 @@ if (defined(ohos_lite)) {
defines = [ "_GNU_SOURCE" ]
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 = [ "init:libinit_module_engine" ]
part_name = "init"
subsystem_name = "startup"
if (target_cpu == "arm64") {

View File

@ -34,12 +34,11 @@ ohos_shared_library("libparamtestmodule") {
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 = [ "init:libinit_module_engine" ]
part_name = "init"
subsystem_name = "startup"
module_install_dir = "lib/init"

View File

@ -268,8 +268,6 @@ ohos_unittest("init_unittest") {
deps = [
"//base/customization/config_policy/frameworks/config_policy:configpolicy_util_for_init_static",
"//base/security/access_token/interfaces/innerkits/nativetoken:libnativetoken",
"//base/security/access_token/interfaces/innerkits/token_setproc:libtoken_setproc",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson",
"//third_party/googletest:gmock",
@ -304,6 +302,8 @@ ohos_unittest("init_unittest") {
}
external_deps = [
"access_token:libnativetoken",
"access_token:libtoken_setproc",
"c_utils:utils",
"hisysevent_native:libhisysevent",
"hiviewdfx_hilog_native:libhilog",