Files
threeeye bc1d038eac REVVL 6 Pro kernel bring-up: full working tree snapshot (2026-09-12)
Squashed backup commit (no shallow-clone history issues) of
xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream
commit 9eece662e) plus all fixes applied to get everpal_defconfig building
clean against a modern (GCC 15.2.0) toolchain -- see the previous commit
message on the lineage-23.2 branch (also in this repo history is not
available here since this is a squashed snapshot; full incremental history
lives in the local DL380 checkout and the upstream GitHub remote).

Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
2026-09-12 13:36:46 +00:00

151 lines
4.0 KiB
Makefile

# SPDX-License-Identifier: GPL-2.0
# Copyright (c) 2021 Mediatek Inc.
# Force build fail on modpost warning
KBUILD_MODPOST_FAIL_ON_WARNINGS := y
# only WMT align this design flow
#ccflags-y += -D MTK_WCN_REMOVE_KERNEL_MODULE
ifeq ($(CONFIG_ARM64), y)
ccflags-y += -D CONFIG_MTK_WCN_ARM64
endif
ifeq ($(CONFIG_MTK_CONN_LTE_IDC_SUPPORT),y)
ccflags-y += -D WMT_IDC_SUPPORT=1
else
ccflags-y += -D WMT_IDC_SUPPORT=0
endif
ccflags-y += -D MTK_WCN_WMT_STP_EXP_SYMBOL_ABSTRACT
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include
ccflags-y += -I$(srctree)/drivers/misc/mediatek/include/mt-plat
ifeq ($(CONFIG_FM_USER_LOAD),1)
ccflags-y += -D CONFIG_MTK_USER_BUILD
endif
# Makefile generated by Mediatek
# fm support
###############################################################################
MODULE_NAME := fmradio_drv
obj-y += $(MODULE_NAME).o
###############################################################################
KO_CODE_PATH := $(if $(filter /%,$(src)),,$(srctree)/)$(src)
ifeq ($(CFG_FM_CHIP),)
FM_CHIP := mt6631_6635
ccflags-y += -I$(KO_CODE_PATH)/chips/mt6631/inc -I$(KO_CODE_PATH)/chips/mt6635/inc
$(FM_CHIP)-objs += chips/mt6631/pub/mt6631_fm_rds.o
$(FM_CHIP)-objs += chips/mt6635/pub/mt6635_fm_rds.o
$(FM_CHIP)-objs += chips/mt6631/pub/mt6631_fm_lib.o
$(FM_CHIP)-objs += chips/mt6635/pub/mt6635_fm_lib.o
else
ifneq ($(CFG_FM_CHIP_ID),)
# LD 1.0
# CFG_FM_CHIP_ID is platform chip id
ifeq ($(CONFIG_MTK_FM_CHIP),)
$(error CONFIG_MTK_FM_CHIP not defined)
endif
ccflags-y += -D CFG_FM_CHIP_ID=0x$(CFG_FM_CHIP_ID)
FM_CHIP := $(subst _FM,,$(subst MT,mt,$(subst ",,$(CONFIG_MTK_FM_CHIP))))
else
# LD 2.0
# Cannot get platform chip id in LD 2.0
FM_CHIP := $(CFG_FM_CHIP)
endif
ifeq ($(FM_CHIP), mt6625)
FM_CHIP := mt6627
ccflags-y += -DMT6625_FM
endif
ifeq ($(FM_CHIP), mt6627)
FM_CHIP := mt6627
ccflags-y += -DMT6627_FM
endif
ifeq ($(FM_CHIP), mt6580)
FM_CHIP := soc
ccflags-y += -Dsoc
endif
ifeq ($(FM_CHIP), mt0633)
FM_CHIP := soc
ccflags-y += -Dsoc
endif
ifeq ($(FM_CHIP), mt6630)
ccflags-y += -DMT6630_FM
endif
ifeq ($(FM_CHIP), mt6632)
ccflags-y += -DMT6632_FM
endif
ifeq ($(FM_CHIP), mt6631)
ccflags-y += -DMT6631_FM
endif
ifeq ($(FM_CHIP), mt6635)
ccflags-y += -DMT6635_FM
endif
FM_CHIP_PATH := $(FM_CHIP)/pub/$(FM_CHIP)
ccflags-y += -I$(KO_CODE_PATH)/chips/$(FM_CHIP)/inc
ifneq ($(CFG_BUILD_CONNAC2), true)
$(FM_CHIP)-objs += chips/$(FM_CHIP_PATH)_fm_rds.o
$(FM_CHIP)-objs += chips/$(FM_CHIP_PATH)_fm_lib.o
else
$(FM_CHIP)-objs += chips/mt6635/pub/mt6635_fm_rds.o
$(FM_CHIP)-objs += chips/connac2x/pub/connac2x_fm_lib.o
ccflags-y += -DFM_DTS_PROBE
endif
endif
ccflags-y += -I$(KO_CODE_PATH)/inc \
-I$(KO_CODE_PATH)/plat/inc
$(FM_CHIP)-objs += core/fm_module.o \
core/fm_main.o \
core/fm_config.o \
core/fm_rds_parser.o \
core/fm_patch.o \
core/fm_utils.o \
core/fm_link.o \
core/fm_eint.o \
core/fm_cmd.o \
core/fm_reg_utils.o
ifeq ($(CFG_BUILD_CONNAC2), true)
CONNINFRA_SRC_FOLDER := $(srctree)/drivers/misc/mediatek/connectivity/conninfra
ccflags-y += -I$(CONNINFRA_SRC_FOLDER)/include
ccflags-y += -DCFG_FM_CONNAC2=1
$(FM_CHIP)-objs += plat/conn_infra.o
else
WMT_SRC_FOLDER := $(srctree)/drivers/misc/mediatek/connectivity/common
WMT_INCLUDE_PATH := common_main
ccflags-y += -I$(WMT_SRC_FOLDER)/$(WMT_INCLUDE_PATH)/include \
-I$(WMT_SRC_FOLDER)/$(WMT_INCLUDE_PATH)/linux/include
ccflags-y += -DCFG_FM_CONNAC2=0
$(FM_CHIP)-objs += plat/legacy_wmt.o
endif
$(MODULE_NAME)-objs += $($(FM_CHIP)-objs)
#obj-$(CONFIG_MTK_FMRADIO) += private/
obj-y += dummy.o