diff --git a/services/source/BUILD.gn b/services/source/BUILD.gn index b3598edcb2131a1c0f27414ff0b2e5a948f9a26e..d44c7543d1802fbc0db014fcfb5ec1d3caae34c0 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 fd6694837e5150bdfec2dc575aecb6182d9de752..d031a30af993004321a62f48a39e03db5d1d50c4 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);