Skip to content
Open
5 changes: 4 additions & 1 deletion vendor/qcom/opensource/bt-kernel/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,11 @@ M=$(PWD)
BT_ROOT=$(KERNEL_SRC)/$(M)

KBUILD_OPTIONS+= BT_ROOT=$(BT_ROOT)
KBUILD_OPTIONS += CONFIG_MSM_BT_POWER=m
KBUILD_OPTIONS += CONFIG_BTFM_SLIM=m
KBUILD_OPTIONS += CONFIG_I2C_RTC6226_QCA=m
KBUILD_EXTRA_SYMBOLS=$(call intermediates-dir-for,DLKM,wlan-platform-module-symvers)/Module.symvers
KBUILD_EXTRA_SYMBOLS=$(OUT_DIR)/vendor/qcom/wlan/platform/Module.symvers
KBUILD_EXTRA_SYMBOLS=$(M)/../wlan/platform/Module.symvers
ccflags-y += -I$(BT_ROOT)/../wlan/platform/inc

all:
Expand Down
5 changes: 4 additions & 1 deletion vendor/qcom/opensource/datarmnet-ext/aps/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#By default build for CLD
RMNET_APS_SELECT := CONFIG_RMNET_APS=m
DATARMNET_CORE_PATH=datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += $(RMNET_APS_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
KBUILD_EXTRA_SYMBOLS := $(M)/../../$(DATARMNET_CORE_PATH)/Module.symvers

M ?= $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) KBUILD_EXTRA_SYMBOLS=$(KBUILD_EXTRA_SYMBOLS)

modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
Expand Down
5 changes: 4 additions & 1 deletion vendor/qcom/opensource/datarmnet-ext/offload/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#By default build for CLD
RMNET_OFFLOAD_SELECT := CONFIG_RMNET_OFFLOAD=m
DATARMNET_CORE_PATH=datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += $(RMNET_OFFLOAD_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
KBUILD_EXTRA_SYMBOLS := $(M)/../../$(DATARMNET_CORE_PATH)/Module.symvers

M ?= $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) $(KBUILD_EXTRA_SYMBOLS)
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) KBUILD_EXTRA_SYMBOLS=$(KBUILD_EXTRA_SYMBOLS)

modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
Expand Down
7 changes: 6 additions & 1 deletion vendor/qcom/opensource/datarmnet-ext/perf/Makefile
Original file line number Diff line number Diff line change
@@ -1,14 +1,19 @@
#By default build for CLD
RMNET_PERF_SELECT := CONFIG_RMNET_PERF=m
DATARMNET_CORE_PATH=datarmnet/core
DATARMNET_SHS_PATH=datarmnet-ext/shs
KBUILD_OPTIONS += $(RMNET_PERF_SELECT)
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_SHS_PATH=$(KERNEL_SRC)/$(M)/../../shs
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
KBUILD_EXTRA_SYMBOLS := $(M)/../../$(DATARMNET_CORE_PATH)/Module.symvers
KBUILD_EXTRA_SYMBOLS += $(M)/../../$(DATARMNET_SHS_PATH)/Module.symvers

M ?= $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) $(KBUILD_EXTRA_SYMBOLS)
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) KBUILD_EXTRA_SYMBOLS=$(KBUILD_EXTRA_SYMBOLS)

modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
Expand Down
6 changes: 5 additions & 1 deletion vendor/qcom/opensource/datarmnet-ext/perf_tether/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,17 @@
#By default build for CLD
RMNET_PERF_TETHER_SELECT := CONFIG_RMNET_PERF_TETHER=m
DATARMNET_CORE_PATH=datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += $(RMNET_PERF_TETHER_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
KBUILD_EXTRA_SYMBOLS := $(M)/../../$(DATARMNET_CORE_PATH)/Module.symvers
KBUILD_EXTRA_SYMBOLS += $(M)/../shs/Module.symvers

M ?= $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) $(KBUILD_EXTRA_SYMBOLS)
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) KBUILD_EXTRA_SYMBOLS=$(KBUILD_EXTRA_SYMBOLS)

modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
Expand Down
2 changes: 2 additions & 0 deletions vendor/qcom/opensource/datarmnet-ext/sch/Makefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
#By default build for CLD
RMNET_SCH_SELECT := CONFIG_RMNET_SCH=m
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += $(RMNET_SCH_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any

Expand Down
5 changes: 4 additions & 1 deletion vendor/qcom/opensource/datarmnet-ext/shs/Makefile
Original file line number Diff line number Diff line change
@@ -1,12 +1,15 @@
KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build

KBUILD_OPTIONS := RMNET_SHS_ROOT=$(PWD)
DATARMNET_CORE_PATH=datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += MODNAME?=rmnet_shs
KBUILD_EXTRA_SYMBOLS := $(M)/../../$(DATARMNET_CORE_PATH)/Module.symvers
M ?= $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) $(KBUILD_EXTRA_SYMBOLS)
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) KBUILD_EXTRA_SYMBOLS=$(KBUILD_EXTRA_SYMBOLS)

modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
Expand Down
5 changes: 4 additions & 1 deletion vendor/qcom/opensource/datarmnet-ext/wlan/Makefile
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
#By default build for CLD
RMNET_WLAN_SELECT := CONFIG_RMNET_WLAN=m
DATARMNET_CORE_PATH=datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_ROOT=$(KERNEL_SRC)/$(M)/../../datarmnet/core
KBUILD_OPTIONS += RMNET_CORE_INC_DIR=$(KERNEL_SRC)/$(M)/../../datarmnet/core/
KBUILD_OPTIONS += $(RMNET_WLAN_SELECT)
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
KBUILD_EXTRA_SYMBOLS := $(M)/../../$(DATARMNET_CORE_PATH)/Module.symvers

M ?= $(shell pwd)

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) $(KBUILD_EXTRA_SYMBOLS)
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) KBUILD_EXTRA_SYMBOLS=$(KBUILD_EXTRA_SYMBOLS)

modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 -C $(KERNEL_SRC) M=$(M) modules_install
Expand Down
9 changes: 9 additions & 0 deletions vendor/qcom/opensource/display-drivers/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,15 @@

KBUILD_OPTIONS+= DISPLAY_ROOT=$(KERNEL_SRC)/$(M)

KBUILD_EXTRA_SYMBOLS := $(M)/../mm-drivers/hw_fence/Module.symvers \
$(M)/../mm-drivers/msm_ext_display/Module.symvers \
$(M)/../mm-drivers/sync_fence/Module.symvers \
$(M)/../mmrm-driver/Module.symvers \
$(M)/../securemsm-kernel/Module.symvers

KBUILD_OPTIONS+=CONFIG_DRM_MSM=y
KBUILD_OPTIONS+= KBUILD_EXTRA_SYMBOLS="$(KBUILD_EXTRA_SYMBOLS)"

all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
CONFIG_QCOM_KGSL = m
CONFIG_DEVFREQ_GOV_QCOM_ADRENO_TZ = y
CONFIG_DEVFREQ_GOV_QCOM_GPUBW_MON = y
CONFIG_QCOM_KGSL_IDLE_TIMEOUT = 80
Expand Down
3 changes: 2 additions & 1 deletion vendor/qcom/opensource/video-driver/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-only

KBUILD_OPTIONS+= VIDEO_ROOT=$(KERNEL_SRC)/$(M)
VIDEO_ROOT = $(KERNEL_SRC)/$(M)
KBUILD_OPTIONS+= VIDEO_ROOT=$(VIDEO_ROOT)

VIDEO_COMPILE_TIME = $(shell date)
VIDEO_COMPILE_BY = $(shell whoami | sed 's/\\/\\\\/')
Expand Down
3 changes: 2 additions & 1 deletion vendor/qcom/opensource/wlan/qcacld-3.0/Kbuild
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ CONFIG_QCA_CLD_WLAN_PROFILE ?= $(WLAN_PROFILE)
DEVNAME ?= wlan
WLAN_PLATFORM_INC ?= $(WLAN_ROOT)/../platform/inc

ifeq ($(KERNEL_BUILD), n)
ifeq ($(KERNEL_BUILD), y)
ifneq ($(ANDROID_BUILD_TOP),)
ANDROID_BUILD_TOP_REL := $(shell python -c "import os.path; print(os.path.relpath('$(ANDROID_BUILD_TOP)'))")
override WLAN_ROOT := $(ANDROID_BUILD_TOP_REL)/$(WLAN_ROOT)
Expand Down Expand Up @@ -3301,6 +3301,7 @@ INCS += $(COAP_WMI_INC)
ccflags-y += $(INCS)

cppflags-y += -DANI_OS_TYPE_ANDROID=6 \
-D__ANDROID_COMMON_KERNEL__ \
-Wall\
-Werror\
-D__linux__
Expand Down
43 changes: 29 additions & 14 deletions vendor/qcom/opensource/wlan/qcacld-3.0/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -12,23 +12,38 @@ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
M ?= $(shell pwd)

ifeq ($(WLAN_ROOT),)
# WLAN_ROOT must contain an absolute path (i.e. not a relative path)
KBUILD_OPTIONS := WLAN_ROOT=$(shell cd $(KERNEL_SRC); readlink -e $(M))

# MODNAME should be qca_cld3_wlan for helium based wear target
ifeq (qca_cld3, $(WLAN_WEAR_CHIPSET))
KBUILD_OPTIONS += MODNAME?=$(WLAN_WEAR_CHIPSET)_wlan
else
KBUILD_OPTIONS += MODNAME?=wlan
LOCAL_DEV_NAME := $(patsubst .%,%,\
$(lastword $(strip $(subst /, ,$(M)))))

KBUILD_OPTIONS += \
WLAN_ROOT=$(KERNEL_SRC)/$(M)/../ \
WLAN_PLATFORM_ROOT=$(WLAN_ROOT)/../platform \
WLAN_COMMON_ROOT=cmn \
WLAN_COMMON_INC=$(WLAN_ROOT)/$(WLAN_COMMON_ROOT) \
WLAN_FW_API=$(WLAN_ROOT)/../fw-api \
CONFIG_QCA_CLD_WLAN=m \
CONFIG_CNSS_OUT_OF_TREE=y \
CONFIG_CNSS2=m \
CONFIG_CNSS2_QMI=y \
CONFIG_CNSS_QMI_SVC=m \
CONFIG_CNSS_PLAT_IPC_QMI_SVC=m \
CONFIG_CNSS_GENL=m \
CONFIG_WCNSS_MEM_PRE_ALLOC=m \
CONFIG_CNSS_UTILS=m \
CONFIG_CNSS_HW_SECURE_DISABLE=y \
CONFIG_BUS_AUTO_SUSPEND=y \
CONFIG_BUILD_TAG=n \
WLAN_PROFILE=$(LOCAL_DEV_NAME) \
DYNAMIC_SINGLE_CHIP=$(LOCAL_DEV_NAME) \
MODNAME=$(LOCAL_DEV_NAME) \
DEVNAME=$(LOCAL_DEV_NAME) \
BOARD_PLATFORM=$(BOARD_PLATFORM) \
WLAN_CTRL_NAME=wlan
endif

#By default build for CLD
WLAN_SELECT := CONFIG_QCA_CLD_WLAN=m
KBUILD_OPTIONS += CONFIG_QCA_WIFI_ISOC=0
KBUILD_OPTIONS += CONFIG_QCA_WIFI_2_0=1
KBUILD_OPTIONS += $(WLAN_SELECT)
KBUILD_OPTIONS += KBUILD_EXTRA_SYMBOLS=$(M)/../platform/Module.symvers
KBUILD_OPTIONS += $(KBUILD_EXTRA) # Extra config if any
endif


all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
Expand Down