From a21229486a7e05464dbec68218f0174006e2cb27 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E4=BD=B3=E4=BC=9F?= Date: Sat, 16 Aug 2025 15:26:34 +0800 Subject: [PATCH] =?UTF-8?q?Description:gn=E6=96=87=E4=BB=B6=E6=95=B4?= =?UTF-8?q?=E6=94=B9=20IssueNo:https://gitee.com/openharmony/startup=5Fini?= =?UTF-8?q?t/issues/ICTA3H=20Binary=20Source:No=20Signed-off-by:=20songjia?= =?UTF-8?q?wei9=20?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- begetd.gni | 6 ++++++ bundle.json | 4 ++-- interfaces/innerkits/BUILD.gn | 1 - .../init_module_engine/include/init_module_engine.h | 5 +++++ interfaces/innerkits/libbegetutil.versionscript | 1 + services/init/lite/BUILD.gn | 5 +++-- services/init/standard/BUILD.gn | 4 +++- 7 files changed, 20 insertions(+), 6 deletions(-) diff --git a/begetd.gni b/begetd.gni index 1bcc555e8..e7a7bb402 100644 --- a/begetd.gni +++ b/begetd.gni @@ -91,4 +91,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 4ea02f8e9..3b3d8596a 100755 --- a/bundle.json +++ b/bundle.json @@ -77,10 +77,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 5730ca563..0858f3df0 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 c6d28d1fe..880aa06fb 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 2654833e4..f6437aef4 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 e587b521a..b81b8cc80 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 40ca30498..6f3cecd43 100644 --- a/services/init/standard/BUILD.gn +++ b/services/init/standard/BUILD.gn @@ -175,9 +175,11 @@ ohos_executable("init") { } if (use_musl) { external_deps += [ - "mksh:sh", "toybox:toybox", ] + if (init_mksh_enable) { + external_deps += [ "mksh:sh" ] + } } if (build_seccomp) { -- Gitee