Jeff Johnson | 9f706b6 | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 1 | # Android makefile for the WLAN WCNSS/Prima Module |
| 2 | |
| 3 | # Build/Package only in case of 8960 target |
Nagender Telkar | 3d40631 | 2012-12-12 13:20:58 -0800 | [diff] [blame^] | 4 | ifeq ($(call is-board-platform,msm8960),true) |
Jeff Johnson | 9f706b6 | 2012-12-01 12:42:42 -0800 | [diff] [blame] | 5 | |
| 6 | LOCAL_PATH := $(call my-dir) |
| 7 | |
| 8 | # This makefile is only for DLKM |
| 9 | ifneq ($(findstring vendor,$(LOCAL_PATH)),) |
| 10 | |
| 11 | # Determine if we are Proprietary or Open Source |
| 12 | ifneq ($(findstring opensource,$(LOCAL_PATH)),) |
| 13 | WLAN_PROPRIETARY := 0 |
| 14 | else |
| 15 | WLAN_PROPRIETARY := 1 |
| 16 | endif |
| 17 | |
| 18 | ifeq ($(WLAN_PROPRIETARY),1) |
| 19 | WLAN_BLD_DIR := vendor/qcom/proprietary/wlan |
| 20 | else |
| 21 | WLAN_BLD_DIR := vendor/qcom/opensource/wlan |
| 22 | endif |
| 23 | |
| 24 | ifeq ($(call is-android-codename,JELLY_BEAN),true) |
| 25 | DLKM_DIR := $(TOP)/device/qcom/common/dlkm |
| 26 | else |
| 27 | DLKM_DIR := build/dlkm |
| 28 | endif |
| 29 | |
| 30 | ifeq ($(WLAN_PROPRIETARY),1) |
| 31 | # For the proprietary driver the firmware files are handled here |
| 32 | include $(CLEAR_VARS) |
| 33 | LOCAL_MODULE := WCNSS_qcom_wlan_nv.bin |
| 34 | LOCAL_MODULE_TAGS := optional |
| 35 | LOCAL_MODULE_CLASS := ETC |
| 36 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/persist |
| 37 | LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) |
| 38 | include $(BUILD_PREBUILT) |
| 39 | |
| 40 | include $(CLEAR_VARS) |
| 41 | LOCAL_MODULE := WCNSS_cfg.dat |
| 42 | LOCAL_MODULE_TAGS := optional |
| 43 | LOCAL_MODULE_CLASS := ETC |
| 44 | LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/firmware/wlan/prima |
| 45 | LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) |
| 46 | include $(BUILD_PREBUILT) |
| 47 | |
| 48 | include $(CLEAR_VARS) |
| 49 | LOCAL_MODULE := WCNSS_qcom_cfg.ini |
| 50 | LOCAL_MODULE_TAGS := optional |
| 51 | LOCAL_MODULE_CLASS := ETC |
| 52 | LOCAL_MODULE_PATH := $(PRODUCT_OUT)/persist |
| 53 | LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) |
| 54 | include $(BUILD_PREBUILT) |
| 55 | |
| 56 | endif |
| 57 | |
| 58 | # Build prima_wlan.ko |
| 59 | ########################################################### |
| 60 | |
| 61 | # This is set once per LOCAL_PATH, not per (kernel) module |
| 62 | KBUILD_OPTIONS := WLAN_PRIMA=../$(WLAN_BLD_DIR)/prima |
| 63 | # We are actually building wlan.ko here, as per the |
| 64 | # requirement we are specifying prima_wlan.ko as LOCAL_MODULE. |
| 65 | # This means we need to rename the module to prima_wlan.ko |
| 66 | # after wlan.ko is built. |
| 67 | KBUILD_OPTIONS += MODNAME=wlan |
| 68 | KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) |
| 69 | |
| 70 | include $(CLEAR_VARS) |
| 71 | LOCAL_MODULE := prima_wlan.ko |
| 72 | LOCAL_MODULE_KBUILD_NAME := wlan.ko |
| 73 | LOCAL_MODULE_TAGS := debug |
| 74 | LOCAL_MODULE_DEBUG_ENABLE := true |
| 75 | LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/prima |
| 76 | include $(DLKM_DIR)/AndroidKernelModule.mk |
| 77 | ########################################################### |
| 78 | |
| 79 | #Create symbolic link |
| 80 | $(shell mkdir -p $(TARGET_OUT)/lib/modules; \ |
| 81 | ln -sf /system/lib/modules/prima/prima_wlan.ko \ |
| 82 | $(TARGET_OUT)/lib/modules/wlan.ko) |
| 83 | |
| 84 | ifeq ($(WLAN_PROPRIETARY),1) |
| 85 | $(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wlan/prima; \ |
| 86 | ln -sf /persist/WCNSS_qcom_wlan_nv.bin \ |
| 87 | $(TARGET_OUT_ETC)/firmware/wlan/prima/WCNSS_qcom_wlan_nv.bin; \ |
| 88 | ln -sf /data/misc/wifi/WCNSS_qcom_cfg.ini \ |
| 89 | $(TARGET_OUT_ETC)/firmware/wlan/prima/WCNSS_qcom_cfg.ini) |
| 90 | endif |
| 91 | endif |
Nagender Telkar | 3d40631 | 2012-12-12 13:20:58 -0800 | [diff] [blame^] | 92 | |
| 93 | endif # 8960 target check |