From 273069df69908490d5c9726175ae48ff6efe69f0 Mon Sep 17 00:00:00 2001 From: Mupceet Date: Wed, 6 Jul 2022 18:29:59 +0800 Subject: [PATCH] add init for param Signed-off-by: Mupceet --- services/source/BUILD.gn | 11 ++++++++--- services/source/system_init.c | 4 ++++ 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/services/source/BUILD.gn b/services/source/BUILD.gn index b3598ed..d44c754 100644 --- a/services/source/BUILD.gn +++ b/services/source/BUILD.gn @@ -10,6 +10,8 @@ # 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. +import("//base/startup/init_lite/begetd.gni") + static_library("bootstrap") { sources = [ "bootstrap_service.c", @@ -19,13 +21,16 @@ static_library("bootstrap") { "../source", "//foundation/distributedschedule/samgr_lite/interfaces/kits/samgr", "//utils/native/lite/include", + "//base/startup/init_lite/interfaces/innerkits/include/syspara", ] + defines = [] if (ohos_kernel_type == "liteos_m") { + if (enable_ohos_startup_init_lite_use_posix_file_api) { + defines += [ "SUPPORT_PARAM_SERVICE" ] + } include_dirs += [] } else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") { - include_dirs += [ - "//third_party/bounds_checking_function/include", - ] + include_dirs += [ "//third_party/bounds_checking_function/include" ] } cflags = [ "-Wall" ] } diff --git a/services/source/system_init.c b/services/source/system_init.c index fd66948..d031a30 100644 --- a/services/source/system_init.c +++ b/services/source/system_init.c @@ -15,9 +15,13 @@ #include "core_main.h" #include #include +#include "parameter.h" void OHOS_SystemInit(void) { +#ifdef SUPPORT_PARAM_SERVICE + InitParamService(); +#endif MODULE_INIT(bsp); MODULE_INIT(device); MODULE_INIT(core); -- Gitee