Description:add Change kernel type from liteos_riscv to liteos_m

Reviewed-by:liubeibei
Change-Id: Ib690ae4bf2a3db4f6104879ec29867eaa6b4cbd0
This commit is contained in:
p00452466 2020-12-05 01:33:31 +08:00
parent 8c50e3a5b6
commit 3ebb6151cc
5 changed files with 124 additions and 132 deletions

View File

@ -14,44 +14,42 @@ import("//build/lite/config/component/lite_component.gni")
import("//build/lite/ndk/ndk.gni")
lite_component("samgr") {
features = [
"samgr",
"communication/broadcast",
]
features = [
"samgr",
"communication/broadcast",
]
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux"){
features += [
"samgr_server:server",
"samgr_client:client",
]
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
features += [
"samgr_server:server",
"samgr_client:client",
]
}
}
ndk_lib("samgr_lite_ndk") {
if(ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
lib_extension = ".a"
} else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
lib_extension = ".so"
}
deps = [
"samgr",
"communication/broadcast",
if (ohos_kernel_type == "liteos_m") {
lib_extension = ".a"
} else if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
lib_extension = ".so"
}
deps = [
"communication/broadcast",
"samgr",
]
head_files = [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast",
]
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
deps += [ "samgr_server:server" ]
head_files += [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/registry",
]
head_files = [
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/communication/broadcast",
]
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux"){
deps += [
"samgr_server:server",
]
head_files += ["//foundation/distributedschedule/interfaces/kits/samgr_lite/registry"]
}
}
}
generate_notice_file("samgr_notice_file") {
module_name = "samgr"
module_source_dir_list = [
"//third_party/bounds_checking_function"
]
module_name = "samgr"
module_source_dir_list = [ "//third_party/bounds_checking_function" ]
}

View File

@ -20,7 +20,7 @@ config("broadcast_public") {
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
static_library("broadcast") {
sources = [
"source/broadcast_service.c",

View File

@ -11,65 +11,63 @@
# See the License for the specific language governing permissions and
# limitations under the License.
config("external_settings_shared") {
defines = ["LAYER_INIT_SHARED_LIB"]
defines = [ "LAYER_INIT_SHARED_LIB" ]
}
config("samgr_public") {
include_dirs = [
"adapter",
"registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//utils/native/lite/include",
]
include_dirs = [
"adapter",
"registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//utils/native/lite/include",
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
static_library("samgr") {
sources = [
"source/samgr_lite.c",
"registry/service_registry.c",
]
if (ohos_kernel_type == "liteos_m") {
static_library("samgr") {
sources = [
"registry/service_registry.c",
"source/samgr_lite.c",
]
public_configs = [":samgr_public"]
cflags = [ "-Wall" ]
public_configs = [ ":samgr_public" ]
cflags = [ "-Wall" ]
include_dirs = [
"//base/hiviewdfx/interfaces/kits/hilog_lite",
"//kernel/liteos_m/components/cmsis",
]
include_dirs = [
"//base/hiviewdfx/interfaces/kits/hilog_lite",
"//kernel/liteos_m/components/cmsis",
]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source"
]
}
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source",
]
}
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
shared_library("samgr") {
sources = [
"source/samgr_lite.c",
]
shared_library("samgr") {
sources = [ "source/samgr_lite.c" ]
cflags = [
"-fPIC",
"-Wall"
]
cflags = [
"-fPIC",
"-Wall",
]
public_configs = [":samgr_public"]
public_configs = [ ":samgr_public" ]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source",
"//foundation/distributedschedule/services/samgr_lite/samgr_client:client",
"//foundation/communication/frameworks/ipc_lite:liteipc_adapter",
]
public_deps = [
"//foundation/communication/frameworks/ipc_lite:liteipc_adapter",
"//foundation/distributedschedule/services/samgr_lite/samgr/source:samgr_source",
"//foundation/distributedschedule/services/samgr_lite/samgr_client:client",
]
public_configs += [":external_settings_shared"]
}
public_configs += [ ":external_settings_shared" ]
}
}

View File

@ -19,7 +19,7 @@ config("samgr_adapter_public") {
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
if (ohos_kernel_type == "liteos_m") {
static_library("samgr_adapter") {
sources = [
"cmsis/memory_adapter.c",
@ -56,9 +56,7 @@ if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
"-fPIC",
"-Wall",
]
public_deps = [
"//third_party/bounds_checking_function:libsec_shared",
]
public_deps = [ "//third_party/bounds_checking_function:libsec_shared" ]
defines = [ "_GNU_SOURCE" ]
if (ohos_kernel_type == "linux") {
defines += [ "SAMGR_LINUX_ADAPTER" ]

View File

@ -12,66 +12,64 @@
# limitations under the License.
config("samgr_source_public") {
include_dirs = [
"../adapter",
"../registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//utils/native/lite/include",
]
include_dirs = [
"../adapter",
"../registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/registry",
"//foundation/distributedschedule/interfaces/kits/samgr_lite/samgr",
"//utils/native/lite/include",
]
}
if (ohos_kernel_type == "liteos_riscv" || ohos_kernel_type == "liteos_m") {
static_library("samgr_source") {
sources = [
"common.c",
"iunknown.c",
"feature.c",
"service.c",
"message.c",
"task_manager.c",
]
if (ohos_kernel_type == "liteos_m") {
static_library("samgr_source") {
sources = [
"common.c",
"feature.c",
"iunknown.c",
"message.c",
"service.c",
"task_manager.c",
]
public_configs = [":samgr_source_public"]
cflags = [ "-Wall" ]
public_configs = [ ":samgr_source_public" ]
cflags = [ "-Wall" ]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter"
]
public_deps = [ "//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter" ]
include_dirs = [
"//base/hiviewdfx/interfaces/kits/hilog_lite",
"//kernel/liteos_m/components/cmsis",
]
}
include_dirs = [
"//base/hiviewdfx/interfaces/kits/hilog_lite",
"//kernel/liteos_m/components/cmsis",
]
}
}
if (ohos_kernel_type == "liteos_a" || ohos_kernel_type == "linux") {
source_set("samgr_source") {
sources = [
"common.c",
"iunknown.c",
"feature.c",
"service.c",
"message.c",
"task_manager.c",
]
source_set("samgr_source") {
sources = [
"common.c",
"feature.c",
"iunknown.c",
"message.c",
"service.c",
"task_manager.c",
]
cflags = [
"-fPIC",
"-Wall"
]
cflags = [
"-fPIC",
"-Wall",
]
public_configs = [":samgr_source_public"]
public_configs = [ ":samgr_source_public" ]
public_deps = [
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
"//base/hiviewdfx/frameworks/hilog_lite/featured:hilog_shared",
]
public_deps = [
"//base/hiviewdfx/frameworks/hilog_lite/featured:hilog_shared",
"//foundation/distributedschedule/services/samgr_lite/samgr/adapter:samgr_adapter",
]
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
]
}
include_dirs = [
"//kernel/liteos_a/kernel/include/",
"//third_party/bounds_checking_function/include",
]
}
}