From c15957e753f9cf21fceb1bbef7bb5f80ae2f286b Mon Sep 17 00:00:00 2001 From: Johan Hedberg Date: Thu, 22 Aug 2024 11:29:12 +0300 Subject: [PATCH] Bluetooth: drivers: Add module blobs dependencies to Kconfig Now that there is an actual Kconfig symbol generated for blobs presence, take advantage of that and declare appropriate dependencies to it. Also add helpful CMake output if the blobs are missing by taking advantage of the zephyr_blobs_verify() CMake function. Signed-off-by: Johan Hedberg --- drivers/bluetooth/hci/CMakeLists.txt | 12 ++++++++++++ drivers/bluetooth/hci/Kconfig | 4 ++++ 2 files changed, 16 insertions(+) diff --git a/drivers/bluetooth/hci/CMakeLists.txt b/drivers/bluetooth/hci/CMakeLists.txt index 14d81d7458d..9ed95462671 100644 --- a/drivers/bluetooth/hci/CMakeLists.txt +++ b/drivers/bluetooth/hci/CMakeLists.txt @@ -14,6 +14,9 @@ if(CONFIG_BT_HCI_IPC) endif() zephyr_library_sources_ifdef(CONFIG_BT_ESP32 hci_esp32.c) +if(CONFIG_DT_HAS_ESPRESSIF_ESP32_BT_HCI_ENABLED) + zephyr_blobs_verify(MODULE hal_espressif REQUIRED) +endif() zephyr_library_sources_ifdef(CONFIG_BT_H4 h4.c) zephyr_library_sources_ifdef(CONFIG_BT_H5 h5.c) zephyr_library_sources_ifdef(CONFIG_BT_HCI_IPC ipc.c) @@ -29,9 +32,18 @@ zephyr_library_sources_ifdef(CONFIG_BT_CYW208XX hci_ifx_cyw208xx.c) zephyr_library_sources_ifdef(CONFIG_BT_STM32_IPM ipm_stm32wb.c) zephyr_library_sources_ifdef(CONFIG_BT_STM32WBA hci_stm32wba.c) +if(CONFIG_DT_HAS_ST_HCI_STM32WBA_ENABLED) + zephyr_blobs_verify(MODULE hal_stm32 REQUIRED) +endif() zephyr_library_sources_ifdef(CONFIG_BT_USERCHAN userchan.c) zephyr_library_sources_ifdef(CONFIG_BT_SILABS_HCI slz_hci.c) +if(CONFIG_DT_HAS_SILABS_BT_HCI_ENABLED) + zephyr_blobs_verify(MODULE hal_silabs REQUIRED) +endif() zephyr_library_sources_ifdef(CONFIG_BT_PSOC6_BLESS hci_ifx_psoc6_bless.c) +if(CONFIG_DT_HAS_INFINEON_CAT1_BLESS_HCI_ENABLED) + zephyr_blobs_verify(MODULE hal_infineon REQUIRED) +endif() zephyr_library_sources_ifdef(CONFIG_SOC_NRF5340_CPUAPP nrf53_support.c) zephyr_library_sources_ifdef(CONFIG_BT_AMBIQ_HCI hci_ambiq.c apollox_blue.c) zephyr_library_sources_ifdef(CONFIG_BT_DA1469X hci_da1469x.c) diff --git a/drivers/bluetooth/hci/Kconfig b/drivers/bluetooth/hci/Kconfig index f0317c3e04e..90e2f647248 100644 --- a/drivers/bluetooth/hci/Kconfig +++ b/drivers/bluetooth/hci/Kconfig @@ -71,6 +71,7 @@ config BT_STM32WBA bool default y depends on DT_HAS_ST_HCI_STM32WBA_ENABLED + depends on ZEPHYR_HAL_STM32_MODULE_BLOBS select HAS_STM32LIB select BT_HCI_SET_PUBLIC_ADDR help @@ -80,6 +81,7 @@ config BT_SILABS_HCI bool default y depends on DT_HAS_SILABS_BT_HCI_ENABLED + depends on ZEPHYR_HAL_SILABS_MODULE_BLOBS depends on !PM || SOC_GECKO_PM_BACKEND_PMGR select SOC_GECKO_USE_RAIL select ENTROPY_GENERATOR @@ -107,6 +109,7 @@ config BT_ESP32 bool default y depends on DT_HAS_ESPRESSIF_ESP32_BT_HCI_ENABLED + depends on ZEPHYR_HAL_ESPRESSIF_MODULE_BLOBS help Espressif HCI bluetooth interface @@ -114,6 +117,7 @@ config BT_PSOC6_BLESS bool default y depends on DT_HAS_INFINEON_CAT1_BLESS_HCI_ENABLED + depends on ZEPHYR_HAL_INFINEON_MODULE_BLOBS select BT_HCI_SETUP help PSOC6 BLESS driver with BLE Controller which operates in