-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge tag 'LA.UM.8.6.2.r1-08100-89xx.0' of https://source.codeaurora.…
…org/quic/la/platform/vendor/qcom-opensource/wlan/prima into Q "LA.UM.8.6.2.r1-08100-89xx.0"
- Loading branch information
Showing
18 changed files
with
535 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,167 @@ | ||
# Android makefile for the WLAN Module | ||
|
||
# Assume no targets will be supported | ||
WLAN_CHIPSET := | ||
|
||
# Build/Package options for 8960 target | ||
ifeq ($(TARGET_BOARD_PLATFORM),msm8960) | ||
WLAN_CHIPSET := prima | ||
WLAN_SELECT := CONFIG_PRIMA_WLAN=m | ||
endif | ||
|
||
# Build/Package options for 8916, 8974, 8226, 8610, 8909, 8952, 8937, 8953 targets | ||
ifneq (,$(filter msm8916 msm8974 msm8226 msm8610 msm8909 msm8952 msm8937 msm8953 titanium,$(TARGET_BOARD_PLATFORM))) | ||
ifneq ($(TARGET_SUPPORTS_ANDROID_WEAR_KERNEL_4_14),true) | ||
WLAN_CHIPSET := pronto | ||
WLAN_SELECT := CONFIG_PRONTO_WLAN=m | ||
endif | ||
endif | ||
|
||
# Build/Package only in case of supported target | ||
ifneq ($(WLAN_CHIPSET),) | ||
|
||
LOCAL_PATH := $(call my-dir) | ||
|
||
ifeq ($(TARGET_SUPPORTS_WEARABLES),true) | ||
ifneq ($(findstring device,$(LOCAL_PATH)),) | ||
WLAN_DLKM := 1 | ||
else | ||
ifneq ($(findstring vendor,$(LOCAL_PATH)),) | ||
WLAN_DLKM := 1 | ||
else | ||
WLAN_DLKM := 0 | ||
endif # findstring device | ||
endif | ||
else | ||
ifneq ($(findstring vendor,$(LOCAL_PATH)),) | ||
WLAN_DLKM := 1 | ||
else | ||
WLAN_DLKM := 0 | ||
endif # findstring vendor | ||
endif # TARGET_SUPPORTS_WEARABLES | ||
|
||
# This makefile is only for DLKM | ||
ifeq ($(WLAN_DLKM),1) | ||
|
||
# Determine if we are Proprietary or Open Source | ||
ifneq ($(findstring opensource,$(LOCAL_PATH)),) | ||
WLAN_PROPRIETARY := 0 | ||
else | ||
WLAN_PROPRIETARY := 1 | ||
endif | ||
|
||
# DLKM_DIR was moved for JELLY_BEAN (PLATFORM_SDK 16) | ||
ifeq (1,$(filter 1,$(shell echo "$$(( $(PLATFORM_SDK_VERSION) >= 16 ))" ))) | ||
ifneq ($(TARGET_SUPPORTS_WEARABLES),true) | ||
DLKM_DIR := $(TOP)/device/qcom/common/dlkm | ||
else | ||
DLKM_DIR := $(BOARD_DLKM_DIR) | ||
endif | ||
else | ||
DLKM_DIR := build/dlkm | ||
endif | ||
|
||
# Copy WCNSS_cfg.dat file from firmware_bin/ folder to target out directory. | ||
ifeq ($(WLAN_PROPRIETARY),0) | ||
|
||
$(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wlan/prima) | ||
$(shell rm -f $(TARGET_OUT_ETC)/firmware/wlan/prima/WCNSS_cfg.dat) | ||
$(shell cp $(LOCAL_PATH)/firmware_bin/WCNSS_cfg.dat $(TARGET_OUT_ETC)/firmware/wlan/prima) | ||
|
||
else | ||
|
||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := WCNSS_qcom_wlan_nv.bin | ||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE_CLASS := ETC | ||
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/persist | ||
LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) | ||
include $(BUILD_PREBUILT) | ||
|
||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := WCNSS_cfg.dat | ||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE_CLASS := ETC | ||
LOCAL_MODULE_PATH := $(TARGET_OUT_ETC)/firmware/wlan/prima | ||
LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) | ||
include $(BUILD_PREBUILT) | ||
|
||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := WCNSS_qcom_cfg.ini | ||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE_CLASS := ETC | ||
LOCAL_MODULE_PATH := $(PRODUCT_OUT)/persist | ||
LOCAL_SRC_FILES := firmware_bin/$(LOCAL_MODULE) | ||
include $(BUILD_PREBUILT) | ||
|
||
endif | ||
|
||
ifeq ($(TARGET_KERNEL_VERSION),) | ||
$(info "WLAN: TARGET_KERNEL_VERSION is not defined, assuming default") | ||
TARGET_KERNEL_SOURCE := kernel | ||
KERNEL_TO_BUILD_ROOT_OFFSET := ../ | ||
endif | ||
|
||
ifeq ($(KERNEL_TO_BUILD_ROOT_OFFSET),) | ||
$(info "WLAN: KERNEL_TO_BUILD_ROOT_OFFSET is not defined, assuming default") | ||
KERNEL_TO_BUILD_ROOT_OFFSET := ../ | ||
endif | ||
|
||
# Build wlan.ko as either prima_wlan.ko or pronto_wlan.ko | ||
########################################################### | ||
|
||
# This is set once per LOCAL_PATH, not per (kernel) module | ||
|
||
ifeq ($(KBUILD_OPTIONS),) | ||
KBUILD_OPTIONS += WLAN_PROPRIETARY=$(WLAN_PROPRIETARY) | ||
KBUILD_OPTIONS += TARGET_SUPPORTS_WEARABLES=$(TARGET_SUPPORTS_WEARABLES) | ||
KBUILD_OPTIONS += KERNEL_TO_BUILD_ROOT_OFFSET=$(KERNEL_TO_BUILD_ROOT_OFFSET) | ||
endif | ||
|
||
# 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 | ||
# after wlan.ko is built. | ||
KBUILD_OPTIONS += MODNAME=wlan | ||
KBUILD_OPTIONS += BOARD_PLATFORM=$(TARGET_BOARD_PLATFORM) | ||
KBUILD_OPTIONS += $(WLAN_SELECT) | ||
|
||
|
||
ifeq ($(KERNEL_TO_BUILD_ROOT_OFFSET),../../) | ||
VERSION=$(shell grep -w "VERSION =" $(TOP)/kernel/msm-$(TARGET_KERNEL_VERSION)/Makefile | sed 's/^VERSION = //' ) | ||
PATCHLEVEL=$(shell grep -w "PATCHLEVEL =" $(TOP)/kernel/msm-$(TARGET_KERNEL_VERSION)/Makefile | sed 's/^PATCHLEVEL = //' ) | ||
else | ||
VERSION=$(shell grep -w "VERSION =" $(TOP)/kernel/Makefile | sed 's/^VERSION = //' ) | ||
PATCHLEVEL=$(shell grep -w "PATCHLEVEL =" $(TOP)/kernel/Makefile | sed 's/^PATCHLEVEL = //' ) | ||
endif | ||
|
||
include $(CLEAR_VARS) | ||
LOCAL_MODULE := $(WLAN_CHIPSET)_wlan.ko | ||
LOCAL_MODULE_KBUILD_NAME := wlan.ko | ||
LOCAL_MODULE_TAGS := optional | ||
LOCAL_MODULE_DEBUG_ENABLE := true | ||
ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED), true) | ||
ifeq ($(WIFI_DRIVER_INSTALL_TO_KERNEL_OUT),true) | ||
LOCAL_MODULE_PATH := $(KERNEL_MODULES_OUT) | ||
else | ||
LOCAL_MODULE_PATH := $(TARGET_OUT_VENDOR)/lib/modules/$(WLAN_CHIPSET) | ||
endif | ||
else | ||
LOCAL_MODULE_PATH := $(TARGET_OUT)/lib/modules/$(WLAN_CHIPSET) | ||
endif # PRODUCT_VENDOR_MOVE_ENABLED | ||
include $(DLKM_DIR)/AndroidKernelModule.mk | ||
########################################################### | ||
|
||
#Create symbolic link | ||
ifeq ($(PRODUCT_VENDOR_MOVE_ENABLED), true) | ||
$(shell mkdir -p $(TARGET_OUT_VENDOR)/lib/modules; \ | ||
ln -sf /$(TARGET_COPY_OUT_VENDOR)/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko \ | ||
$(TARGET_OUT_VENDOR)/lib/modules/wlan.ko) | ||
else | ||
$(shell mkdir -p $(TARGET_OUT)/lib/modules; \ | ||
ln -sf /system/lib/modules/$(WLAN_CHIPSET)/$(WLAN_CHIPSET)_wlan.ko \ | ||
$(TARGET_OUT)/lib/modules/wlan.ko) | ||
endif # PRODUCT_VENDOR_MOVE_ENABLED | ||
endif # DLKM check | ||
|
||
endif # supported target check |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.