Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
a1eab9e3
S
Startup Init Lite
项目概览
OpenHarmony
/
Startup Init Lite
1 年多 前同步成功
通知
3
Star
37
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
S
Startup Init Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
未验证
提交
a1eab9e3
编写于
11月 03, 2022
作者:
O
openharmony_ci
提交者:
Gitee
11月 03, 2022
浏览文件
操作
浏览文件
下载
差异文件
!1462 系统优化:liteos 初始化处理
Merge pull request !1462 from cheng_jinsong/init1101
上级
d03a325f
f6acb7ed
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
12 addition
and
49 deletion
+12
-49
begetd.gni
begetd.gni
+5
-2
services/begetctl/BUILD.gn
services/begetctl/BUILD.gn
+0
-4
services/begetctl/init_cmd_reboot.c
services/begetctl/init_cmd_reboot.c
+2
-21
services/init/standard/BUILD.gn
services/init/standard/BUILD.gn
+0
-3
services/modules/reboot/BUILD.gn
services/modules/reboot/BUILD.gn
+0
-3
services/param/liteos/param_client.c
services/param/liteos/param_client.c
+5
-16
未找到文件。
begetd.gni
浏览文件 @
a1eab9e3
...
...
@@ -14,16 +14,19 @@
declare_args() {
enable_ohos_startup_init_feature_watcher = true
enable_ohos_startup_init_feature_deviceinfo = true
# only for test
param_test = true
param_base_log = false
enable_ohos_startup_init_feature_ab_partition = false
# init begetctl support liteos
enable_ohos_startup_init_feature_begetctl_liteos = false
# only support mbedtls for hash
enable_ohos_startup_init_lite_use_thirdparty_mbedtls = true
enable_ohos_startup_init_lite_use_posix_file_api = false
enable_ohos_startup_init_feature_loader = false
config_ohos_startup_init_lite_data_path = ""
config_ohos_startup_init_lite_data_path = "/"
# boot_kernel_extended_cmdline for extend cmdline
}
services/begetctl/BUILD.gn
浏览文件 @
a1eab9e3
...
...
@@ -76,10 +76,6 @@ if (defined(ohos_lite)) {
defines = [ "_GNU_SOURCE" ]
if (enable_ohos_startup_init_feature_loader) {
defines += [ "PRODUCT_RK" ]
}
include_dirs = common_include_dirs
deps = [
"//base/startup/init/interfaces/innerkits:libbegetutil",
...
...
services/begetctl/init_cmd_reboot.c
浏览文件 @
a1eab9e3
...
...
@@ -26,22 +26,6 @@ static int main_cmd(BShellHandle shell, int argc, char* argv[])
BShellCmdHelp
(
shell
,
argc
,
argv
);
return
0
;
}
if
(
argc
==
REBOOT_CMD_NUMBER
&&
strcmp
(
argv
[
1
],
"shutdown"
)
!=
0
&&
strcmp
(
argv
[
1
],
"updater"
)
!=
0
&&
strcmp
(
argv
[
1
],
"suspend"
)
!=
0
&&
strcmp
(
argv
[
1
],
"flashd"
)
!=
0
&&
#ifdef INIT_TEST
strcmp
(
argv
[
1
],
"charge"
)
!=
0
&&
#endif
#ifdef PRODUCT_RK
strcmp
(
argv
[
1
],
"loader"
)
!=
0
&&
#endif
strncmp
(
argv
[
1
],
"updater:"
,
strlen
(
"updater:"
))
!=
0
&&
strncmp
(
argv
[
1
],
"flashd:"
,
strlen
(
"flashd:"
))
!=
0
)
{
BShellCmdHelp
(
shell
,
argc
,
argv
);
return
0
;
}
int
ret
;
if
(
argc
==
REBOOT_CMD_NUMBER
)
{
ret
=
DoReboot
(
argv
[
1
]);
...
...
@@ -53,9 +37,11 @@ static int main_cmd(BShellHandle shell, int argc, char* argv[])
}
else
{
printf
(
"[reboot command] DoReboot Api return ok
\n
"
);
}
#ifndef STARTUP_INIT_TEST
while
(
1
)
{
pause
();
}
#endif
return
0
;
}
...
...
@@ -69,12 +55,7 @@ MODULE_CONSTRUCTOR(void)
{
"reboot"
,
main_cmd
,
"reboot and boot into updater"
,
"reboot updater[:options]"
,
""
},
{
"reboot"
,
main_cmd
,
"reboot and boot into flashd"
,
"reboot flashd"
,
""
},
{
"reboot"
,
main_cmd
,
"reboot and boot into flashd"
,
"reboot flashd[:options]"
,
""
},
#ifdef INIT_TEST
{
"reboot"
,
main_cmd
,
"reboot and boot into charge"
,
"reboot charge"
,
""
},
#endif
#ifdef PRODUCT_RK
{
"reboot"
,
main_cmd
,
"reboot loader"
,
"reboot loader"
,
""
}
#endif
};
for
(
size_t
i
=
sizeof
(
infos
)
/
sizeof
(
infos
[
0
]);
i
>
0
;
i
--
)
{
BShellEnvRegisterCmd
(
GetShellHandle
(),
&
infos
[
i
-
1
]);
...
...
services/init/standard/BUILD.gn
浏览文件 @
a1eab9e3
...
...
@@ -137,9 +137,6 @@ ohos_executable("init") {
defines += [ "ASAN_DETECTOR" ]
}
if (enable_ohos_startup_init_feature_loader) {
defines += [ "PRODUCT_RK" ]
}
version_script = get_label_info(
"//base/startup/init/interfaces/innerkits/init_module_engine:libinit_stub_versionscript",
"target_gen_dir") + "/" + get_label_info(
...
...
services/modules/reboot/BUILD.gn
浏览文件 @
a1eab9e3
...
...
@@ -27,9 +27,6 @@ ohos_shared_library("rebootmodule") {
external_deps = [ "init:libinit_module_engine" ]
defines = []
if (enable_ohos_startup_init_feature_loader) {
defines += [ "PRODUCT_RK" ]
}
part_name = "init"
subsystem_name = "startup"
if (target_cpu == "arm64") {
...
...
services/param/liteos/param_client.c
浏览文件 @
a1eab9e3
...
...
@@ -17,12 +17,10 @@
#include "param_manager.h"
#define MIN_SLEEP (100 * 1000)
static
int
g_flags
=
0
;
__attribute__
((
constructor
))
static
void
ClientInit
(
void
);
static
void
ClientDeinit
(
void
);
static
int
InitParamClient
(
void
)
#ifdef __LITEOS_A__
static
int
g_flags
=
0
;
__attribute__
((
constructor
))
static
int
ClientInit
(
void
)
{
if
(
PARAM_TEST_FLAG
(
g_flags
,
WORKSPACE_FLAGS_INIT
))
{
return
0
;
...
...
@@ -37,23 +35,14 @@ static int InitParamClient(void)
return
0
;
}
void
ClientInit
(
void
)
{
#ifdef __LITEOS_A__
#ifndef STARTUP_INIT_TEST
PARAM_LOGV
(
"ClientInit"
);
(
void
)
InitParamClient
();
#endif
#endif
}
void
ClientDeinit
(
void
)
__attribute__
((
destructor
))
static
void
ClientDeinit
(
void
)
{
if
(
PARAM_TEST_FLAG
(
g_flags
,
WORKSPACE_FLAGS_INIT
))
{
CloseParamWorkSpace
();
}
PARAM_SET_FLAG
(
g_flags
,
0
);
}
#endif
int
SystemSetParameter
(
const
char
*
name
,
const
char
*
value
)
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录