[openwrt/openwrt] kernel: kmod-btmtk: Extract btmtk.ko into own package

LEDE Commits lede-commits at lists.infradead.org
Wed Feb 26 14:32:17 PST 2025


hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2389793edf00288c32152391ecfd26d49eac12ba

commit 2389793edf00288c32152391ecfd26d49eac12ba
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Tue Feb 25 21:15:19 2025 +0100

    kernel: kmod-btmtk: Extract btmtk.ko into own package
    
    btmtk.ko is used by btusb.ko and btmtkuart.ko, add it into an own
    package and make both packages depend on it.
    
    Fixes: 1c42a0be3619 ("kernel: modules: bluetooth: separating UART and USB drivers")
    Link: https://github.com/openwrt/openwrt/pull/18110
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/linux/modules/bluetooth.mk | 17 ++++++++++++++---
 target/linux/mediatek/modules.mk          |  2 +-
 2 files changed, 15 insertions(+), 4 deletions(-)

diff --git a/package/kernel/linux/modules/bluetooth.mk b/package/kernel/linux/modules/bluetooth.mk
index a498c31e0b..b4163eb950 100644
--- a/package/kernel/linux/modules/bluetooth.mk
+++ b/package/kernel/linux/modules/bluetooth.mk
@@ -60,7 +60,7 @@ $(eval $(call KernelPackage,hci-uart))
 define KernelPackage/btusb
   SUBMENU:=$(BLUETOOTH_MENU)
   TITLE:=Bluetooth HCI USB support
-  DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-bluetooth
+  DEPENDS:=@USB_SUPPORT +kmod-usb-core +kmod-bluetooth +kmod-btmtk
   KCONFIG:= \
 	CONFIG_BT_HCIBTUSB \
 	CONFIG_BT_HCIBTUSB_BCM=n \
@@ -69,8 +69,7 @@ define KernelPackage/btusb
   FILES:= \
 	$(LINUX_DIR)/drivers/bluetooth/btusb.ko \
 	$(LINUX_DIR)/drivers/bluetooth/btintel.ko \
-	$(LINUX_DIR)/drivers/bluetooth/btrtl.ko \
-	$(LINUX_DIR)/drivers/bluetooth/btmtk.ko
+	$(LINUX_DIR)/drivers/bluetooth/btrtl.ko
   AUTOLOAD:=$(call AutoProbe,btusb)
 endef
 
@@ -81,6 +80,18 @@ endef
 $(eval $(call KernelPackage,btusb))
 
 
+define KernelPackage/btmtk
+  SUBMENU:=$(BLUETOOTH_MENU)
+  TITLE:=MTK Bluetooth support
+  HIDDEN:=1
+  DEPENDS:=+kmod-bluetooth
+  KCONFIG:=CONFIG_BT_MTK
+  FILES:=$(LINUX_DIR)/drivers/bluetooth/btmtk.ko
+endef
+
+$(eval $(call KernelPackage,btmtk))
+
+
 define KernelPackage/ath3k
   SUBMENU:=$(BLUETOOTH_MENU)
   TITLE:=ATH3K Kernel Module support
diff --git a/target/linux/mediatek/modules.mk b/target/linux/mediatek/modules.mk
index 8480123725..ade8d60ab3 100644
--- a/target/linux/mediatek/modules.mk
+++ b/target/linux/mediatek/modules.mk
@@ -18,7 +18,7 @@ $(eval $(call KernelPackage,ata-ahci-mtk))
 define KernelPackage/btmtkuart
   SUBMENU:=Other modules
   TITLE:=MediaTek HCI UART driver
-  DEPENDS:=@TARGET_mediatek_mt7622 +kmod-bluetooth +mt7622bt-firmware
+  DEPENDS:=@TARGET_mediatek_mt7622 +kmod-bluetooth +kmod-btmtk +mt7622bt-firmware
   KCONFIG:=CONFIG_BT_MTKUART
   FILES:= \
 	$(LINUX_DIR)/drivers/bluetooth/btmtkuart.ko




More information about the lede-commits mailing list