diff --git a/begetd.gni b/begetd.gni index 1bcc555e8d9daab81c7468ff5492c74aeec1cc20..21fd20a512b1be360a9f8f2fc195168c73d8f4d1 100644 --- a/begetd.gni +++ b/begetd.gni @@ -12,6 +12,7 @@ # limitations under the License. init_innerkits_path = "//base/startup/init/interfaces/innerkits" +foundation_fscrypt_path = "//foundation/filemanagement/storage_service/storage_daemon" declare_args() { enable_ohos_startup_init_feature_watcher = true @@ -91,4 +92,10 @@ declare_args() { # init sasn support init_feature_support_asan = true + + # deps mksh + init_mksh_enable = true + if (defined(global_parts_info) && !defined(global_parts_info.thirdparty_mksh)) { + init_mksh_enable = false + } } diff --git a/bundle.json b/bundle.json index 4ea02f8e9b566009ca9cc16208cfee33ea59ab1a..5c91a7e68ff6e5470959a8467b864beae6fd5446 100755 --- a/bundle.json +++ b/bundle.json @@ -68,7 +68,6 @@ "bundle_framework", "selinux", "selinux_adapter", - "storage_service", "mbedtls", "zlib", "cJSON", @@ -77,10 +76,10 @@ "hicollie", "drivers_interface_partitionslot", "code_signature", - "runtime_core" + "runtime_core", + "mksh" ], "third_party": [ - "mksh", "e2fsprogs", "f2fs-tools" ] diff --git a/interfaces/innerkits/BUILD.gn b/interfaces/innerkits/BUILD.gn index 5730ca563522cf8a93b3b444ac160200cf656f5d..0858f3df0c5edf7e695fb8d8ab13f9eb08d290ac 100755 --- a/interfaces/innerkits/BUILD.gn +++ b/interfaces/innerkits/BUILD.gn @@ -54,7 +54,6 @@ if (defined(ohos_lite)) { ] sources = [] include_dirs = include_common - include_dirs += [ "//base/hiviewdfx/hilog_lite/interfaces/native/kits" ] public_configs = [ ":exported_header_files" ] deps = [ "//base/hiviewdfx/hilog_lite/frameworks/featured:hilog_shared", diff --git a/interfaces/innerkits/init_module_engine/include/init_module_engine.h b/interfaces/innerkits/init_module_engine/include/init_module_engine.h index c6d28d1fe4fe822ea4ab4b056bb3cfd80d37c83f..880aa06fbf5db766724d627ce3288b4f9904a349 100755 --- a/interfaces/innerkits/init_module_engine/include/init_module_engine.h +++ b/interfaces/innerkits/init_module_engine/include/init_module_engine.h @@ -31,6 +31,8 @@ extern "C" { #endif #endif +typedef char *(*PropertyValueProcessor)(const char *key, char *value); + int SystemWriteParam(const char *name, const char *value); int SystemUpdateConstParam(const char *name, const char *value); @@ -48,6 +50,9 @@ void RemoveCmdExecutor(const char *cmdName, int id); int DoJobNow(const char *jobName); int GetParameterFromCmdLine(const char *paramName, char *value, size_t valueLen); + +PropertyValueProcessor SetPropertyGetProcessor(PropertyValueProcessor processor); + #ifdef __cplusplus #if __cplusplus } diff --git a/interfaces/innerkits/libbegetutil.versionscript b/interfaces/innerkits/libbegetutil.versionscript index 2654833e415a69d9458f3c526e6ce541ae73acb4..f6437aef44a9e8165f89772b6e531f469a9ffaee 100644 --- a/interfaces/innerkits/libbegetutil.versionscript +++ b/interfaces/innerkits/libbegetutil.versionscript @@ -160,6 +160,7 @@ OH_StrDictGet; OH_ExtendableStrDictGet; OpenConsole; + SetPropertyGetProcessor; local: *; }; diff --git a/services/init/lite/BUILD.gn b/services/init/lite/BUILD.gn index e587b521a57b26ffda6f15999990a33824eb2897..b81b8cc80befabb39c15ad9fc13ac1ad3f2d7342 100644 --- a/services/init/lite/BUILD.gn +++ b/services/init/lite/BUILD.gn @@ -55,7 +55,6 @@ executable("init") { "//base/startup/init/interfaces/innerkits/include/param", "//base/startup/init/services/init/include", "//third_party/cJSON", - "//base/hiviewdfx/hilog_lite/interfaces/native/kits", ] ldflags = [] @@ -94,9 +93,11 @@ executable("init") { ] deps += [ "//base/startup/init/services/param/linux:param_init", - "//third_party/mksh", ] external_deps += [ "toybox:toybox" ] + if (init_mksh_enable) { + external_deps += [ "mksh:sh" ] + } } if (init_feature_use_hook_mgr) { diff --git a/services/init/standard/BUILD.gn b/services/init/standard/BUILD.gn index 40ca304983b75ef2090c83cf698468a7e5038a5e..a2985c3aaba762e185b1e6ab7c5b23303aa2da34 100644 --- a/services/init/standard/BUILD.gn +++ b/services/init/standard/BUILD.gn @@ -119,10 +119,7 @@ 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", - ] + external_deps = [ "config_policy:configpolicy_util_for_init_static" ] if (!defined(ohos_lite)) { include_dirs += [ @@ -135,7 +132,6 @@ ohos_executable("init") { } deps += [ "//base/startup/init/ueventd:libueventd_ramdisk_static" ] - external_deps += [ "storage_service:libfscryptutils_static" ] external_deps += [ "bounds_checking_function:libsec_shared", "cJSON:cjson_static", @@ -144,9 +140,9 @@ ohos_executable("init") { 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 += [ "${foundation_fscrypt_path}/libfscrypt:libfscryptutils_static" ] external_deps += [ "hilog:libhilog", - "storage_service:libfscryptutils_static", ] defines = [] if (defined(global_parts_info) && @@ -175,9 +171,11 @@ ohos_executable("init") { } if (use_musl) { external_deps += [ - "mksh:sh", "toybox:toybox", ] + if (init_mksh_enable) { + external_deps += [ "mksh:sh" ] + } } if (build_seccomp) { diff --git a/test/unittest/BUILD.gn b/test/unittest/BUILD.gn index 38c71982e4cf09703fb7bda24396d7b96a755b81..37dee52170de106b577f042eb959a8e2ef150ecb 100755 --- a/test/unittest/BUILD.gn +++ b/test/unittest/BUILD.gn @@ -361,7 +361,6 @@ ohos_unittest("init_unittest") { "init:libinit_module_engine", "mbedtls:mbedtls_shared", "selinux:libselinux", - "storage_service:libfscryptutils_static", "zlib:libz", ] if (defined(global_parts_info) &&