未验证 提交 b5d2ca4a 编写于 作者: O openharmony_ci 提交者: Gitee

!793 适配liteos-m编译

Merge pull request !793 from Mupceet/litem
...@@ -39,11 +39,14 @@ ohos_shared_library("deviceinfoservice") { ...@@ -39,11 +39,14 @@ ohos_shared_library("deviceinfoservice") {
"//base/startup/init_lite/interfaces/innerkits/syspara", "//base/startup/init_lite/interfaces/innerkits/syspara",
"//base/startup/init_lite/interfaces/hals", "//base/startup/init_lite/interfaces/hals",
] ]
defines = [
"_GNU_SOURCE",
"USE_MBEDTLS",
]
deps = [ deps = [
"//base/startup/init_lite/interfaces/innerkits:libbegetutil", "//base/startup/init_lite/interfaces/innerkits:libbegetutil",
"//third_party/bounds_checking_function:libsec_shared", "//third_party/bounds_checking_function:libsec_shared",
"//third_party/openssl:libcrypto_shared", "//third_party/mbedtls:mbedtls_shared",
] ]
external_deps = [ external_deps = [
......
...@@ -67,7 +67,6 @@ if (defined(ohos_lite)) { ...@@ -67,7 +67,6 @@ if (defined(ohos_lite)) {
] ]
deps += [ deps += [
"//base/startup/init_lite/services/log:init_log", "//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/utils:libinit_utils", "//base/startup/init_lite/services/utils:libinit_utils",
] ]
if (enable_ohos_startup_init_feature_begetctl_liteos) { if (enable_ohos_startup_init_feature_begetctl_liteos) {
...@@ -87,6 +86,7 @@ if (defined(ohos_lite)) { ...@@ -87,6 +86,7 @@ if (defined(ohos_lite)) {
defines += [ "__LINUX__" ] defines += [ "__LINUX__" ]
deps += [ deps += [
"//base/startup/init_lite/services/loopevent:loopevent", "//base/startup/init_lite/services/loopevent:loopevent",
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/param/linux:param_client", "//base/startup/init_lite/services/param/linux:param_client",
] ]
} }
...@@ -121,7 +121,6 @@ if (defined(ohos_lite)) { ...@@ -121,7 +121,6 @@ if (defined(ohos_lite)) {
defines += [ "USE_MBEDTLS" ] defines += [ "USE_MBEDTLS" ]
} }
deps += [ deps += [
"//base/startup/init_lite/services/param/base:parameterbase",
"//base/startup/init_lite/services/param/liteos:param_client_lite", "//base/startup/init_lite/services/param/liteos:param_client_lite",
"//base/startup/init_lite/services/utils:libinit_utils", "//base/startup/init_lite/services/utils:libinit_utils",
] ]
......
...@@ -12,11 +12,6 @@ ...@@ -12,11 +12,6 @@
# limitations under the License. # limitations under the License.
import("//base/startup/init_lite/begetd.gni") 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 = [ param_include_dirs = [
"//base/startup/init_lite/services/param/include", "//base/startup/init_lite/services/param/include",
"//base/startup/init_lite/services/param/adapter", "//base/startup/init_lite/services/param/adapter",
...@@ -91,10 +86,27 @@ config("exported_header_files") { ...@@ -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") { static_library("param_init_lite") {
defines = [] defines = []
deps = [] 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 include_dirs = param_include_dirs
defines += param_build_defines defines += param_build_defines
public_configs = [ ":exported_header_files" ] public_configs = [ ":exported_header_files" ]
...@@ -116,18 +128,15 @@ static_library("param_init_lite") { ...@@ -116,18 +128,15 @@ static_library("param_init_lite") {
} }
static_library("param_client_lite") { static_library("param_client_lite") {
sources = param_comm_sources sources = base_sources
include_dirs = param_include_dirs include_dirs = param_include_dirs
cflags = [ "-fPIC" ] cflags = [ "-fPIC" ]
defines = param_build_defines defines = param_build_defines
public_configs = [ ":exported_header_files" ] public_configs = [ ":exported_header_files" ]
if (ohos_kernel_type == "liteos_a") { if (ohos_kernel_type == "liteos_a") {
sources += [ sources +=
"//base/startup/init_lite/services/param/adapter/param_persistadp.c", [ "//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",
]
defines += [ defines += [
"__LITEOS_A__", "__LITEOS_A__",
"WORKSPACE_AREA_NEED_MUTEX", "WORKSPACE_AREA_NEED_MUTEX",
...@@ -135,16 +144,8 @@ static_library("param_client_lite") { ...@@ -135,16 +144,8 @@ static_library("param_client_lite") {
"PARAMWORKSPACE_NEED_MUTEX", "PARAMWORKSPACE_NEED_MUTEX",
] ]
} else if (ohos_kernel_type == "liteos_m") { } else if (ohos_kernel_type == "liteos_m") {
sources += [ sources +=
"//base/startup/init_lite/services/log/init_commlog.c", [ "//base/startup/init_lite/services/param/manager/param_server.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",
]
if (enable_ohos_startup_init_lite_use_posix_file_api) { if (enable_ohos_startup_init_lite_use_posix_file_api) {
sources += [ sources += [
"//base/startup/init_lite/services/param/adapter/param_persistadp.c", "//base/startup/init_lite/services/param/adapter/param_persistadp.c",
......
...@@ -208,7 +208,8 @@ ohos_unittest("init_unittest") { ...@@ -208,7 +208,8 @@ ohos_unittest("init_unittest") {
"//third_party/cJSON:cjson_static", "//third_party/cJSON:cjson_static",
"//third_party/googletest:gmock", "//third_party/googletest:gmock",
"//third_party/googletest:gtest", "//third_party/googletest:gtest",
"//third_party/openssl:libcrypto_shared", "//third_party/mbedtls:mbedtls_shared",
"//utils/native/base:utils",
] ]
defines = [ defines = [
...@@ -219,6 +220,7 @@ ohos_unittest("init_unittest") { ...@@ -219,6 +220,7 @@ ohos_unittest("init_unittest") {
"PARAM_SUPPORT_DAC", "PARAM_SUPPORT_DAC",
"_GNU_SOURCE", "_GNU_SOURCE",
"PARAM_SUPPORT_TRIGGER", "PARAM_SUPPORT_TRIGGER",
"USE_MBEDTLS",
] ]
defines += [ "_GNU_SOURCE" ] defines += [ "_GNU_SOURCE" ]
......
...@@ -17,10 +17,12 @@ group("watchdog") { ...@@ -17,10 +17,12 @@ group("watchdog") {
if (defined(ohos_lite)) { if (defined(ohos_lite)) {
executable("watchdog_service") { 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 = [ deps = [
"//base/startup/init_lite/services/log:init_log", "//base/startup/init_lite/services/log:init_log",
"//base/startup/init_lite/services/param/base:parameterbase",
"//third_party/bounds_checking_function:libsec_static", "//third_party/bounds_checking_function:libsec_static",
] ]
defines = [ defines = [
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册