target specific KCONFIG fragments for kernel modules
Tim Harvey
tharvey at gateworks.com
Fri Feb 27 13:47:39 PST 2026
Greetings,
I've been trying to figure out a way to create target specific KCONFIG
fragments in a KernelPackage and have not found anything that works.
specifically I'm trying to enable HCIART_BCM for a specific target (as
my PR has not been accepted due to imposing a small increase in static
kernel size: https://github.com/openwrt/openwrt/pull/14517).
Enabling the items in the target/subtarget config-default does not
work as the KCONFIG's in selected packages are applied after that so
I've been focusing on target specific changes in the KenrelPackage
definition.
I have not been able to get something like the following to work:
define KernelPackage/hci-uart
SUBMENU:=$(BLUETOOTH_MENU)
TITLE:=Bluetooth HCI UART support
DEPENDS:=+kmod-bluetooth
ifeq ($(CONFIG_TARGET_imx_cortexa53),y)
KCONFIG:= \
CONFIG_BT_HCIUART \
CONFIG_BT_HCIUART_BCM=y \
CONFIG_BT_HCIUART_SERDEV=y \
CONFIG_SERIAL_DEV_CTRL_TTYPORT=y \
CONFIG_SERIAL_DEV_BUS=y \
CONFIG_BT_HCIUART_INTEL=n \
CONFIG_BT_HCIUART_H4 \
CONFIG_BT_HCIUART_NOKIA=n
else
KCONFIG:= \
CONFIG_BT_HCIUART \
CONFIG_BT_HCIUART_BCM=n \
CONFIG_BT_HCIUART_INTEL=n \
CONFIG_BT_HCIUART_H4 \
CONFIG_BT_HCIUART_NOKIA=n
endif
FILES:= \
$(LINUX_DIR)/drivers/bluetooth/hci_uart.ko \
$(if $(CONFIG_BT_HCIUART_BCM),$(LINUX_DIR)/drivers/bluetooth/btbcm.ko)
AUTOLOAD:=$(call AutoProbe,hci_uart)
endef
Does anyone have any suggestions on how to accomplish this?
Best Regards,
Tim
More information about the openwrt-devel
mailing list