Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Startup Init Lite
提交
49a2a576
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看板
未验证
提交
49a2a576
编写于
5月 17, 2022
作者:
O
openharmony_ci
提交者:
Gitee
5月 17, 2022
浏览文件
操作
浏览文件
下载
差异文件
!615 extra_paras for ohos_prebuilt_para supports list
Merge pull request !615 from handy/0516
上级
2c48b4f2
ea3f149a
变更
3
隐藏空白更改
内联
并排
Showing
3 changed file
with
21 addition
and
22 deletion
+21
-22
services/etc/BUILD.gn
services/etc/BUILD.gn
+3
-3
services/etc/param/param_fixer.gni
services/etc/param/param_fixer.gni
+11
-7
services/etc/param/param_fixer.py
services/etc/param/param_fixer.py
+7
-12
未找到文件。
services/etc/BUILD.gn
浏览文件 @
49a2a576
...
...
@@ -120,18 +120,18 @@ if (defined(ohos_lite)) {
source = "//base/startup/init_lite/services/etc/param/ohos.para"
part_name = "init"
if (target_cpu == "arm64") {
extra_paras =
"const.product.cpu.abilist=arm64-v8a"
extra_paras =
[ "const.product.cpu.abilist=arm64-v8a" ]
}
module_install_dir = "etc/param"
}
ohos_prebuilt_
etc
("ohos.para.dac") {
ohos_prebuilt_
para
("ohos.para.dac") {
source = "//base/startup/init_lite/services/etc/param/ohos.para.dac"
part_name = "init"
module_install_dir = "etc/param"
}
ohos_prebuilt_
etc
("ohos_const.para") {
ohos_prebuilt_
para
("ohos_const.para") {
source = "//base/startup/init_lite/services/etc/param/ohos_const/ohos.para"
part_name = "init"
module_install_dir = "etc/param/ohos_const"
...
...
services/etc/param/param_fixer.gni
浏览文件 @
49a2a576
...
...
@@ -19,9 +19,9 @@ template("ohos_prebuilt_para") {
_fixed_param_target = "${target_name}_param_fixed"
_fixed_param_file = target_gen_dir + "/${target_name}.fixed/" +
get_path_info(_fixed_param_target, "file")
_output_para_file = get_path_info(invoker.source, "file")
get_path_info(invoker.source, "file")
_output_para_file = get_path_info(invoker.source, "file")
action_with_pydeps(_fixed_param_target) {
deps = []
script = "//base/startup/init_lite/services/etc/param/param_fixer.py"
...
...
@@ -35,10 +35,12 @@ template("ohos_prebuilt_para") {
rebase_path(depfile, root_build_dir),
]
if (defined(invoker.extra_paras)) {
args += [
"--extra",
invoker.extra_paras,
]
foreach(extra, invoker.extra_paras) {
args += [
"--extra",
extra,
]
}
}
inputs = [ invoker.source ]
outputs = [ _fixed_param_file ]
...
...
@@ -68,9 +70,11 @@ template("ohos_prebuilt_para") {
])
set_sources_assignment_filter([])
sources = [ _fixed_param_file ]
outputs = [ "${target_out_dir}/${_output_para_file}" ]
outputs = [ "${target_out_dir}/${
target_name}/${
_output_para_file}" ]
module_type = "etc"
install_enable = true
module_source_dir = "${target_out_dir}/${target_name}"
module_install_name = _output_para_file
if (defined(invoker.install_enable)) {
install_enable = invoker.install_enable
}
...
...
services/etc/param/param_fixer.py
浏览文件 @
49a2a576
...
...
@@ -28,7 +28,7 @@ def parse_args(args):
build_utils
.
add_depfile_option
(
parser
)
parser
.
add_option
(
'--output'
,
help
=
'fixed para file'
)
parser
.
add_option
(
'--source-file'
,
help
=
'source para file'
)
parser
.
add_option
(
'--extra'
,
help
=
'extra params'
)
parser
.
add_option
(
'--extra'
,
action
=
"append"
,
type
=
"string"
,
dest
=
"extra"
,
help
=
'extra params'
)
options
,
_
=
parser
.
parse_args
(
args
)
return
options
...
...
@@ -45,10 +45,9 @@ def parse_params(line, contents):
contents
[
name
]
=
value
def
parse_extra_params
(
extras
,
contents
):
lines
=
extras
.
split
(
" "
)
for
line
in
lines
:
line
=
line
.
strip
()
parse_params
(
line
,
contents
)
for
extra
in
extras
:
extra
=
extra
.
strip
()
parse_params
(
extra
,
contents
)
def
fix_para_file
(
options
):
contents
=
{}
...
...
@@ -75,13 +74,9 @@ def main(args):
depfile_deps
=
([
options
.
source_file
])
build_utils
.
call_and_write_depfile_if_stale
(
lambda
:
fix_para_file
(
options
),
options
,
input_paths
=
depfile_deps
,
output_paths
=
([
options
.
output
]),
force
=
False
,
add_pydeps
=
False
)
fix_para_file
(
options
)
build_utils
.
write_depfile
(
options
.
depfile
,
options
.
output
,
depfile_deps
,
add_pydeps
=
False
)
if
__name__
==
'__main__'
:
sys
.
exit
(
main
(
sys
.
argv
[
1
:]))
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录