From 9ef065c6c181877d937a106e257e2c5f32c93ec2 Mon Sep 17 00:00:00 2001 From: chengjinsong2 Date: Thu, 29 Jun 2023 08:33:38 -0700 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E4=BB=B6=E5=8C=96=E6=95=B4=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: chengjinsong2 Change-Id: Ifcaca368f142c8b9754dca97bdfd1ed0c73f2968 --- bundle.json | 16 +++++++++++++--- interfaces/innerkits/fs_manager/BUILD.gn | 3 +-- services/begetctl/BUILD.gn | 2 -- services/init/standard/BUILD.gn | 19 ++++++++++--------- services/log/BUILD.gn | 2 +- services/modules/bootchart/BUILD.gn | 3 +-- services/modules/init_context/BUILD.gn | 3 ++- services/modules/init_eng/BUILD.gn | 7 ++++--- services/modules/reboot/BUILD.gn | 6 ++++-- services/modules/selinux/BUILD.gn | 8 +++++--- services/modules/sysevent/BUILD.gn | 10 +++++----- services/modules/trace/BUILD.gn | 3 +-- services/modules/udid/BUILD.gn | 3 +-- test/moduletest/BUILD.gn | 3 +-- test/unittest/BUILD.gn | 4 ++-- 15 files changed, 51 insertions(+), 41 deletions(-) diff --git a/bundle.json b/bundle.json index 993d854e..78917641 100755 --- a/bundle.json +++ b/bundle.json @@ -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": { diff --git a/interfaces/innerkits/fs_manager/BUILD.gn b/interfaces/innerkits/fs_manager/BUILD.gn index f70b0a86..7ed14f72 100755 --- a/interfaces/innerkits/fs_manager/BUILD.gn +++ b/interfaces/innerkits/fs_manager/BUILD.gn @@ -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" diff --git a/services/begetctl/BUILD.gn b/services/begetctl/BUILD.gn index 2b020c55..8c23a07d 100755 --- a/services/begetctl/BUILD.gn +++ b/services/begetctl/BUILD.gn @@ -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", diff --git a/services/init/standard/BUILD.gn b/services/init/standard/BUILD.gn index e3efa22d..b22f785b 100644 --- a/services/init/standard/BUILD.gn +++ b/services/init/standard/BUILD.gn @@ -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" ] diff --git a/services/log/BUILD.gn b/services/log/BUILD.gn index d7cf6cf4..b48ead2d 100644 --- a/services/log/BUILD.gn +++ b/services/log/BUILD.gn @@ -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" } diff --git a/services/modules/bootchart/BUILD.gn b/services/modules/bootchart/BUILD.gn index 328bc78f..bec3de5c 100755 --- a/services/modules/bootchart/BUILD.gn +++ b/services/modules/bootchart/BUILD.gn @@ -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") { diff --git a/services/modules/init_context/BUILD.gn b/services/modules/init_context/BUILD.gn index 58d6ea75..2f08fd14 100644 --- a/services/modules/init_context/BUILD.gn +++ b/services/modules/init_context/BUILD.gn @@ -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", ] diff --git a/services/modules/init_eng/BUILD.gn b/services/modules/init_eng/BUILD.gn index c9597dad..c39800c0 100644 --- a/services/modules/init_eng/BUILD.gn +++ b/services/modules/init_eng/BUILD.gn @@ -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" diff --git a/services/modules/reboot/BUILD.gn b/services/modules/reboot/BUILD.gn index f1ab962d..df1d113b 100644 --- a/services/modules/reboot/BUILD.gn +++ b/services/modules/reboot/BUILD.gn @@ -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" diff --git a/services/modules/selinux/BUILD.gn b/services/modules/selinux/BUILD.gn index d569b1c6..11b4e015 100755 --- a/services/modules/selinux/BUILD.gn +++ b/services/modules/selinux/BUILD.gn @@ -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" diff --git a/services/modules/sysevent/BUILD.gn b/services/modules/sysevent/BUILD.gn index de8ba7fa..0cae4357 100644 --- a/services/modules/sysevent/BUILD.gn +++ b/services/modules/sysevent/BUILD.gn @@ -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") { diff --git a/services/modules/trace/BUILD.gn b/services/modules/trace/BUILD.gn index ed5d2c5f..a2fd8544 100644 --- a/services/modules/trace/BUILD.gn +++ b/services/modules/trace/BUILD.gn @@ -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") { diff --git a/services/modules/udid/BUILD.gn b/services/modules/udid/BUILD.gn index 241e375a..e0008a2e 100644 --- a/services/modules/udid/BUILD.gn +++ b/services/modules/udid/BUILD.gn @@ -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") { diff --git a/test/moduletest/BUILD.gn b/test/moduletest/BUILD.gn index 2006a581..5e5ba077 100755 --- a/test/moduletest/BUILD.gn +++ b/test/moduletest/BUILD.gn @@ -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" diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 4b534c6e..99dfc80c 100644 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -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", -- GitLab