From b0f1468c149ffc8e0973d58c9fa7485cab801aa0 Mon Sep 17 00:00:00 2001 From: YOUR_NAME Date: Tue, 15 Jun 2021 09:22:02 +0000 Subject: [PATCH] support build bluetooth model for linux Change-Id: Ic61eb453a28fe23b5490b909b39dff1ca42cf5a0 Signed-off-by: duxbbo --- Kconfig | 1 + Makefile | 1 + model/network/bluetooth/Kconfig | 7 +++++ model/network/bluetooth/Makefile | 31 ++++++++++++++++++++ model/network/bluetooth/env_config.mk | 41 +++++++++++++++++++++++++++ 5 files changed, 81 insertions(+) create mode 100644 model/network/bluetooth/Kconfig create mode 100644 model/network/bluetooth/Makefile create mode 100644 model/network/bluetooth/env_config.mk diff --git a/Kconfig b/Kconfig index 3aa2fbb..f623d61 100755 --- a/Kconfig +++ b/Kconfig @@ -10,5 +10,6 @@ source "drivers/hdf/khdf/test/Kconfig" source "drivers/hdf/khdf/model/display/Kconfig" source "drivers/hdf/khdf/model/input/Kconfig" source "drivers/hdf/khdf/model/network/wifi/Kconfig" +source "drivers/hdf/khdf/model/network/bluetooth/Kconfig" source "drivers/hdf/khdf/model/sensor/Kconfig" source "drivers/hdf/khdf/model/storage/Kconfig" diff --git a/Makefile b/Makefile index aa85a3d..efd4a19 100644 --- a/Makefile +++ b/Makefile @@ -40,3 +40,4 @@ obj-$(CONFIG_DRIVERS_HDF_INPUT) += model/input/ obj-$(CONFIG_DRIVERS_HDF_WIFI) += model/network/wifi/ obj-$(CONFIG_DRIVERS_HDF_SENSOR) += model/sensor/ obj-$(CONFIG_DRIVERS_HDF_STORAGE) += model/storage/ +obj-$(CONFIG_DRIVERS_HDF_BT) += model/network/bluetooth/ diff --git a/model/network/bluetooth/Kconfig b/model/network/bluetooth/Kconfig new file mode 100644 index 0000000..b9f2fec --- /dev/null +++ b/model/network/bluetooth/Kconfig @@ -0,0 +1,7 @@ +config DRIVERS_HDF_BT + bool "Enable HDF Bluetooth" + default n + depends on DRIVERS_HDF + help + Answer Y to enable HDF bluetooth. + diff --git a/model/network/bluetooth/Makefile b/model/network/bluetooth/Makefile new file mode 100644 index 0000000..faf8209 --- /dev/null +++ b/model/network/bluetooth/Makefile @@ -0,0 +1,31 @@ +# +# Copyright (c) 2021 Huawei Device Co., Ltd. +# +# This software is licensed under the terms of the GNU General Public +# License version 2, as published by the Free Software Foundation, and +# may be copied, distributed, and modified under those terms. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# + +MODULE_NAME := hdf_bt_model + +include drivers/hdf/khdf/model/network/bluetooth/env_config.mk + +HDF_BT_FRAMEWORKS_ROOT := ../../../../../../framework/model/network/bluetooth + +obj-$(CONFIG_DRIVERS_HDF_BT) += $(MODULE_NAME).o +$(MODULE_NAME)-objs := $(HDF_BT_FRAMEWORKS_ROOT)/hdf_bt_core.o \ + $(HDF_BT_FRAMEWORKS_ROOT)/hdf_chip.o \ + $(HDF_BT_FRAMEWORKS_ROOT)/hdf_reset.o \ + $(HDF_BT_FRAMEWORKS_ROOT)/hdf_power.o + +ccflags-$(CONFIG_DRIVERS_HDF_BT) += \ + $(HDF_FRAMEWORKS_INC) \ + $(HDF_BT_FRAMEWORKS_INC) \ + $(SECURE_LIB_INC) + diff --git a/model/network/bluetooth/env_config.mk b/model/network/bluetooth/env_config.mk new file mode 100644 index 0000000..a45607e --- /dev/null +++ b/model/network/bluetooth/env_config.mk @@ -0,0 +1,41 @@ +# +# Copyright (c) 2021 Huawei Device Co., Ltd. +# +# This software is licensed under the terms of the GNU General Public +# License version 2, as published by the Free Software Foundation, and +# may be copied, distributed, and modified under those terms. +# +# This program is distributed in the hope that it will be useful, +# but WITHOUT ANY WARRANTY; without even the implied warranty of +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +# GNU General Public License for more details. +# +# + +HDF_FRAMEWORKS_INC := \ + -I./ \ + -Idrivers/hdf/framework/ability/sbuf/include \ + -Idrivers/hdf/framework/core/common/include/host \ + -Idrivers/hdf/framework/core/host/include \ + -Idrivers/hdf/framework/core/manager/include \ + -Idrivers/hdf/framework/core/shared/include \ + -Idrivers/hdf/framework/include \ + -Idrivers/hdf/framework/include/config \ + -Idrivers/hdf/framework/include/core \ + -Idrivers/hdf/framework/include/platform \ + -Idrivers/hdf/framework/include/utils \ + -Idrivers/hdf/framework/support/platform/include \ + -Idrivers/hdf/framework/support/platform/include/platform \ + -Idrivers/hdf/framework/utils/include \ + -Idrivers/hdf/khdf/osal/include \ + -Idrivers/hdf/khdf/config/include \ + -Iinclude/hdf \ + -Iinclude/hdf/osal \ + -Iinclude/hdf/utils \ + -Idrivers/hdf/framework/include/bluetooth + +HDF_BT_FRAMEWORKS_INC := \ + -Idrivers/hdf/framework/model/network/bluetooth + +SECURE_LIB_INC := \ + -I$(PROJECT_ROOT)/third_party/bounds_checking_function/include \ No newline at end of file -- Gitee