android_kernel_samsung_sm86.../Makefile
Srikanth Marepalli e2e3e0326e qcacld-3.0: Use WLAN_WEAR_CHIPSET to modify INI path
On Wear HL based target with keystone kernel, it generates
WLAN driver with name "qca_cld3_wlan.ko" based on macro
definition WLAN_WEAR_CHIPSET. But the driver was not loading
because of the old INI path and /dev path.
This commit modifies the INI path and /dev path based on
macro defined i.e. WLAN_WEAR_CHIPSET.

Change-Id: I6d457a3bb708de3175c40b0f2b3ba0ebde915838
CRs-Fixed: 3168115
2022-04-21 07:24:32 -07:00

41 lines
1.5 KiB
Makefile

KERNEL_SRC ?= /lib/modules/$(shell uname -r)/build
# The Make variable $(M) must point to the directory that contains the module
# source code (which includes this Makefile). It can either be an absolute or a
# relative path. If it is a relative path, then it must be relative to the
# kernel source directory (KERNEL_SRC). An absolute path can be obtained very
# easily through $(shell pwd). Generating a path relative to KERNEL_SRC is
# difficult and we accept some outside help by letting the caller override the
# variable $(M). Allowing a relative path for $(M) enables us to have the build
# system put output/object files (.o, .ko.) into a directory different from the
# module source directory.
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
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) # Extra config if any
endif
all:
$(MAKE) -C $(KERNEL_SRC) M=$(M) modules $(KBUILD_OPTIONS)
modules_install:
$(MAKE) INSTALL_MOD_STRIP=1 M=$(M) -C $(KERNEL_SRC) modules_install
clean:
$(MAKE) -C $(KERNEL_SRC) M=$(M) clean $(KBUILD_OPTIONS)