提交 2825bb5a 编写于 作者: Y yangming_ha 提交者: Gitee

Merge branch 'master' of gitee.com:openharmony/build_lite into master

......@@ -29,7 +29,7 @@
"appexecfwk_lite",
"huks",
"ui",
"syapara_lite",
"syspara_lite",
"surface",
"i18n_lite",
"resmgr_lite",
......
......@@ -101,19 +101,16 @@
"kernel_special": {},
"board_special": {},
"components": [
"syspara",
"bundle_mgr",
"media_lite",
"media_service",
"camera_lite",
"permission",
"ability",
"ipc",
"wpa_supplicant",
"graphic",
"hilog",
"utils_base",
"system_ability_manager"
"aafwk_lite",
"appexecfwk_lite",
"surface",
"ui",
"graphic_utils",
"kv_store",
"syspara_lite",
"ipc_lite",
"samgr_lite",
"utils_base"
]
}
},
......@@ -179,11 +176,10 @@
"components": [
"hilog",
"huks",
"token",
"syspara",
"ipc",
"ability",
"bundle_mgr",
"syspara_lite",
"ipc_lite",
"aafwk_lite",
"appexecfwk_lite",
"kv_store"
],
"third_party": [
......
......@@ -60,7 +60,7 @@
"kernel_special": {},
"board_special": {},
"components": [
"deviceauth",
"hichainsdk",
"syspara_lite",
"permission"
]
......
......@@ -84,7 +84,7 @@
],
"targets": [
"//foundation/distributedschedule/dmsfwk_lite:dtbschedmgr",
"//foundation/distributedschedule/dmsfwk_lite/moduletest/dtbschedmgr_lite:distributed_schedule_test_dms"
"//foundation/distributedschedule/dmsfwk_lite/moduletest/dtbschedmgr_lite:distributed_schedule_test_dms_door"
],
"rom": "26KB",
"ram": "",
......
{
"components": [
{
"component": "dbm_kv_store",
"discription": "it supports storage of local lightweight key-value pairs",
"optional": "true",
"dirs": [
"foundation/distributeddatamgr/appdatamgr/appdatamgr_lite"
],
"targets": [
"//foundation/distributeddatamgr/appdatamgr/appdatamgr_lite:dbm_kv_store"
],
"rom": "13KB",
"ram": "80k",
"output": [
"libdbm_kv_store.so",
"libdbm_kv_store.a"
],
"adapted_kernel": [
"liteos_a",
"liteos_m",
"linux"
],
"features": [],
"deps": {
"third_party": [
"bounds_checking_function"
],
"kernel_special": {},
"board_special": {},
"components": [
"utils_base"
]
}
}
]
}
......@@ -66,6 +66,8 @@
"deps": {
"third_party": [
"bounds_checking_function"
],
"components": [
]
}
}
......
......@@ -45,7 +45,7 @@
"bounds_checking_function"
],
"components": [
"lite_graphic_utils"
"graphic_utils"
]
}
},
......@@ -72,7 +72,7 @@
],
"components": [
"hilog_lite",
"ipc",
"ipc_lite",
"peripheral_display",
"peripheral_input"
],
......@@ -102,8 +102,8 @@
],
"components": [
"hilog_lite",
"ipc",
"system_ability_manager",
"ipc_lite",
"samgr_lite",
"surface",
"peripheral_display",
"peripheral_input"
......
......@@ -38,7 +38,7 @@
],
"components": [
"hiview_lite",
"system_ability_manager"
"samgr_lite"
]
}
},
......@@ -117,7 +117,7 @@
"components": [
"utils_base",
"hiview_lite",
"system_ability_manager"
"samgr_lite"
],
"third_party": []
}
......
......@@ -94,17 +94,15 @@
"description": "linux 4.1.9",
"optional": "false",
"dirs": [
"vendor/hisi/camera/dvkit_product/linux/hi3516dv300/Hi3516CV500_SDK_V2.0.3.0"
"kernel/linux/patches"
],
"targets": [
"//vendor/hisi/camera/dvkit_product/linux/hi3516dv300/Hi3516CV500_SDK_V2.0.3.0:linux_kernel"
"//kernel/linux/patches:linux_kernel"
],
"rom": "",
"ram": "",
"output": [
"u-boot-hi3516dv300.bin",
"uImage_hi3516dv300_smp",
"rootfs.img"
"uImage_hi3516dv300_smp"
],
"features": [],
"adapted_board": [
......
......@@ -40,7 +40,7 @@
"audio_manager_lite",
"camera_lite",
"permission",
"ipc",
"ipc_lite",
"ui"
]
}
......@@ -116,7 +116,7 @@
"audio_manager_lite",
"camera_lite",
"permission",
"ipc",
"ipc_lite",
"ui"
]
}
......
......@@ -126,10 +126,10 @@
"board_special": {},
"components": [
"hilog_lite",
"system_ability_manager",
"ipc",
"samgr_lite",
"ipc_lite",
"kv_store",
"ability",
"aafwk_lite",
"ace_engine_lite",
"surface",
"ui"
......
......@@ -55,11 +55,11 @@
"deps": {
"components": [
"hilog",
"bundle_mgr",
"system_ability_manager",
"distributed_schedule",
"appexecfwk_lite",
"samgr_lite",
"dmsfwk_lite",
"utils_base",
"ipc"
"ipc_lite"
],
"third_party": [
"cjson",
......
......@@ -122,7 +122,7 @@ if(ohos_current_toolchain == "ohos_clang") {
if (ohos_kernel_type == "liteos_a") {
target_kernel = "arm-liteos"
} else if (ohos_kernel_type == "linux") {
target_kernel = "arm-linux-musl"
target_kernel = "arm-linux-ohosmusl"
}
copy("ohos_clang_runtime") {
sources = [
......@@ -146,13 +146,16 @@ config("ohos_clang") {
cflags_cc = cflags
ldflags = cflags
if (ohos_kernel_type == "linux") {
defines = [ "_LIBCPP_HAS_MUSL_LIBC" ]
defines = [
"_LIBCPP_HAS_MUSL_LIBC",
"__BUILD_LINUX_WITH_CLANG",
]
}
ldflags += [
"-L${clang_dir}/lib/${target_kernel}/c++",
"-L${ohos_root_path}prebuilts/lite/sysroot/usr/lib/${target_kernel}",
"-L${clang_dir}/lib/clang/9.0.0/lib/${target_kernel}",
"-L${clang_dir}/lib/clang/current/lib/${target_kernel}",
"-lclang_rt.builtins",
"-lc",
"-lc++",
......
......@@ -96,9 +96,14 @@ if (ohos_build_type == "debug") {
default_target_configs += [ "//build/lite/config:release" ]
}
if (ohos_kernel_type == "liteos_a") {
default_target_configs += [
"//build/lite/config/kernel/liteos/cortex_a:default"
]
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
default_target_configs += [
"//build/lite/config/kernel/liteos/cortex_a:default",
"//build/lite/config:security",
"//build/lite/config:exceptions",
]
......
......@@ -54,7 +54,7 @@ template("lite_library") {
if (shared_lib) {
cflags += [ "-fPIC" ]
cflags_cc += [ "-fPIC" ]
} else {
} else if (!shared_lib && ohos_kernel_type != "liteos_m") {
cflags += [ "-fPIE" ]
cflags_cc += [ "-fPIE" ]
}
......
......@@ -13,6 +13,15 @@
import("//build/lite/config/subsystem/aafwk/path.gni")
declare_args() {
ohos_test_args = ""
}
test_target_type = "executable"
if(ohos_test_args == "notest") {
test_target_type = "group"
}
# liteos c test template
test_common_include_dirs = [ "//third_party/googletest/googletest/include" ]
......@@ -80,7 +89,10 @@ template("unittest") {
_gen_module_list_script = "//build/lite/testfwk/gen_module_list_files.py"
exec_script(_gen_module_list_script, _arguments)
executable(target_name) {
target(test_target_type, target_name) {
if (ohos_test_args == "notest") {
not_needed(invoker, "*")
}
if (defined(invoker.output_dir)) {
output_dir = invoker.output_dir
}
......@@ -110,7 +122,7 @@ template("unittest") {
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
deps += [ "//test/developertest/third_party/lib/cpp:gtest_main" ]
}
if (defined(invoker.configs)) {
if (defined(invoker.configs) && ohos_test_args != "notest") {
configs += invoker.configs
}
cflags = [ "-Wno-error" ]
......@@ -130,6 +142,9 @@ template("unittest") {
"-pthread",
]
}
if (ohos_test_args == "notest") {
not_needed(["output_dir", "sources", "include_dirs", "deps", "public_deps", "defines", "configs", "cflags", "ldflags", "output_extension"])
}
}
}
......
......@@ -90,11 +90,14 @@ class Build():
@test.setter
def test(self, test_args):
cmd_list = ['xts']
cmd_list = ['xts', 'notest']
if test_args[0] in cmd_list:
self._test = test_args[1]
if len(test_args) > 1:
self.register_args('ohos_xts_test_args', self._test)
if test_args[0] == 'notest':
self.register_args('ohos_test_args', 'notest')
else:
self._test = test_args[1]
if len(test_args) > 1:
self.register_args('ohos_xts_test_args', self._test)
else:
raise OHOSException('Error: wrong input of test')
......
......@@ -24,6 +24,7 @@ from hb.common.utils import exec_command
from hb.common.utils import makedirs
from hb.common.utils import read_yaml_file
from hb.common.utils import hb_info
from hb.common.utils import hb_warning
from hb.common.config import Config
......@@ -107,8 +108,11 @@ class Packer():
makedirs(target_path)
self.chmod_dirs.append((target_path, dir_mode))
tfile = os.path.join(target_path, os.path.basename(source_path))
shutil.copy(sfile, tfile, follow_symlinks=False)
self.chmod_dirs.append((tfile, file_mode))
try:
shutil.copy(sfile, tfile, follow_symlinks=False)
self.chmod_dirs.append((tfile, file_mode))
except FileExistsError:
hb_warning(f'Target file: {tfile} already exists!')
if os.path.isfile(spath):
sfile = spath
......
......@@ -51,7 +51,11 @@ if [ "${FSTYPE}" = "jffs2" ]; then
else
tool_check ${JFFS2_TOOL}
if [[ "${ROOTFS_DIR}" = *"rootfs" ]]; then
${JFFS2_TOOL} -q -o ${ROOTFS_IMG} -d ${ROOTFS_DIR} --pagesize=4096 --devtable ${CONFIG_PATH}
if [ -f "${ROOTFS_DIR}/bin/foundation" ] && [ -f "${ROOTFS_DIR}/bin/apphilogcat" ]; then
${JFFS2_TOOL} -q -o ${ROOTFS_IMG} -d ${ROOTFS_DIR} --pagesize=4096 --devtable ${CONFIG_PATH}
else
${JFFS2_TOOL} -q -o ${ROOTFS_IMG} -d ${ROOTFS_DIR} --pagesize=4096
fi
else
${JFFS2_TOOL} -q -o ${ROOTFS_IMG} -d ${ROOTFS_DIR} --pagesize=4096
fi
......
......@@ -108,7 +108,7 @@ config("clang") {
ldflags += [
"-L../clang/arm-liteos/c++",
"-L../lite/sysroot/usr/lib/arm-liteos",
"-L../clang/9.0.0/lib/arm-liteos",
"-L../clang/current/lib/arm-liteos",
"-L../clang/arm-liteos/c++",
"-lclang_rt.builtins",
"-lc",
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册