!793 适配liteos-m编译

Merge pull request !793 from Mupceet/litem
This commit is contained in:
openharmony_ci 2022-06-22 08:16:34 +00:00 committed by Gitee
commit b5d2ca4aff
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
5 changed files with 36 additions and 29 deletions

View File

@ -39,11 +39,14 @@ ohos_shared_library("deviceinfoservice") {
"//base/startup/init_lite/interfaces/innerkits/syspara",
"//base/startup/init_lite/interfaces/hals",
]
defines = [
"_GNU_SOURCE",
"USE_MBEDTLS",
]
deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared",
"//third_party/openssl:libcrypto_shared",
"//third_party/mbedtls:mbedtls_shared",
]
external_deps = [

View File

@ -67,7 +67,6 @@ if (defined(ohos_lite)) {
]
deps += [
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/utils:libinit_utils",
]
if (enable_ohos_startup_init_feature_begetctl_liteos) {
@ -87,6 +86,7 @@ if (defined(ohos_lite)) {
defines += [ "__LINUX__" ]
deps += [
"//base/startup/init_lite/services/loopevent:loopevent",
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/param/linux:param_client",
]
}
@ -121,7 +121,6 @@ if (defined(ohos_lite)) {
defines += [ "USE_MBEDTLS" ]
}
deps += [
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/param/liteos:param_client_lite",
"//base/startup/init_lite/services/utils:libinit_utils",
]

View File

@ -12,11 +12,6 @@
# limitations under the License.
import("//base/startup/init_lite/begetd.gni")
param_comm_sources = [
"//base/startup/init_lite/services/param/manager/param_manager.c",
"//base/startup/init_lite/services/param/manager/param_server.c",
]
param_include_dirs = [
"//base/startup/init_lite/services/param/include",
"//base/startup/init_lite/services/param/adapter",
@ -91,10 +86,27 @@ config("exported_header_files") {
]
}
base_sources = [
"//base/startup/init_lite/services/log/init_commlog.c",
"//base/startup/init_lite/services/param/base/param_base.c",
"//base/startup/init_lite/services/param/base/param_comm.c",
"//base/startup/init_lite/services/param/base/param_trie.c",
"//base/startup/init_lite/services/param/liteos/param_client.c",
"//base/startup/init_lite/services/param/liteos/param_litedac.c",
"//base/startup/init_lite/services/param/liteos/param_osadp.c",
"//base/startup/init_lite/services/param/manager/param_manager.c",
"//base/startup/init_lite/services/param/manager/param_persist.c",
"//base/startup/init_lite/services/utils/init_hashmap.c",
"//base/startup/init_lite/services/utils/list.c",
]
static_library("param_init_lite") {
defines = []
deps = []
sources = param_comm_sources
sources = [
"//base/startup/init_lite/services/param/manager/param_manager.c",
"//base/startup/init_lite/services/param/manager/param_server.c",
]
include_dirs = param_include_dirs
defines += param_build_defines
public_configs = [ ":exported_header_files" ]
@ -116,18 +128,15 @@ static_library("param_init_lite") {
}
static_library("param_client_lite") {
sources = param_comm_sources
sources = base_sources
include_dirs = param_include_dirs
cflags = [ "-fPIC" ]
defines = param_build_defines
public_configs = [ ":exported_header_files" ]
if (ohos_kernel_type == "liteos_a") {
sources += [
"//base/startup/init_lite/services/param/adapter/param_persistadp.c",
"//base/startup/init_lite/services/param/liteos/param_client.c",
"//base/startup/init_lite/services/param/manager/param_persist.c",
]
sources +=
[ "//base/startup/init_lite/services/param/adapter/param_persistadp.c" ]
defines += [
"__LITEOS_A__",
"WORKSPACE_AREA_NEED_MUTEX",
@ -135,16 +144,8 @@ static_library("param_client_lite") {
"PARAMWORKSPACE_NEED_MUTEX",
]
} else if (ohos_kernel_type == "liteos_m") {
sources += [
"//base/startup/init_lite/services/log/init_commlog.c",
"//base/startup/init_lite/services/param/base/param_base.c",
"//base/startup/init_lite/services/param/base/param_comm.c",
"//base/startup/init_lite/services/param/base/param_trie.c",
"//base/startup/init_lite/services/param/liteos/param_client.c",
"//base/startup/init_lite/services/param/manager/param_persist.c",
"//base/startup/init_lite/services/utils/init_hashmap.c",
"//base/startup/init_lite/services/utils/list.c",
]
sources +=
[ "//base/startup/init_lite/services/param/manager/param_server.c" ]
if (enable_ohos_startup_init_lite_use_posix_file_api) {
sources += [
"//base/startup/init_lite/services/param/adapter/param_persistadp.c",

View File

@ -208,7 +208,8 @@ ohos_unittest("init_unittest") {
"//third_party/cJSON:cjson_static",
"//third_party/googletest:gmock",
"//third_party/googletest:gtest",
"//third_party/openssl:libcrypto_shared",
"//third_party/mbedtls:mbedtls_shared",
"//utils/native/base:utils",
]
defines = [
@ -219,6 +220,7 @@ ohos_unittest("init_unittest") {
"PARAM_SUPPORT_DAC",
"_GNU_SOURCE",
"PARAM_SUPPORT_TRIGGER",
"USE_MBEDTLS",
]
defines += [ "_GNU_SOURCE" ]

View File

@ -17,10 +17,12 @@ group("watchdog") {
if (defined(ohos_lite)) {
executable("watchdog_service") {
sources = [ "init_watchdog.c" ]
sources = [
"//base/startup/init_lite/services/log/init_commlog.c",
"//base/startup/init_lite/watchdog/init_watchdog.c",
]
deps = [
"//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param/base:parameterbase",
"//third_party/bounds_checking_function:libsec_static",
]
defines = [