diff --git a/adapter/BUILD.gn b/adapter/BUILD.gn index 72aa7c7302b3b14d78115406dd4261dd6733f8ae..0422193e1c4f551c47ada1644a0358c3799a1f9a 100644 --- a/adapter/BUILD.gn +++ b/adapter/BUILD.gn @@ -33,7 +33,7 @@ if (defined(ohos_lite)) { } else { group("uhdf_entry") { hdf_framework_path = "./../framework" - hdf_peripheral_path = "./uhdf2/host/peripheral" + deps = [ "$hdf_adapter_path/uhdf2/hdi:libhdi", "$hdf_adapter_path/uhdf2/host:hdf_devhost", @@ -47,9 +47,12 @@ if (defined(ohos_lite)) { "$hdf_adapter_path/uhdf2/pub_utils:libpub_utils", "$hdf_adapter_path/uhdf2/utils:libhdf_utils", "$hdf_framework_path/tools/hdf_dbg:hdf_dbg", - "$hdf_peripheral_path:hdf_peripheral.cfg", ] + if (hdf_core_default_peripheral_config) { + deps += [ "./uhdf2/host/peripheral:hdf_peripheral.cfg" ] + } + if (with_sample) { deps += [ "$hdf_adapter_path/uhdf2/host/test/unittest/sample1_driver:libsample1_driver", diff --git a/adapter/uhdf2/host/peripheral/BUILD.gn b/adapter/uhdf2/host/peripheral/BUILD.gn index 69cdd389b69e7cec8c5e3161ee6f19ec79ea8a15..1200866a3bffc414477ed6950456e1d5dd93c3dd 100644 --- a/adapter/uhdf2/host/peripheral/BUILD.gn +++ b/adapter/uhdf2/host/peripheral/BUILD.gn @@ -12,11 +12,14 @@ # limitations under the License. import("//build/ohos.gni") +import("//drivers/hdf_core/adapter/uhdf2/uhdf.gni") -ohos_prebuilt_etc("hdf_peripheral.cfg") { - source = "hdf_peripheral.cfg" - relative_install_dir = "init" - install_images = [ chipset_base_dir ] - subsystem_name = "hdf" - part_name = "hdf_core" +if (hdf_core_default_peripheral_config) { + ohos_prebuilt_etc("hdf_peripheral.cfg") { + source = "hdf_peripheral.cfg" + relative_install_dir = "init" + install_images = [ chipset_base_dir ] + subsystem_name = "hdf" + part_name = "hdf_core" + } } diff --git a/adapter/uhdf2/uhdf.gni b/adapter/uhdf2/uhdf.gni index 478ee1b559e2fdd9148fca7e9e1506e2d4f107bd..3a7b5f64e10f1990a91510b351bc887c6a0a0549 100644 --- a/adapter/uhdf2/uhdf.gni +++ b/adapter/uhdf2/uhdf.gni @@ -20,4 +20,5 @@ declare_args() { hicollie_enabled = false } with_sample = false + hdf_core_default_peripheral_config = true } diff --git a/bundle.json b/bundle.json index 1e83bfccfe0ec0f3208ec975bb1e17c035a354fc..7f8a3446d229bcdd70e09990e8720d6f75980f9a 100644 --- a/bundle.json +++ b/bundle.json @@ -15,7 +15,8 @@ "features": [ "hdf_core_khdf_test_support", "hdf_core_platform_test_support", - "hdf_core_platform_rtc_test_support" + "hdf_core_platform_rtc_test_support", + "hdf_core_default_peripheral_config" ], "adapted_system_type": ["standard", "small", "mini"], "rom": "735KB",