Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
OpenHarmony
Build Lite
提交
d9e3cd24
B
Build Lite
项目概览
OpenHarmony
/
Build Lite
大约 1 年 前同步成功
通知
22
Star
24
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
1
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
B
Build Lite
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
1
Issue
1
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d9e3cd24
编写于
9月 06, 2022
作者:
W
weiyujin
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Code specification rectification
Signed-off-by:
N
weiyujin
<
weiyujin@huawei.com
>
上级
a8aadb4c
变更
7
隐藏空白更改
内联
并排
Showing
7 changed file
with
15 addition
and
11 deletion
+15
-11
hb/__entry__.py
hb/__entry__.py
+1
-0
hb/__main__.py
hb/__main__.py
+1
-0
hb_internal/build/build.py
hb_internal/build/build.py
+2
-2
hb_internal/build/part_rom_statistics.py
hb_internal/build/part_rom_statistics.py
+1
-1
hb_internal/common/product.py
hb_internal/common/product.py
+1
-1
hb_internal/env/env.py
hb_internal/env/env.py
+4
-4
hb_internal/preloader/preloader.py
hb_internal/preloader/preloader.py
+5
-3
未找到文件。
hb/__entry__.py
浏览文件 @
d9e3cd24
...
@@ -25,6 +25,7 @@ import traceback
...
@@ -25,6 +25,7 @@ import traceback
VERSION
=
"0.4.6"
VERSION
=
"0.4.6"
def
find_top
():
def
find_top
():
cur_dir
=
os
.
getcwd
()
cur_dir
=
os
.
getcwd
()
while
cur_dir
!=
"/"
:
while
cur_dir
!=
"/"
:
...
...
hb/__main__.py
浏览文件 @
d9e3cd24
...
@@ -31,6 +31,7 @@ entry = importlib.import_module("__entry__")
...
@@ -31,6 +31,7 @@ entry = importlib.import_module("__entry__")
sys.exit(entry.main())
sys.exit(entry.main())
"""
"""
def
find_top
():
def
find_top
():
cur_dir
=
os
.
getcwd
()
cur_dir
=
os
.
getcwd
()
while
cur_dir
!=
"/"
:
while
cur_dir
!=
"/"
:
...
...
hb_internal/build/build.py
浏览文件 @
d9e3cd24
...
@@ -23,8 +23,8 @@ from hb_internal.build.build_process import Build
...
@@ -23,8 +23,8 @@ from hb_internal.build.build_process import Build
from
hb_internal.set.set
import
set_product
from
hb_internal.set.set
import
set_product
from
hb_internal.common.utils
import
get_current_time
from
hb_internal.common.utils
import
get_current_time
from
hb_internal.common.utils
import
OHOSException
from
hb_internal.common.utils
import
OHOSException
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../../../"
)))
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../../../"
)))
from
scripts.tools_checker
import
check_build_requried_packages
,
check_os_version
from
scripts.tools_checker
import
check_build_requried_packages
,
check_os_version
def
add_options
(
parser
):
def
add_options
(
parser
):
...
...
hb_internal/build/part_rom_statistics.py
浏览文件 @
d9e3cd24
...
@@ -134,7 +134,7 @@ def check_image_size(out_path):
...
@@ -134,7 +134,7 @@ def check_image_size(out_path):
for
file
in
os
.
listdir
(
image_path
):
for
file
in
os
.
listdir
(
image_path
):
if
file
.
endswith
(
".img"
):
if
file
.
endswith
(
".img"
):
image_dict
=
{}
image_dict
=
{}
img_path
=
os
.
path
.
join
(
image_path
,
file
)
img_path
=
os
.
path
.
join
(
image_path
,
file
)
image_dict
[
'img_size'
]
=
f
'
{
round
(
os
.
path
.
getsize
(
img_path
)
/
1024
,
2
)
}
KB'
image_dict
[
'img_size'
]
=
f
'
{
round
(
os
.
path
.
getsize
(
img_path
)
/
1024
,
2
)
}
KB'
image_dict
[
'img_name'
]
=
file
image_dict
[
'img_name'
]
=
file
image_list
.
append
(
image_dict
)
image_list
.
append
(
image_dict
)
...
...
hb_internal/common/product.py
浏览文件 @
d9e3cd24
...
@@ -165,7 +165,7 @@ class Product():
...
@@ -165,7 +165,7 @@ class Product():
config
=
Config
()
config
=
Config
()
# Get all inherit files
# Get all inherit files
files
=
[
os
.
path
.
join
(
config
.
root_path
,
file
)
for
file
in
read_json_file
(
product_json
).
get
(
'inherit'
,
[])
]
files
=
[
os
.
path
.
join
(
config
.
root_path
,
file
)
for
file
in
read_json_file
(
product_json
).
get
(
'inherit'
,
[])
]
# Add the product config file to last with highest priority
# Add the product config file to last with highest priority
files
.
append
(
product_json
)
files
.
append
(
product_json
)
...
...
hb_internal/env/env.py
浏览文件 @
d9e3cd24
...
@@ -21,8 +21,8 @@ import sys
...
@@ -21,8 +21,8 @@ import sys
from
hb_internal
import
CONFIG_JSON
from
hb_internal
import
CONFIG_JSON
from
hb_internal.common.utils
import
read_json_file
from
hb_internal.common.utils
import
read_json_file
from
hb_internal.common.utils
import
hb_info
from
hb_internal.common.utils
import
hb_info
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../../../"
)))
from
scripts.tools_checker
import
check_build_requried_packages
,
check_os_version
from
scripts.tools_checker
import
check_build_requried_packages
,
check_os_version
sys
.
path
.
append
(
os
.
path
.
abspath
(
os
.
path
.
join
(
os
.
path
.
dirname
(
__file__
),
"../../../"
)))
OPTIONS_FUN_LIST
=
[
OPTIONS_FUN_LIST
=
[
...
@@ -41,7 +41,7 @@ def add_options(parser):
...
@@ -41,7 +41,7 @@ def add_options(parser):
def
check_dep
():
def
check_dep
():
host_info
=
check_os_version
()
host_info
=
check_os_version
()
packages_info
=
check_build_requried_packages
(
host_info
[
1
],
check
=
False
)
packages_info
=
check_build_requried_packages
(
host_info
[
1
],
check
=
False
)
hb_info
(
'necessary_package: {}'
.
format
(
','
.
join
(
packages_info
[
0
])))
hb_info
(
'necessary_package: {}'
.
format
(
','
.
join
(
packages_info
[
0
])))
hb_info
(
'installed_package: {}'
.
format
(
','
.
join
(
packages_info
[
1
])))
hb_info
(
'installed_package: {}'
.
format
(
','
.
join
(
packages_info
[
1
])))
hb_info
(
'uninstalled_package: {}'
.
format
(
','
.
join
(
packages_info
[
2
])))
hb_info
(
'uninstalled_package: {}'
.
format
(
','
.
join
(
packages_info
[
2
])))
...
@@ -82,4 +82,4 @@ def exec_command(args):
...
@@ -82,4 +82,4 @@ def exec_command(args):
para_to_function
(
para
)
para_to_function
(
para
)
break
break
else
:
else
:
check_os_info
()
check_os_info
()
\ No newline at end of file
hb_internal/preloader/preloader.py
浏览文件 @
d9e3cd24
...
@@ -18,14 +18,14 @@ import os
...
@@ -18,14 +18,14 @@ import os
import
sys
import
sys
import
argparse
import
argparse
sys
.
path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))))
from
hb_internal.common.config
import
Config
from
hb_internal.common.config
import
Config
from
hb_internal.common.utils
import
read_json_file
from
hb_internal.common.utils
import
read_json_file
from
hb_internal.common.utils
import
dump_json_file
from
hb_internal.common.utils
import
dump_json_file
from
hb_internal.preloader.parse_lite_subsystems_config
import
parse_lite_subsystem_config
from
hb_internal.preloader.parse_lite_subsystems_config
import
parse_lite_subsystem_config
from
hb_internal.preloader.parse_vendor_product_config
import
get_vendor_parts_list
from
hb_internal.preloader.parse_vendor_product_config
import
get_vendor_parts_list
sys
.
path
.
append
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
dirname
(
os
.
path
.
abspath
(
__file__
)))))
def
_get_base_parts
(
base_config_dir
,
os_level
):
def
_get_base_parts
(
base_config_dir
,
os_level
):
...
@@ -49,6 +49,7 @@ def _get_inherit_parts(inherit, source_root_dir):
...
@@ -49,6 +49,7 @@ def _get_inherit_parts(inherit, source_root_dir):
inherit_parts
.
update
(
get_vendor_parts_list
(
_info
))
inherit_parts
.
update
(
get_vendor_parts_list
(
_info
))
return
inherit_parts
return
inherit_parts
def
_get_sys_relate_parts
(
system_component_info
,
_parts
,
source_root_dir
):
def
_get_sys_relate_parts
(
system_component_info
,
_parts
,
source_root_dir
):
_info
=
read_json_file
(
os
.
path
.
join
(
source_root_dir
,
system_component_info
))
_info
=
read_json_file
(
os
.
path
.
join
(
source_root_dir
,
system_component_info
))
ret
=
{}
ret
=
{}
...
@@ -60,6 +61,7 @@ def _get_sys_relate_parts(system_component_info, _parts, source_root_dir):
...
@@ -60,6 +61,7 @@ def _get_sys_relate_parts(system_component_info, _parts, source_root_dir):
ret
[
part
]
=
featrue
ret
[
part
]
=
featrue
return
ret
return
ret
def
_get_device_info
(
device_name
,
config_dir
):
def
_get_device_info
(
device_name
,
config_dir
):
device_config_file
=
os
.
path
.
join
(
config_dir
,
device_config_file
=
os
.
path
.
join
(
config_dir
,
'{}.json'
.
format
(
device_name
))
'{}.json'
.
format
(
device_name
))
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录