From 4c316507f973becea28138a0bd4b73de798b3c57 Mon Sep 17 00:00:00 2001 From: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> Date: Sun, 29 Mar 2026 12:15:26 +0000 Subject: [PATCH 01/10] qcom: video-driver: fix compilation issue due to VIDEO_ROOT being empty at VIDEO_GEN_PATH step Signed-off-by: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> --- vendor/qcom/opensource/video-driver/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/vendor/qcom/opensource/video-driver/Makefile b/vendor/qcom/opensource/video-driver/Makefile index 92b3f7f07..640ce5693 100644 --- a/vendor/qcom/opensource/video-driver/Makefile +++ b/vendor/qcom/opensource/video-driver/Makefile @@ -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/\\/\\\\/') From 2bd6dd8f656c2829b1f8bca173795a7d4826e5cf Mon Sep 17 00:00:00 2001 From: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> Date: Sun, 29 Mar 2026 15:38:44 +0000 Subject: [PATCH 02/10] qcom: datarmnet-ext: fix compilation failure due to missing headers and missing variables Signed-off-by: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> --- vendor/qcom/opensource/datarmnet-ext/aps/Makefile | 5 ++++- vendor/qcom/opensource/datarmnet-ext/offload/Makefile | 5 ++++- vendor/qcom/opensource/datarmnet-ext/perf/Makefile | 7 ++++++- vendor/qcom/opensource/datarmnet-ext/perf_tether/Makefile | 6 +++++- vendor/qcom/opensource/datarmnet-ext/sch/Makefile | 2 ++ vendor/qcom/opensource/datarmnet-ext/shs/Makefile | 5 ++++- vendor/qcom/opensource/datarmnet-ext/wlan/Makefile | 5 ++++- 7 files changed, 29 insertions(+), 6 deletions(-) diff --git a/vendor/qcom/opensource/datarmnet-ext/aps/Makefile b/vendor/qcom/opensource/datarmnet-ext/aps/Makefile index 3b150c8cd..974149f2d 100644 --- a/vendor/qcom/opensource/datarmnet-ext/aps/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/aps/Makefile @@ -1,5 +1,8 @@ #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 @@ -7,7 +10,7 @@ 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 diff --git a/vendor/qcom/opensource/datarmnet-ext/offload/Makefile b/vendor/qcom/opensource/datarmnet-ext/offload/Makefile index d9e9d4255..cb682380b 100644 --- a/vendor/qcom/opensource/datarmnet-ext/offload/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/offload/Makefile @@ -1,5 +1,8 @@ #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 @@ -7,7 +10,7 @@ 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 diff --git a/vendor/qcom/opensource/datarmnet-ext/perf/Makefile b/vendor/qcom/opensource/datarmnet-ext/perf/Makefile index 33b7f2caa..5931618d2 100644 --- a/vendor/qcom/opensource/datarmnet-ext/perf/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/perf/Makefile @@ -1,6 +1,11 @@ #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 @@ -8,7 +13,7 @@ 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 diff --git a/vendor/qcom/opensource/datarmnet-ext/perf_tether/Makefile b/vendor/qcom/opensource/datarmnet-ext/perf_tether/Makefile index 4a9ebcd98..daa7a1298 100644 --- a/vendor/qcom/opensource/datarmnet-ext/perf_tether/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/perf_tether/Makefile @@ -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 diff --git a/vendor/qcom/opensource/datarmnet-ext/sch/Makefile b/vendor/qcom/opensource/datarmnet-ext/sch/Makefile index b8749ce73..abfa69f24 100644 --- a/vendor/qcom/opensource/datarmnet-ext/sch/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/sch/Makefile @@ -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 diff --git a/vendor/qcom/opensource/datarmnet-ext/shs/Makefile b/vendor/qcom/opensource/datarmnet-ext/shs/Makefile index 37be58516..7d70f76ca 100644 --- a/vendor/qcom/opensource/datarmnet-ext/shs/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/shs/Makefile @@ -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 diff --git a/vendor/qcom/opensource/datarmnet-ext/wlan/Makefile b/vendor/qcom/opensource/datarmnet-ext/wlan/Makefile index 16ab5a0f9..699a89bc5 100644 --- a/vendor/qcom/opensource/datarmnet-ext/wlan/Makefile +++ b/vendor/qcom/opensource/datarmnet-ext/wlan/Makefile @@ -1,5 +1,8 @@ #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 @@ -7,7 +10,7 @@ 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 From 0ff1ba4f1608439d2091712438df22f31945c5c9 Mon Sep 17 00:00:00 2001 From: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> Date: Sun, 29 Mar 2026 16:36:52 +0000 Subject: [PATCH 03/10] qcom: bt-kernel: Add build configs and fix EXTRA_SYMVERS path Signed-off-by: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> --- vendor/qcom/opensource/bt-kernel/Makefile | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/vendor/qcom/opensource/bt-kernel/Makefile b/vendor/qcom/opensource/bt-kernel/Makefile index 51cbbaea9..1312a2fcf 100644 --- a/vendor/qcom/opensource/bt-kernel/Makefile +++ b/vendor/qcom/opensource/bt-kernel/Makefile @@ -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: From a06bb358d14ae4eccbc1102f785d35cd47c9d967 Mon Sep 17 00:00:00 2001 From: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> Date: Mon, 30 Mar 2026 02:01:29 +0000 Subject: [PATCH 04/10] wlan: qcacld-3.0: fix compilation errors and add missing build flags Signed-off-by: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> --- vendor/qcom/opensource/wlan/qcacld-3.0/Kbuild | 3 +- .../qcom/opensource/wlan/qcacld-3.0/Makefile | 41 ++++++++++++------- 2 files changed, 29 insertions(+), 15 deletions(-) diff --git a/vendor/qcom/opensource/wlan/qcacld-3.0/Kbuild b/vendor/qcom/opensource/wlan/qcacld-3.0/Kbuild index 3b9fb83bd..60eb08937 100755 --- a/vendor/qcom/opensource/wlan/qcacld-3.0/Kbuild +++ b/vendor/qcom/opensource/wlan/qcacld-3.0/Kbuild @@ -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) @@ -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__ diff --git a/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile b/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile index 32910a3ac..97911023f 100644 --- a/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile +++ b/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile @@ -12,23 +12,36 @@ 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 +KBUILD_OPTIONS += \ + WLAN_ROOT=$(KERNEL_SRC)/$(M) \ + WLAN_PLATFORM_ROOT=$(KERNEL_SRC)/$(M)/../platform \ + WLAN_COMMON_ROOT=cmn \ + WLAN_COMMON_INC=$(KERNEL_SRC)/$(M)/cmn \ + WLAN_FW_API=$(KERNEL_SRC)/$(M)/../fw-api \ + CONFIG_QCA_CLD_WLAN=m \ + CONFIG_CNSS_OUT_OF_TREE=y \ + CONFIG_CNSS_KIWI_V2=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=kiwi_v2 \ + DYNAMIC_SINGLE_CHIP=kiwi_v2 \ + MODNAME=qca_cld3_kiwi_v2 \ + DEVNAME=kiwi_v2 \ + BOARD_PLATFORM=kalama \ + 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) From 1c6c0e895201d5de4f35aeda1b345bf686c37011 Mon Sep 17 00:00:00 2001 From: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> Date: Wed, 1 Apr 2026 02:34:04 +0000 Subject: [PATCH 05/10] qcom: graphics-kernel: add missing config to compile msm_kgsl.ko in out of tree builds Signed-off-by: nullptr-t-oss <127822226+nullptr-t-oss@users.noreply.github.com> --- vendor/qcom/opensource/graphics-kernel/config/gki_kalama.conf | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/qcom/opensource/graphics-kernel/config/gki_kalama.conf b/vendor/qcom/opensource/graphics-kernel/config/gki_kalama.conf index f12a8d64f..76c38ec02 100644 --- a/vendor/qcom/opensource/graphics-kernel/config/gki_kalama.conf +++ b/vendor/qcom/opensource/graphics-kernel/config/gki_kalama.conf @@ -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 From 6b0692c97c5875872f853155e4862bb8de52d398 Mon Sep 17 00:00:00 2001 From: nullptr_t <127822226+nullptr-t-oss@users.noreply.github.com> Date: Wed, 17 Jun 2026 02:09:04 +0000 Subject: [PATCH 06/10] fix : invalid CMN, FW_API and WLAN_PLATFORM_INC Path We bulid modules from qcom/opensource/wlan/qcacld-3.0/.${DEVNAME} so WLAN_ROOT is ${KDIR}/{...}/qcom/opensource/wlan/qcacld-3.0/.${DEVNAME} and since qca-wifi-host-cmn, fw-api and platform are sibling directories to qcacld-3.0 folder we must go up two directories instead of one. --- vendor/qcom/opensource/wlan/qcacld-3.0/Makefile | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile b/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile index 97911023f..bef88dbf9 100644 --- a/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile +++ b/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile @@ -13,11 +13,11 @@ M ?= $(shell pwd) ifeq ($(WLAN_ROOT),) KBUILD_OPTIONS += \ - WLAN_ROOT=$(KERNEL_SRC)/$(M) \ - WLAN_PLATFORM_ROOT=$(KERNEL_SRC)/$(M)/../platform \ + WLAN_ROOT=$(KERNEL_SRC)/$(M)/../ \ + WLAN_PLATFORM_ROOT=$(WLAN_ROOT)/../platform \ WLAN_COMMON_ROOT=cmn \ - WLAN_COMMON_INC=$(KERNEL_SRC)/$(M)/cmn \ - WLAN_FW_API=$(KERNEL_SRC)/$(M)/../fw-api \ + 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_CNSS_KIWI_V2=y \ From 87a8887dc77da4b5124a51e844e0bd8dd3f58095 Mon Sep 17 00:00:00 2001 From: nullptr_t <127822226+nullptr-t-oss@users.noreply.github.com> Date: Wed, 17 Jun 2026 02:20:58 +0000 Subject: [PATCH 07/10] qcacld-3.0: add support for multi-ko note: after module_install we need to manually rename the compiled ko from $(local_dev_name).ko to qca_cld3_$(local_dev_name).ko to replicate the behaviour described in Android.mk --- vendor/qcom/opensource/wlan/qcacld-3.0/Makefile | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile b/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile index bef88dbf9..104fea6e0 100644 --- a/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile +++ b/vendor/qcom/opensource/wlan/qcacld-3.0/Makefile @@ -12,6 +12,9 @@ KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build M ?= $(shell pwd) ifeq ($(WLAN_ROOT),) +LOCAL_DEV_NAME := $(patsubst .%,%,\ + $(lastword $(strip $(subst /, ,$(M))))) + KBUILD_OPTIONS += \ WLAN_ROOT=$(KERNEL_SRC)/$(M)/../ \ WLAN_PLATFORM_ROOT=$(WLAN_ROOT)/../platform \ @@ -20,7 +23,6 @@ KBUILD_OPTIONS += \ WLAN_FW_API=$(WLAN_ROOT)/../fw-api \ CONFIG_QCA_CLD_WLAN=m \ CONFIG_CNSS_OUT_OF_TREE=y \ - CONFIG_CNSS_KIWI_V2=y \ CONFIG_CNSS2=m \ CONFIG_CNSS2_QMI=y \ CONFIG_CNSS_QMI_SVC=m \ @@ -31,11 +33,11 @@ KBUILD_OPTIONS += \ CONFIG_CNSS_HW_SECURE_DISABLE=y \ CONFIG_BUS_AUTO_SUSPEND=y \ CONFIG_BUILD_TAG=n \ - WLAN_PROFILE=kiwi_v2 \ - DYNAMIC_SINGLE_CHIP=kiwi_v2 \ - MODNAME=qca_cld3_kiwi_v2 \ - DEVNAME=kiwi_v2 \ - BOARD_PLATFORM=kalama \ + 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 From 78eaa5ad9fa8cbb6d2534021a973889b89c74cfc Mon Sep 17 00:00:00 2001 From: nullptr_t Date: Fri, 28 Aug 2026 17:40:54 +0000 Subject: [PATCH 08/10] qcom: display-drivers: fix modpost errors This commit fixes the following errors : ERROR: modpost: "msm_hw_fence_reset_client" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "msm_hw_fence_create" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "msm_hw_fence_destroy" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "msm_hw_fence_update_txq" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "msm_hw_fence_wait_update" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "msm_hw_fence_deregister" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "msm_hw_fence_register" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "mmrm_client_set_value" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "mmrm_client_deregister" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! ERROR: modpost: "mmrm_client_register" [../../vendor/qcom/opensource/display-drivers/msm/msm_drm.ko] undefined! WARNING: modpost: suppressed 17 unresolved symbol warnings because there were too many) Change-Id: Iae6fc0e466fa9f99ce45853f67abe541cad9d23a Signed-off-by: nullptr_t --- vendor/qcom/opensource/display-drivers/Makefile | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/vendor/qcom/opensource/display-drivers/Makefile b/vendor/qcom/opensource/display-drivers/Makefile index 4f79116ad..e008ed9a4 100644 --- a/vendor/qcom/opensource/display-drivers/Makefile +++ b/vendor/qcom/opensource/display-drivers/Makefile @@ -2,6 +2,14 @@ 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+= KBUILD_EXTRA_SYMBOLS="$(KBUILD_EXTRA_SYMBOLS)" + all: $(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS) From 33d81ed756cf68341ec9dd9711f7fedb6794ff45 Mon Sep 17 00:00:00 2001 From: nullptr_t Date: Fri, 28 Aug 2026 18:09:38 +0000 Subject: [PATCH 09/10] qcom: display-drivers: enable CONFIG_DRM_MSM Change-Id: I0a1a591fe9ad23631ef87fd8859f9edf7b293079 Signed-off-by: nullptr_t --- vendor/qcom/opensource/display-drivers/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/qcom/opensource/display-drivers/Makefile b/vendor/qcom/opensource/display-drivers/Makefile index e008ed9a4..be474a691 100644 --- a/vendor/qcom/opensource/display-drivers/Makefile +++ b/vendor/qcom/opensource/display-drivers/Makefile @@ -8,6 +8,7 @@ KBUILD_EXTRA_SYMBOLS := $(M)/../mm-drivers/hw_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: From 16113e2569f3a7e8ee7f9d22f52b5e965424ecf7 Mon Sep 17 00:00:00 2001 From: nullptr_t Date: Sat, 29 Aug 2026 10:08:09 +0000 Subject: [PATCH 10/10] qcom: audio-kernel: fix modpost errors This commit fixes the following error: MODPOST ../../vendor/qcom/opensource/audio-kernel/Module.symvers ERROR: modpost: "msm_ext_disp_register_audio_codec" [../../vendor/qcom/opensource/audio-kernel/asoc/codecs/hdmi_dlkm.ko] undefined! ERROR: modpost: "msm_ext_disp_select_audio_codec" Change-Id: I35e07908d37e0529cb13d09cb0b48c5e75e13de9 Signed-off-by: nullptr_t --- vendor/qcom/opensource/audio-kernel/Makefile | 1 + 1 file changed, 1 insertion(+) diff --git a/vendor/qcom/opensource/audio-kernel/Makefile b/vendor/qcom/opensource/audio-kernel/Makefile index 3f54acc77..352a3be1f 100644 --- a/vendor/qcom/opensource/audio-kernel/Makefile +++ b/vendor/qcom/opensource/audio-kernel/Makefile @@ -2,6 +2,7 @@ M=$(PWD) AUDIO_ROOT=$(KERNEL_SRC)/$(M) KBUILD_OPTIONS+= AUDIO_ROOT=$(AUDIO_ROOT) +KBUILD_OPTIONS+= KBUILD_EXTRA_SYMBOLS=$(M)/../mm-drivers/msm_ext_display/Module.symvers all: modules