From decd7afdddf1f043ef895187d1fab3c2632339fa Mon Sep 17 00:00:00 2001 From: Yue Ma Date: Mon, 21 Mar 2016 16:45:05 -0700 Subject: qcacld-3.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. Hence add the changes to correct it based on flags TARGET_KERNEL_VERSION and KERNEL_TO_BUILD_ROOT_OFFSET. Change-Id: Ic4738da5c414a1ce1d74e2b42b918b906f5fda98 CRs-fixed: 992940 --- Android.mk | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/Android.mk b/Android.mk index c0739ea6aa8b..69e91dc99641 100644 --- a/Android.mk +++ b/Android.mk @@ -14,6 +14,14 @@ endif # platform # Build/Package only in case of supported target ifneq ($(WLAN_CHIPSET),) +# If TARGET_KERNEL_VERSION is not defined, using default kernel path, +# otherwise kernel path should come from top level Android makefiles. +ifeq ($(TARGET_KERNEL_VERSION),) +$(info "WLAN: TARGET_KERNEL_VERSION not defined, assuming default") +TARGET_KERNEL_SOURCE := kernel +KERNEL_TO_BUILD_ROOT_OFFSET := ../ +endif + LOCAL_PATH := $(call my-dir) # This makefile is only for DLKM @@ -33,7 +41,7 @@ endif # platform-sdk-version # Build wlan.ko as $(WLAN_CHIPSET)_wlan.ko ########################################################### # This is set once per LOCAL_PATH, not per (kernel) module -KBUILD_OPTIONS := WLAN_ROOT=../$(WLAN_BLD_DIR)/qcacld-3.0 +KBUILD_OPTIONS := WLAN_ROOT=$(KERNEL_TO_BUILD_ROOT_OFFSET)$(WLAN_BLD_DIR)/qcacld-3.0 KBUILD_OPTIONS += WLAN_COMMON_ROOT=../../../opensource/wlan/qca-wifi-host-cmn KBUILD_OPTIONS += WLAN_COMMON_INC=../vendor/qcom/opensource/wlan/qca-wifi-host-cmn -- cgit v1.2.3