mirror of
https://github.com/openharmony/device_board_seed.git
synced 2026-07-01 04:35:34 -04:00
feat: normalize drivers framework component and repos
Signed-off-by: yuanbo <yuanbo@huawei.com>
This commit is contained in:
+72
-71
@@ -1,108 +1,109 @@
|
||||
# Copyright (C) VYAGOO TECHNOLOGY Co., Ltd. 2022. All rights reserved.
|
||||
|
||||
import("//drivers/framework/tools/hc-gen/hc_gen.gni")
|
||||
import("//drivers/peripheral/camera/hal/camera.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//drivers/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/hdf_core/framework/tools/hc-gen/hc_gen.gni")
|
||||
import("//drivers/peripheral/camera/hal/camera.gni")
|
||||
|
||||
hc_gen("build_camera_host_config") {
|
||||
sources = [ rebase_path(
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/hdi_impl/camera_host_config.hcs") ]
|
||||
outputs = [ "$target_gen_dir/hdi_impl/{{source_name_part}}.hcb" ]
|
||||
sources = [ rebase_path(
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/hdi_impl/camera_host_config.hcs") ]
|
||||
outputs = [ "$target_gen_dir/hdi_impl/{{source_name_part}}.hcb" ]
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("camera_host_config.hcb") {
|
||||
deps = [ ":build_camera_host_config" ]
|
||||
hcs_outputs = get_target_outputs(":build_camera_host_config")
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
subsystem_name = "hdf"
|
||||
part_name = "hdf"
|
||||
deps = [ ":build_camera_host_config" ]
|
||||
hcs_outputs = get_target_outputs(":build_camera_host_config")
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
subsystem_name = "hdf"
|
||||
part_name = "hdf"
|
||||
}
|
||||
|
||||
hc_gen_c("generate_source") {
|
||||
sources = [
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/pipeline_core/config.hcs",
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/pipeline_core/params.hcs",
|
||||
]
|
||||
sources = [
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/pipeline_core/config.hcs",
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/pipeline_core/params.hcs",
|
||||
]
|
||||
}
|
||||
|
||||
action("copy_source") {
|
||||
script = "/usr/bin/env"
|
||||
outputs = [ "$target_out_dir/tmp.c" ] # no use, just for gn complains
|
||||
args = [
|
||||
"cp",
|
||||
"-f",
|
||||
]
|
||||
args += rebase_path(get_target_outputs(":generate_source"))
|
||||
args += [ rebase_path(
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/") ]
|
||||
deps = [ ":generate_source" ]
|
||||
script = "/usr/bin/env"
|
||||
outputs = [ "$target_out_dir/tmp.c" ] # no use, just for gn complains
|
||||
args = [
|
||||
"cp",
|
||||
"-f",
|
||||
]
|
||||
args += rebase_path(get_target_outputs(":generate_source"))
|
||||
args += [ rebase_path(
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/") ]
|
||||
deps = [ ":generate_source" ]
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("config.c") {
|
||||
deps = [ ":copy_source" ]
|
||||
source = "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/config.c"
|
||||
exec_script(
|
||||
"/usr/bin/env",
|
||||
[
|
||||
"touch",
|
||||
rebase_path(
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/config.c"),
|
||||
])
|
||||
deps = [ ":copy_source" ]
|
||||
source =
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/config.c"
|
||||
exec_script(
|
||||
"/usr/bin/env",
|
||||
[
|
||||
"touch",
|
||||
rebase_path(
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/config.c"),
|
||||
])
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("params.c") {
|
||||
deps = [ ":copy_source" ]
|
||||
source = "$camera_path/pipeline_core/pipeline_impl/src/strategy/config/params.c"
|
||||
exec_script(
|
||||
"/usr/bin/env",
|
||||
[
|
||||
"touch",
|
||||
rebase_path(
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/params.c"),
|
||||
])
|
||||
deps = [ ":copy_source" ]
|
||||
source =
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/params.c"
|
||||
exec_script(
|
||||
"/usr/bin/env",
|
||||
[
|
||||
"touch",
|
||||
rebase_path(
|
||||
"$camera_path/pipeline_core/pipeline_impl/src/strategy/config/params.c"),
|
||||
])
|
||||
}
|
||||
|
||||
hc_gen("build_ipp_algo_config") {
|
||||
sources = [ rebase_path(
|
||||
sources = [ rebase_path(
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/pipeline_core/ipp_algo_config.hcs") ]
|
||||
outputs = [ "$target_gen_dir/pipeline_core/{{source_name_part}}.hcb" ]
|
||||
outputs = [ "$target_gen_dir/pipeline_core/{{source_name_part}}.hcb" ]
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("ipp_algo_config.hcb") {
|
||||
deps = [ ":build_ipp_algo_config" ]
|
||||
hcs_outputs = get_target_outputs(":build_ipp_algo_config")
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
subsystem_name = "hdf"
|
||||
part_name = "hdf"
|
||||
deps = [ ":build_ipp_algo_config" ]
|
||||
hcs_outputs = get_target_outputs(":build_ipp_algo_config")
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
subsystem_name = "hdf"
|
||||
part_name = "hdf"
|
||||
}
|
||||
|
||||
hc_gen("build_mpp_config_hcs") {
|
||||
sources = [ rebase_path(
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/driver/mpp_config.hcs") ]
|
||||
outputs = [ "$target_gen_dir/driver/{{source_name_part}}.hcb" ]
|
||||
sources = [ rebase_path(
|
||||
"$camera_product_name_path/hdf_config/uhdf/camera/driver/mpp_config.hcs") ]
|
||||
outputs = [ "$target_gen_dir/driver/{{source_name_part}}.hcb" ]
|
||||
}
|
||||
|
||||
ohos_prebuilt_etc("mpp_config.hcb") {
|
||||
deps = [ ":build_mpp_config_hcs" ]
|
||||
hcs_outputs = get_target_outputs(":build_mpp_config_hcs")
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
subsystem_name = "hdf"
|
||||
part_name = "hdf"
|
||||
deps = [ ":build_mpp_config_hcs" ]
|
||||
hcs_outputs = get_target_outputs(":build_mpp_config_hcs")
|
||||
source = hcs_outputs[0]
|
||||
relative_install_dir = "hdfconfig"
|
||||
subsystem_name = "hdf"
|
||||
part_name = "hdf"
|
||||
}
|
||||
|
||||
group("hispark_taurus_build") {
|
||||
public_deps = [
|
||||
":camera_host_config.hcb",
|
||||
":config.c",
|
||||
":ipp_algo_config.hcb",
|
||||
":mpp_config.hcb",
|
||||
":params.c",
|
||||
"src/driver_adapter:driver_adapter",
|
||||
"src/pipeline_core:camera_ipp_algo_example",
|
||||
]
|
||||
public_deps = [
|
||||
":camera_host_config.hcb",
|
||||
":config.c",
|
||||
":ipp_algo_config.hcb",
|
||||
":mpp_config.hcb",
|
||||
":params.c",
|
||||
"src/driver_adapter:driver_adapter",
|
||||
"src/pipeline_core:camera_ipp_algo_example",
|
||||
]
|
||||
}
|
||||
|
||||
|
||||
@@ -32,7 +32,7 @@ config("device_manager_config") {
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//drivers/adapter/uhdf/uhdf.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf/uhdf.gni")
|
||||
|
||||
shared_library("camera_device_manager") {
|
||||
sources = [
|
||||
@@ -63,8 +63,8 @@ if (defined(ohos_lite)) {
|
||||
"//utils/native/base/include",
|
||||
"$camera_device_name_path/camera/include/device_manager",
|
||||
"$camera_path/adapter/platform/mpp/src/device_manager/include",
|
||||
"//drivers/framework/include/utils",
|
||||
"//drivers/adapter/uhdf2/osal/include",
|
||||
"//drivers/hdf_core/framework/include/utils",
|
||||
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
||||
"$camera_device_name_path/camera/include/driver_adapter",
|
||||
"//base/hiviewdfx/hilog_lite/interfaces/native/innerkits",
|
||||
]
|
||||
@@ -82,7 +82,7 @@ if (defined(ohos_lite)) {
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
import("//drivers/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
|
||||
ohos_shared_library("camera_device_manager") {
|
||||
sources = [
|
||||
@@ -111,8 +111,8 @@ if (defined(ohos_lite)) {
|
||||
"//utils/native/base/include",
|
||||
"$camera_device_name_path/camera/include/device_manager",
|
||||
"$camera_path/adapter/platform/mpp/src/device_manager/include",
|
||||
"//drivers/framework/include/utils",
|
||||
"//drivers/adapter/uhdf2/osal/include",
|
||||
"//drivers/hdf_core/framework/include/utils",
|
||||
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
||||
"$camera_device_name_path/camera/include/driver_adapter",
|
||||
"//foundation/multimedia/camera_standard/frameworks/native/metadata/include",
|
||||
]
|
||||
|
||||
@@ -1,18 +1,16 @@
|
||||
# Copyright (C) VYAGOO TECHNOLOGY Co., Ltd. 2022. All rights reserved.
|
||||
|
||||
import("//drivers/peripheral/camera/hal/camera.gni")
|
||||
import("//build/ohos.gni")
|
||||
import("//drivers/adapter/uhdf2/uhdf.gni")
|
||||
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/peripheral/camera/hal/camera.gni")
|
||||
|
||||
ohos_prebuilt_etc("driver_adapter") {
|
||||
if (use_musl) {
|
||||
source = "//device/board/seed/T507/camera/src/driver_adapter/libs/libdriver_adapter.z.so"
|
||||
} else {
|
||||
source = "//device/board/seed/T507/camera/src/driver_adapter/libs/libdriver_adapter.z.so"
|
||||
if (use_musl) {
|
||||
source = "//device/board/seed/T507/camera/src/driver_adapter/libs/libdriver_adapter.z.so"
|
||||
} else {
|
||||
source = "//device/board/seed/T507/camera/src/driver_adapter/libs/libdriver_adapter.z.so"
|
||||
}
|
||||
module_install_dir = "lib/"
|
||||
part_name = "hdf"
|
||||
subsystem_name = "hdf"
|
||||
}
|
||||
module_install_dir = "lib/"
|
||||
part_name = "hdf"
|
||||
subsystem_name = "hdf"
|
||||
}
|
||||
|
||||
|
||||
@@ -2,8 +2,8 @@ import("//drivers/peripheral/camera/hal/camera.gni")
|
||||
|
||||
if (defined(ohos_lite)) {
|
||||
import("//build/lite/config/component/lite_component.gni")
|
||||
import("//drivers/adapter/uhdf/uhdf.gni")
|
||||
import("//drivers/framework/tools/hc-gen/hc_gen.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf/uhdf.gni")
|
||||
import("//drivers/hdf_core/framework/tools/hc-gen/hc_gen.gni")
|
||||
|
||||
hc_gen_c("generate_source") {
|
||||
sources = [
|
||||
@@ -135,12 +135,12 @@ if (defined(ohos_lite)) {
|
||||
"//foundation/graphic/utils/interfaces/kits",
|
||||
|
||||
# hcs parser
|
||||
"//drivers/framework/include/osal",
|
||||
"//drivers/framework/include/utils",
|
||||
"//drivers/adapter/uhdf2/osal/include",
|
||||
"//drivers/hdf_core/framework/include/osal",
|
||||
"//drivers/hdf_core/framework/include/utils",
|
||||
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
||||
"//system/core/include/cutils",
|
||||
"//drivers/framework/utils/include",
|
||||
"//drivers/adapter/uhdf2/osal/include",
|
||||
"//drivers/hdf_core/framework/utils/include",
|
||||
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
@@ -158,7 +158,7 @@ if (defined(ohos_lite)) {
|
||||
}
|
||||
} else {
|
||||
import("//build/ohos.gni")
|
||||
import("//drivers/adapter/uhdf2/uhdf.gni")
|
||||
import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni")
|
||||
config("pipe_config") {
|
||||
visibility = [ ":*" ]
|
||||
|
||||
@@ -267,12 +267,12 @@ if (defined(ohos_lite)) {
|
||||
"//foundation/multimedia/camera_standard/frameworks/native/metadata/include",
|
||||
|
||||
# hcs parser
|
||||
"//drivers/framework/include/osal",
|
||||
"//drivers/framework/include/utils",
|
||||
"//drivers/adapter/uhdf2/osal/include",
|
||||
"//drivers/hdf_core/framework/include/osal",
|
||||
"//drivers/hdf_core/framework/include/utils",
|
||||
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
||||
"//system/core/include/cutils",
|
||||
"//drivers/framework/utils/include",
|
||||
"//drivers/adapter/uhdf2/osal/include",
|
||||
"//drivers/hdf_core/framework/utils/include",
|
||||
"//drivers/hdf_core/adapter/uhdf2/osal/include",
|
||||
]
|
||||
|
||||
deps = [
|
||||
|
||||
Reference in New Issue
Block a user