[openwrt/openwrt] mediatek: build btmtkuart as a kernel module

LEDE Commits lede-commits at lists.infradead.org
Tue Sep 22 09:15:03 EDT 2020


981213 pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/20f2bd044a56f32e9e0782745558858f21bb550f

commit 20f2bd044a56f32e9e0782745558858f21bb550f
Author: Chuanhong Guo <gch981213 at gmail.com>
AuthorDate: Tue Sep 22 21:04:02 2020 +0800

    mediatek: build btmtkuart as a kernel module
    
    bluetooth on mt7622 needs a firmware to start. It can't be built-in or
    it tries to load firmware before rootfs is mounted, and then fails.
    build it as a kernel module to fix that.
    
    Signed-off-by: Chuanhong Guo <gch981213 at gmail.com>
---
 target/linux/mediatek/modules.mk        | 12 ++++++++++++
 target/linux/mediatek/mt7622/config-5.4 | 15 ---------------
 2 files changed, 12 insertions(+), 15 deletions(-)

diff --git a/target/linux/mediatek/modules.mk b/target/linux/mediatek/modules.mk
index eb81afe235..9c6fb515f4 100644
--- a/target/linux/mediatek/modules.mk
+++ b/target/linux/mediatek/modules.mk
@@ -15,6 +15,18 @@ endef
 
 $(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
+  KCONFIG:=CONFIG_BT_MTKUART
+  FILES:= \
+	$(LINUX_DIR)/drivers/bluetooth/btmtkuart.ko
+  AUTOLOAD:=$(call AutoProbe,btmtkuart)
+endef
+
+$(eval $(call KernelPackage,btmtkuart))
+
 define KernelPackage/sdhci-mtk
   SUBMENU:=Other modules
   TITLE:=Mediatek SDHCI driver
diff --git a/target/linux/mediatek/mt7622/config-5.4 b/target/linux/mediatek/mt7622/config-5.4
index cf12a1f52c..3861704eaa 100755
--- a/target/linux/mediatek/mt7622/config-5.4
+++ b/target/linux/mediatek/mt7622/config-5.4
@@ -121,21 +121,6 @@ CONFIG_BLK_SCSI_REQUEST=y
 CONFIG_BLOCK_COMPAT=y
 CONFIG_BSD_PROCESS_ACCT=y
 CONFIG_BSD_PROCESS_ACCT_V3=y
-CONFIG_BT=y
-CONFIG_BT_BCM=y
-CONFIG_BT_BREDR=y
-CONFIG_BT_DEBUGFS=y
-CONFIG_BT_HCIUART=y
-CONFIG_BT_HCIUART_BCM=y
-# CONFIG_BT_HCIUART_INTEL is not set
-# CONFIG_BT_HCIUART_NOKIA is not set
-CONFIG_BT_HCIUART_QCA=y
-CONFIG_BT_HCIUART_SERDEV=y
-CONFIG_BT_HCIVHCI=y
-CONFIG_BT_HS=y
-CONFIG_BT_LE=y
-CONFIG_BT_MTKUART=y
-CONFIG_BT_QCA=y
 # CONFIG_CAVIUM_TX2_ERRATUM_219 is not set
 CONFIG_CC_HAS_KASAN_GENERIC=y
 CONFIG_CLKDEV_LOOKUP=y



More information about the lede-commits mailing list