未验证 提交 6f4f8dba 编写于 作者: O openharmony_ci 提交者: Gitee

!1357 南向适配,归一化一级二级启动

Merge pull request !1357 from cheng_jinsong/normalize_startup
...@@ -60,6 +60,7 @@ if (defined(ohos_lite)) { ...@@ -60,6 +60,7 @@ if (defined(ohos_lite)) {
} else { } else {
source = "//base/startup/init/services/etc/init.cfg" source = "//base/startup/init/services/etc/init.cfg"
} }
output = "init.cfg"
part_name = "init" part_name = "init"
subsystem_name = "startup" subsystem_name = "startup"
} }
......
...@@ -38,11 +38,7 @@ void DumpAllJobs(void); ...@@ -38,11 +38,7 @@ void DumpAllJobs(void);
int DoJobNow(const char *jobName); int DoJobNow(const char *jobName);
#ifndef DISABLE_INIT_TWO_STAGES
#define INIT_CONFIGURATION_FILE "/etc/init.cfg" #define INIT_CONFIGURATION_FILE "/etc/init.cfg"
#else
#define INIT_CONFIGURATION_FILE "/etc/init.without_two_stages.cfg"
#endif
#define OTHER_CFG_PATH "/system/etc/init" #define OTHER_CFG_PATH "/system/etc/init"
#define OTHER_CHARGE_PATH "/vendor/etc/charger" #define OTHER_CHARGE_PATH "/vendor/etc/charger"
#define MAX_PATH_ARGS_CNT 20 #define MAX_PATH_ARGS_CNT 20
......
...@@ -123,9 +123,6 @@ ohos_executable("init") { ...@@ -123,9 +123,6 @@ ohos_executable("init") {
defines += [ "SUPPORT_64BIT" ] defines += [ "SUPPORT_64BIT" ]
} }
if (!enable_ramdisk) {
defines += [ "DISABLE_INIT_TWO_STAGES" ]
}
if (defined(global_parts_info.developtools_profiler)) { if (defined(global_parts_info.developtools_profiler)) {
defines += [ "SUPPORT_PROFILER_HIDEBUG" ] defines += [ "SUPPORT_PROFILER_HIDEBUG" ]
external_deps = [ "profiler:libhidebug_init" ] external_deps = [ "profiler:libhidebug_init" ]
......
...@@ -206,7 +206,6 @@ static void StartInitSecondStage(void) ...@@ -206,7 +206,6 @@ static void StartInitSecondStage(void)
// It will panic if close stdio before execv("/bin/sh", NULL) // It will panic if close stdio before execv("/bin/sh", NULL)
CloseStdio(); CloseStdio();
#ifndef DISABLE_INIT_TWO_STAGES
INIT_LOGI("Start init second stage."); INIT_LOGI("Start init second stage.");
SwitchRoot("/usr"); SwitchRoot("/usr");
// Execute init second stage // Execute init second stage
...@@ -219,7 +218,6 @@ static void StartInitSecondStage(void) ...@@ -219,7 +218,6 @@ static void StartInitSecondStage(void)
INIT_LOGE("Failed to exec \"/bin/init\", err = %d", errno); INIT_LOGE("Failed to exec \"/bin/init\", err = %d", errno);
exit(-1); exit(-1);
} }
#endif
} }
void SystemPrepare(void) void SystemPrepare(void)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册