# Copyright (c) 2021 Huawei Device Co., Ltd. # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # 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") import("//build/ohos.gni") ohos_executable("begetctl") { sources = [ "bootchart_cmd.c", "init_cmd_reboot.c", "main.c", "misc_daemon.cpp", "param_cmd.c", "service_control.c", "shell/shell_bas.c", ] defines = [ "INIT_AGENT" ] if (defined(product_name) && product_name == "rk3568") { defines += [ "PRODUCT_RK" ] } include_dirs = [ ".", "shell", "//base/startup/init_lite/services/include", "//base/startup/init_lite/services/log", "//base/startup/init_lite/interfaces/innerkits/include", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include", "//base/startup/init_lite/services/include/param/", "//base/startup/init_lite/services/param/include", "//base/startup/init_lite/services/loopevent/include", "//third_party/bounds_checking_function/include", ] deps = [ "//base/startup/init_lite/interfaces/innerkits:libbegetutil", "//base/startup/init_lite/services/log:agent_log", "//base/startup/init_lite/services/param:param_client", "//third_party/bounds_checking_function:libsec_static", ] if (param_test) { sources += [ "//base/startup/init_lite/test/plugintest/plugin_param_cmd.c" ] deps += [ "//base/startup/init_lite/interfaces/innerkits:libbeget_proxy", "//base/startup/init_lite/services/loopevent:loopevent", "//base/startup/init_lite/services/param/watcher:param_watcheragent", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", ] defines += [ "OHOS_SERVICE_DUMP", "INIT_TEST", ] } if (build_selinux) { include_dirs += [ "//third_party/selinux/libselinux/include/", "//base/security/selinux/interfaces/policycoreutils/include/", ] deps += [ "//third_party/selinux:libselinux", ] defines += [ "WITH_SELINUX" ] } symlink_target_name = [ "misc_daemon", "reboot", "devctl", "service", "service_control", "start_service", "stop_service", "service", "param", ] install_images = [ "system" ] install_enable = true part_name = "init" } ohos_executable("paramshell") { sources = [ "param_cmd.c", "shell/shell_bas.c", "shell/shell_main.c", ] defines = [ "INIT_AGENT" ] include_dirs = [ ".", "shell", "//base/startup/init_lite/services/include", "//base/startup/init_lite/services/log", "//base/startup/init_lite/interfaces/innerkits/include", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara/include", "//base/startup/init_lite/services/include/param/", "//base/startup/init_lite/services/loopevent/include", "//base/startup/init_lite/services/param/include", "//third_party/bounds_checking_function/include", ] deps = [ "//base/startup/init_lite/services/log:agent_log", "//base/startup/init_lite/services/param:param_client", "//third_party/bounds_checking_function:libsec_static", ] if (param_test) { sources += [ "//base/startup/init_lite/test/plugintest/plugin_param_cmd.c" ] deps += [ "//base/startup/init_lite/interfaces/innerkits:libbeget_proxy", "//base/startup/init_lite/services/loopevent:loopevent", "//base/startup/init_lite/services/param/watcher:param_watcheragent", "//base/startup/syspara_lite/interfaces/innerkits/native/syspara:syspara", ] defines += [ "OHOS_SERVICE_DUMP", "INIT_TEST", ] } install_images = [ "system" ] install_enable = true part_name = "init" }