Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 1 | # Android makefile for the WLAN Module |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 2 | |
Jeff Johnson | bc1952f | 2013-10-01 12:02:53 -0700 | [diff] [blame] | 3 | # Assume no targets will be supported |
| 4 | WLAN_CHIPSET := |
| 5 | |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 6 | # Build/Package options for 8960 target |
Nagender Telkar | bf4ce93 | 2012-12-12 13:20:58 -0800 | [diff] [blame] | 7 | ifeq ($(call is-board-platform,msm8960),true) |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 8 | WLAN_CHIPSET := prima |
| 9 | WLAN_SELECT := CONFIG_PRIMA_WLAN=m |
| 10 | endif |
| 11 | |
Gopichand Nakkala | 6db2a94 | 2013-04-08 14:29:57 -0700 | [diff] [blame] | 12 | # Build/Package options for 8974, 8226, 8610 targets |
| 13 | ifeq ($(call is-board-platform-in-list,msm8974 msm8226 msm8610),true) |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 14 | WLAN_CHIPSET := pronto |
| 15 | WLAN_SELECT := CONFIG_PRONTO_WLAN=m |
| 16 | endif |
| 17 | |
| 18 | # Build/Package only in case of supported target |
| 19 | ifneq ($(WLAN_CHIPSET),) |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 20 | |
| 21 | LOCAL_PATH := $(call my-dir) |
| 22 | |
| 23 | # This makefile is only for DLKM |
| 24 | ifneq ($(findstring vendor,$(LOCAL_PATH)),) |
| 25 | |
Gopichand Nakkala | 717dba7 | 2013-01-04 12:08:05 -0800 | [diff] [blame] | 26 | # Determine if we are Proprietary or Open Source |
| 27 | ifneq ($(findstring opensource,$(LOCAL_PATH)),) |
| 28 | WLAN_PROPRIETARY := 0 |
| 29 | else |
| 30 | WLAN_PROPRIETARY := 1 |
| 31 | endif |
| 32 | |
| 33 | ifeq ($(WLAN_PROPRIETARY),1) |
| 34 | WLAN_BLD_DIR := vendor/qcom/proprietary/wlan |
| 35 | else |
| 36 | WLAN_BLD_DIR := vendor/qcom/opensource/wlan |
| 37 | endif |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 38 | |
Jeff Johnson | 3ebf5ad | 2013-09-21 12:27:59 -0700 | [diff] [blame] | 39 | # DLKM_DIR was moved for JELLY_BEAN (PLATFORM_SDK 16) |
| 40 | ifeq ($(call is-platform-sdk-version-at-least,16),true) |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 41 | DLKM_DIR := $(TOP)/device/qcom/common/dlkm |
AnjaneeDevi Kapparapu | 3ef4e56 | 2014-01-06 10:59:41 -0800 | [diff] [blame] | 42 | WLAN_BLD_DIR := $(call my-dir) |
| 43 | |
| 44 | ifeq ($(BOARD_HAS_QCOM_WLAN), true) |
| 45 | #Build/Package Libra Mono only in case of 7627 target |
| 46 | #ifeq ($(call is-chipset-in-board-platform,msm7627),true) |
| 47 | # include $(WLAN_BLD_DIR)/libra/CORE/HDD/src/Android.mk |
| 48 | # include $(WLAN_BLD_DIR)/utils/ptt/Android.mk |
| 49 | # include $(WLAN_BLD_DIR)/utils/asf/src/Android.mk |
| 50 | #endif |
| 51 | |
| 52 | #Build/Package Libra and Volans Module in case of msm7x30_surf target |
| 53 | ifeq ($(call is-board-platform,msm7630_surf),true) |
| 54 | include $(WLAN_BLD_DIR)/volans/CORE/HDD/src/Android.mk |
| 55 | # include $(WLAN_BLD_DIR)/libra/CORE/HDD/src/Android.mk |
| 56 | # include $(WLAN_BLD_DIR)/utils/ptt/Android.mk |
| 57 | # include $(WLAN_BLD_DIR)/utils/asf/src/Android.mk |
| 58 | endif |
| 59 | |
| 60 | #Build/Package Volans Module only in case of 8660 target variants |
| 61 | ifeq ($(call is-board-platform,msm8660),true) |
| 62 | include $(WLAN_BLD_DIR)/volans/CORE/HDD/src/Android.mk |
| 63 | # include $(WLAN_BLD_DIR)/utils/ptt/Android.mk |
| 64 | # include $(WLAN_BLD_DIR)/utils/asf/src/Android.mk |
| 65 | endif |
| 66 | |
| 67 | #Build/Package Volans Module only in case of 7627a target |
| 68 | ifeq ($(call is-board-platform,msm7627a),true) |
| 69 | include $(WLAN_BLD_DIR)/volans/CORE/HDD/src/Android.mk |
| 70 | # include $(WLAN_BLD_DIR)/utils/ptt/Android.mk |
| 71 | # include $(WLAN_BLD_DIR)/utils/asf/src/Android.mk |
| 72 | endif |
| 73 | |
| 74 | #Build/Package CLD Module only in case of apq8084 target |
| 75 | ifeq ($(call is-board-platform,apq8084),true) |
| 76 | include $(WLAN_BLD_DIR)/qcacld-new/Android.mk |
| 77 | include $(WLAN_BLD_DIR)/qcacld-new/tools/athdiag/Android.mk |
| 78 | include $(WLAN_BLD_DIR)/qcacld-new/tools/fwdebuglog/Android.mk |
| 79 | include $(WLAN_BLD_DIR)/qcacld-new/tools/pktlog/Android.mk |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 80 | else |
| 81 | DLKM_DIR := build/dlkm |
| 82 | endif |
| 83 | |
Jeff Johnson | da0c221 | 2014-01-03 12:06:27 -0800 | [diff] [blame] | 84 | # Some kernel include files are being moved. Check to see if |
| 85 | # the old version of the files are present |
| 86 | INCLUDE_SELECT := |
| 87 | ifneq ($(wildcard $(TOP)/kernel//arch/arm/mach-msm/include/mach/msm_smd.h),) |
| 88 | INCLUDE_SELECT += EXISTS_MSM_SMD=1 |
| 89 | endif |
| 90 | |
| 91 | ifneq ($(wildcard $(TOP)/kernel//arch/arm/mach-msm/include/mach/msm_smsm.h),) |
| 92 | INCLUDE_SELECT += EXISTS_MSM_SMSM=1 |
| 93 | endif |
| 94 | |
Gopichand Nakkala | 717dba7 | 2013-01-04 12:08:05 -0800 | [diff] [blame] | 95 | ifeq ($(WLAN_PROPRIETARY),1) |
| 96 | # For the proprietary driver the firmware files are handled here |
| 97 | include $(CLEAR_VARS) |
| 98 | LOCAL_MODULE := WCNSS_qcom_wlan_nv.bin |
| 99 | LOCAL_MODULE_TAGS := optional |
| 100 | LOCAL_MODULE_CLASS := ETC |
| 101 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/persist |
| 102 | LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) |
| 103 | include $(BUILD_PREBUILT) |
| 104 | |
| 105 | include $(CLEAR_VARS) |
| 106 | LOCAL_MODULE := WCNSS_cfg.dat |
| 107 | LOCAL_MODULE_TAGS := optional |
| 108 | LOCAL_MODULE_CLASS := ETC |
| 109 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/firmware/wlan/prima |
| 110 | LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) |
| 111 | include $(BUILD_PREBUILT) |
| 112 | |
| 113 | include $(CLEAR_VARS) |
| 114 | LOCAL_MODULE := WCNSS_qcom_cfg.ini |
| 115 | LOCAL_MODULE_TAGS := optional |
| 116 | LOCAL_MODULE_CLASS := ETC |
| 117 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/persist |
| 118 | LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) |
| 119 | include $(BUILD_PREBUILT) |
| 120 | |
| 121 | endif |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 122 | |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 123 | # Build wlan.ko as either prima_wlan.ko or pronto_wlan.ko |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 124 | ########################################################### |
| 125 | |
| 126 | # This is set once per LOCAL_PATH, not per (kernel) module |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 127 | KBUILD_OPTIONS := WLAN_ROOT=../$(WLAN_BLD_DIR)/prima |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 128 | # We are actually building wlan.ko here, as per the |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 129 | # requirement we are specifying <chipset>_wlan.ko as LOCAL_MODULE. |
| 130 | # This means we need to rename the module to <chipset>_wlan.ko |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 131 | # after wlan.ko is built. |
| 132 | KBUILD_OPTIONS += MODNAME=wlan |
| 133 | KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 134 | KBUILD_OPTIONS += $(WLAN_SELECT) |
Jeff Johnson | da0c221 | 2014-01-03 12:06:27 -0800 | [diff] [blame] | 135 | KBUILD_OPTIONS += $(INCLUDE_SELECT) |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 136 | |
| 137 | include $(CLEAR_VARS) |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 138 | LOCAL_MODULE := $(WLAN_CHIPSET)_wlan.ko |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 139 | LOCAL_MODULE_KBUILD_NAME := wlan.ko |
| 140 | LOCAL_MODULE_TAGS := debug |
| 141 | LOCAL_MODULE_DEBUG_ENABLE := true |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 142 | LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET) |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 143 | include $(DLKM_DIR)/AndroidKernelModule.mk |
| 144 | ########################################################### |
| 145 | |
| 146 | #Create symbolic link |
| 147 | $(shell mkdir -p $(TARGET_OUT)/lib/modules; \ |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 148 | ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko \ |
Jeff Johnson | 25abf4d | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 149 | $(TARGET_OUT)/lib/modules/wlan.ko) |
| 150 | |
Gopichand Nakkala | 717dba7 | 2013-01-04 12:08:05 -0800 | [diff] [blame] | 151 | ifeq ($(WLAN_PROPRIETARY),1) |
| 152 | $(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wlan/prima; \ |
| 153 | ln -sf /persist/WCNSS_qcom_wlan_nv.bin \ |
| 154 | $(TARGET_OUT_ETC)/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin; \ |
| 155 | ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \ |
| 156 | $(TARGET_OUT_ETC)/firmware/wlan/prima/WCNSS_qcom_cfg.ini) |
| 157 | endif |
| 158 | |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 159 | endif # DLKM check |
Nagender Telkar | bf4ce93 | 2012-12-12 13:20:58 -0800 | [diff] [blame] | 160 | |
Jeff Johnson | 91a420a | 2012-12-16 11:16:18 -0800 | [diff] [blame] | 161 | endif # supported target check |