提交 21d5bfb6 编写于 作者: Z zhong_ning

modify l1 build

Signed-off-by: Nzhong_ning <zhong_ning@hoperun.com>
上级 924b03da
......@@ -25,9 +25,8 @@ ohos_static_library("libreboot") {
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
"//base/startup/init_lite/services/param:paramclient",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param:paramclient",
"//third_party/bounds_checking_function:libsec_static",
]
}
......@@ -17,11 +17,7 @@ ohos_static_library("libsocket") {
"//base/startup/init_lite/interfaces/innerkits/socket/init_socket_api.c",
]
include_dirs = [
"//base/startup/init_lite/interfaces/innerkits/include",
]
include_dirs = [ "//base/startup/init_lite/interfaces/innerkits/include" ]
deps = [
]
deps = []
}
......@@ -25,13 +25,13 @@ if (defined(ohos_lite)) {
"src/init_import.c",
"src/init_jobs.c",
"src/init_read_cfg.c",
"src/init_reboot.c",
"src/init_service.c",
"src/init_service_manager.c",
"src/init_service_socket.c",
"src/init_signal_handler.c",
"src/init_utils.c",
"src/main.c",
"src/init_reboot.c",
]
include_dirs = [
......@@ -76,9 +76,8 @@ if (defined(ohos_lite)) {
if (ohos_build_type == "debug") {
group("unittest") {
deps = [
"//base/startup/init_lite/services/test/unittest/common:unittest",
]
deps =
[ "//base/startup/init_lite/services/test/unittest/common:unittest" ]
}
}
} else {
......@@ -94,8 +93,8 @@ if (defined(ohos_lite)) {
"//base/startup/init_lite/services/log",
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
"//base/startup/init_lite/services/log:init_log",
"//third_party/bounds_checking_function:libsec_static",
]
install_enable = true
part_name = "init"
......@@ -110,13 +109,13 @@ if (defined(ohos_lite)) {
"src/init_import.c",
"src/init_jobs.c",
"src/init_read_cfg.c",
"src/init_reboot.c",
"src/init_service.c",
"src/init_service_manager.c",
"src/init_service_socket.c",
"src/init_signal_handler.c",
"src/init_utils.c",
"src/main.c",
"src/init_reboot.c",
]
include_dirs = [
"//base/startup/init_lite/services/include/param",
......@@ -127,8 +126,8 @@ if (defined(ohos_lite)) {
"//third_party/libuv/include",
]
deps = [
"//base/startup/init_lite/services/param:paramservice",
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param:paramservice",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/cJSON:cjson_static",
]
......@@ -152,10 +151,10 @@ if (defined(ohos_lite)) {
":init",
":init.cfg",
":updaterueventd",
"//base/startup/init_lite/services/param:paramservice",
"//base/startup/init_lite/services/param:setparam",
"//base/startup/init_lite/services/param:getparam",
"//base/startup/init_lite/services/param:paramclient",
"//base/startup/init_lite/services/param:paramservice",
"//base/startup/init_lite/services/param:setparam",
"//base/startup/init_lite/services/reboot:reboot",
]
}
......
......@@ -16,7 +16,7 @@
#ifndef BASE_STARTUP_INITLITE_ADAPTER_H
#define BASE_STARTUP_INITLITE_ADAPTER_H
#ifdef OHOS_LITE
#if defined OHOS_LITE && !defined __LINUX__
#include <sys/capability.h>
#else
#include <linux/capability.h>
......
......@@ -12,22 +12,14 @@
# limitations under the License.
if (defined(ohos_lite)) {
static_library("init_log") {
sources = [
"init_log.c",
]
public_deps = [
"//third_party/bounds_checking_function:libsec_static",
]
sources = [ "init_log.c" ]
public_deps = [ "//third_party/bounds_checking_function:libsec_static" ]
}
} else {
import("//build/ohos.gni")
ohos_static_library("init_log") {
sources = [
"init_log.c",
]
deps = [
"//third_party/bounds_checking_function:libsec_static",
]
sources = [ "init_log.c" ]
deps = [ "//third_party/bounds_checking_function:libsec_static" ]
part_name = "startup"
subsystem_name = "startup"
}
......
......@@ -61,18 +61,16 @@ ohos_static_library("paramclient") {
]
deps = [
"//base/startup/init_lite/services/log:init_log",
"//third_party/bounds_checking_function:libsec_static",
"//third_party/libuv:uv_static",
"//base/startup/init_lite/services/log:init_log"
]
part_name = "init"
subsystem_name = "startup"
}
ohos_executable("getparam") {
sources = [
"cmd/param_get.c",
]
sources = [ "cmd/param_get.c" ]
include_dirs = [
"include",
"//base/startup/init_lite/services/include/param",
......@@ -89,9 +87,7 @@ ohos_executable("getparam") {
}
ohos_executable("setparam") {
sources = [
"cmd/param_set.c",
]
sources = [ "cmd/param_set.c" ]
include_dirs = [
"include",
"//base/startup/init_lite/services/include/param",
......
......@@ -20,7 +20,7 @@
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef OHOS_LITE
#if defined OHOS_LITE && !defined __LINUX__
#include <sys/capability.h>
#else
#include <linux/capability.h>
......
......@@ -738,8 +738,10 @@ void StopServiceByName(const char* servName)
void StopAllServices()
{
for (int i = 0; i < g_servicesCnt; i++) {
if (ServiceStop(&g_services[i]) != SERVICE_SUCCESS) {
INIT_LOGE("StopAllServices, service %s stop failed!\n", g_services[i].name);
if (strcmp(g_services[i].name, "console") != 0 && strcmp(g_services[i].name, "ueventd") != 0) {
if (ServiceStop(&g_services[i]) != SERVICE_SUCCESS) {
INIT_LOGE("[Init] StopAllServices, service %s stop failed!\n", g_services[i].name);
}
}
}
}
......@@ -762,7 +764,7 @@ void ReapServiceByPID(int pid)
// important process exit, need to reboot system
g_services[i].pid = -1;
StopAllServices();
RebootSystem();
// RebootSystem();
}
ServiceReap(&g_services[i]);
break;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册