Dateien
android_kernel_samsung_sm86…/Android.mk
Umesh Vats eaa3717b1d bt-kernel: Bring initial files for BT family drivers
Bring BT family drivers from msm-5.10 kernel
to BT kernel project.

drivers/bluetooth/btpower.c -> .
drivers/bluetooth/btfm* ->  .
drivers/media/radio/rtc6226/* -> .
include/net/bt* -> include/
Above shows how directories and header files are relocated.

Change-Id: I6263eaa81dec344d7589f09ad3ec525ee7b04a8a
2021-11-08 14:00:16 -08:00

85 Zeilen
3.0 KiB
Makefile

# Android makefile for BT kernel modules
LOCAL_PATH := $(call my-dir)
# Build/Package only in case of supported target
ifeq ($(call is-board-platform-in-list,taro kalama), true)
BT_SELECT := CONFIG_MSM_BT_POWER=m
BT_SELECT += CONFIG_BTFM_SLIM=m
BT_SELECT += CONFIG_I2C_RTC6226_QCA=m
LOCAL_PATH := $(call my-dir)
# This makefile is only for DLKM
ifneq ($(findstring vendor,$(LOCAL_PATH)),)
ifneq ($(findstring opensource,$(LOCAL_PATH)),)
BT_BLD_DIR := $(abspath .)/vendor/qcom/opensource/bt-kernel
endif # opensource
DLKM_DIR := $(TOP)/device/qcom/common/dlkm
###########################################################
# This is set once per LOCAL_PATH, not per (kernel) module
KBUILD_OPTIONS := BT_KERNEL_ROOT=$(BT_BLD_DIR)
KBUILD_OPTIONS += $(foreach bt_select, \
$(BT_SELECT), \
$(bt_select))
BT_SRC_FILES := \
$(wildcard $(LOCAL_PATH)/*) \
$(wildcard $(LOCAL_PATH)/*/*) \
# Module.symvers needs to be generated as a intermediate module so that
# other modules which depend on BT platform modules can set local
# dependencies to it.
########################### Module.symvers ############################
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(BT_SRC_FILES)
LOCAL_MODULE := bt-kernel-module-symvers
LOCAL_MODULE_STEM := Module.symvers
LOCAL_MODULE_KBUILD_NAME := Module.symvers
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/Build_external_kernelmodule.mk
# Below are for Android build system to recognize each module name, so
# they can be installed properly. Since Kbuild is used to compile these
# modules, invoking any of them will cause other modules to be compiled
# as well if corresponding flags are added in KBUILD_OPTIONS from upper
# level Makefiles.
################################ pwr ################################
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(BT_SRC_FILES)
LOCAL_MODULE := btpower.ko
LOCAL_MODULE_KBUILD_NAME := pwr/btpower.ko
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_DEBUG_ENABLE := true
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/Build_external_kernelmodule.mk
################################ slimbus ################################
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(BT_SRC_FILES)
LOCAL_MODULE := bt_fm_slim.ko
LOCAL_MODULE_KBUILD_NAME := slimbus/bt_fm_slim.ko
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_DEBUG_ENABLE := true
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/Build_external_kernelmodule.mk
################################ rtc6226 ################################
include $(CLEAR_VARS)
LOCAL_SRC_FILES := $(BT_SRC_FILES)
LOCAL_MODULE := radio-i2c-rtc6226-qca.ko
LOCAL_MODULE_KBUILD_NAME := rtc6226/radio-i2c-rtc6226-qca.ko
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_DEBUG_ENABLE := true
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT)
include $(DLKM_DIR)/Build_external_kernelmodule.mk
###########################################################
endif # DLKM check
endif # supported target check