summaryrefslogtreecommitdiff
path: root/Android.mk
diff options
context:
space:
mode:
authorAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-24 10:36:59 +0530
committerAnjaneedevi Kapparapu <akappa@codeaurora.org>2016-03-29 12:13:54 +0530
commit064ff522da95e8a8f9bc1d59dd795dfa73f0f970 (patch)
treec2167c63fbd87e7504ab248ac43c781d79e5795d /Android.mk
parent2eb5c1b2948f816ca5b769ecf0410f0ec48ce549 (diff)
qcacld-2.0: Support new build tree structure
The kernel can be either directly under build_root/kernel or in a subdirectory within it. The WLAN module has a hard coded assumption for the path. Add the changes to correct it and also avoid compiling CLD2.0 driver if TARGET_KERNEL_VERSION is defined and not 3.18. Change-Id: Ic4738da5c414a1ce1d74e2b42b918b906f5fda98 CRs-fixed: 992940
Diffstat (limited to 'Android.mk')
-rw-r--r--Android.mk17
1 files changed, 15 insertions, 2 deletions
diff --git a/Android.mk b/Android.mk
index 4c97823a582b..9001597ce39c 100644
--- a/Android.mk
+++ b/Android.mk
@@ -13,6 +13,19 @@ endif
# Build/Package only in case of supported target
ifneq ($(WLAN_CHIPSET),)
+# Check for kernel version
+ifeq ($(TARGET_KERNEL_VERSION),)
+$(info "WLAN: TARGET_KERNEL_VERSION not defined, assuming default")
+TARGET_KERNEL_VERSION := 3.18
+TARGET_KERNEL_SOURCE := kernel
+KERNEL_TO_BUILD_ROOT_OFFSET := ../
+endif
+
+# Check for supported kernel
+ifeq ($(TARGET_KERNEL_VERSION),3.18)
+$(info "WLAN: supported kernel detected, building qcacld-2.0")
+
+
LOCAL_PATH := $(call my-dir)
# This makefile is only for DLKM
@@ -50,7 +63,7 @@ endif
###########################################################
# This is set once per LOCAL_PATH, not per (kernel) module
-KBUILD_OPTIONS := WLAN_ROOT=../$(WLAN_BLD_DIR)/qcacld-2.0
+KBUILD_OPTIONS := WLAN_ROOT=$(KERNEL_TO_BUILD_ROOT_OFFSET)$(WLAN_BLD_DIR)/qcacld-2.0
# We are actually building wlan.ko here, as per the
# requirement we are specifying <chipset>_wlan.ko as LOCAL_MODULE.
# This means we need to rename the module to <chipset>_wlan.ko
@@ -111,6 +124,6 @@ endif
endif
endif # DLKM check
-
+endif # Supported kernel check
endif # supported target check
endif # WLAN enabled check