From b8292128dea8d5209757fdb2c6449b3432b938dd Mon Sep 17 00:00:00 2001 From: Vishal Mahaveer Date: Thu, 15 Sep 2016 17:18:59 -0400 Subject: wl12xx: fix build issue and align firmware extraction Current wl12xx firmware package installation is failing on Android N. Fix this by aligning it to match sgx and IPU firmware builds. Change-Id: Id78dafe8ee46073ca3aeccc17e36ce0b9b8287a7 Signed-off-by: Vishal Mahaveer --- wl12xx/Android.mk | 2 - wl12xx/wlan/Android.mk | 50 +++++----- wl12xx/wpan/Android.mk | 30 +++++- wl12xx/wpan/bluetooth/Android.mk | 107 --------------------- wl12xx/wpan/bluetooth/NOTICE | 1 - .../wpan/bluetooth/wl12xx-wpan-bt-fw-products.mk | 26 ----- wl12xx/wpan/wl12xx-wpan-fw-products.mk | 5 +- wl12xx/wpan/wpan.tgz | Bin 195338 -> 11651 bytes 8 files changed, 57 insertions(+), 164 deletions(-) delete mode 100644 wl12xx/wpan/bluetooth/Android.mk delete mode 120000 wl12xx/wpan/bluetooth/NOTICE delete mode 100644 wl12xx/wpan/bluetooth/wl12xx-wpan-bt-fw-products.mk diff --git a/wl12xx/Android.mk b/wl12xx/Android.mk index 7f2d146..b80341e 100644 --- a/wl12xx/Android.mk +++ b/wl12xx/Android.mk @@ -15,6 +15,4 @@ LOCAL_PATH := $(call my-dir) -TARGET_EXTRACTED_FW := $(PRODUCT_OUT)/extracted_firmwares - include $(call all-makefiles-under, $(LOCAL_PATH)) diff --git a/wl12xx/wlan/Android.mk b/wl12xx/wlan/Android.mk index fb1140e..0901df3 100644 --- a/wl12xx/wlan/Android.mk +++ b/wl12xx/wlan/Android.mk @@ -18,41 +18,43 @@ ifeq ($(strip $(BOARD_WLAN_DEVICE)),wl12xx_mac80211) TI_WILINK_FW_PATH := $(TARGET_OUT_ETC)/firmware/ti-connectivity -WLAN_FW_BINS := \ - wl18xx-fw-4.bin \ - wl18xx-conf.bin +ti-wl12xx-wlan.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-wl12xx-wlan.untarred) +ti-wl12xx-wlan.untarred_timestamp := $(ti-wl12xx-wlan.untarred_intermediates)/stamp -# path to FM fws (related to top dir) -FW_WLAN_PATH := $(TARGET_EXTRACTED_FW)/wlan - -# path related to current location -FW_WLAN_FULL_PATH := ../../../../../$(FW_WLAN_PATH) +$(ti-wl12xx-wlan.untarred_timestamp) : $(WLAN_TGZ) + @echo "Unzip $(dir $@) <- $<)" + $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@) + $(hide) tar -C $(dir $@) -zxf $< + $(hide) touch $@ include $(CLEAR_VARS) LOCAL_MODULE := wl18xx-fw-4.bin -LOCAL_SRC_FILES := $(FW_WLAN_FULL_PATH)/wl18xx-fw-4.bin -LOCAL_MODULE_CLASS := FIRMWARE +LOCAL_SRC_FILES := wl18xx-fw-4.bin +LOCAL_MODULE_CLASS := FAKE LOCAL_MODULE_PATH := $(TI_WILINK_FW_PATH) LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) + +include $(BUILD_SYSTEM)/base_rules.mk + +$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-wl12xx-wlan.untarred_intermediates)/wlan/wl18xx-fw-4.bin +$(LOCAL_BUILT_MODULE) : $(ti-wl12xx-wlan.untarred_timestamp) | $(ACP) + @echo "Copy $@ <- $(PRIVATE_SRC)" + @mkdir -p $(dir $@) + $(hide) $(ACP) -fp $(PRIVATE_SRC) $@ + include $(CLEAR_VARS) LOCAL_MODULE := wl18xx-conf.bin -LOCAL_SRC_FILES := $(FW_WLAN_FULL_PATH)/wl18xx-conf.bin -LOCAL_MODULE_CLASS := FIRMWARE +LOCAL_SRC_FILES := wl18xx-conf.bin +LOCAL_MODULE_CLASS := FAKE LOCAL_MODULE_PATH := $(TI_WILINK_FW_PATH) LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) -WLAN_FW_FILES := $(addprefix $(LOCAL_PATH)/$(FW_WLAN_FULL_PATH)/, $(WLAN_FW_BINS)) -.PHONY: $(WLAN_FW_FILES) -$(WLAN_FW_FILES): $(FW_WLAN_FULL_PATH) - $(hide) tar -C $(FW_WLAN_PATH) --strip-components=1 \ - -f $(WLAN_TGZ) -xzp wlan/$(notdir $@) +include $(BUILD_SYSTEM)/base_rules.mk -$(FW_WLAN_FULL_PATH): - $(hide) mkdir -p $(FW_WLAN_PATH) +$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-wl12xx-wlan.untarred_intermediates)/wlan/wl18xx-conf.bin +$(LOCAL_BUILT_MODULE) : $(ti-wl12xx-wlan.untarred_timestamp) | $(ACP) + @echo "Copy $@ <- $(PRIVATE_SRC)" + @mkdir -p $(dir $@) + $(hide) $(ACP) -fp $(PRIVATE_SRC) $@ endif - diff --git a/wl12xx/wpan/Android.mk b/wl12xx/wpan/Android.mk index a47f6c0..47de12a 100644 --- a/wl12xx/wpan/Android.mk +++ b/wl12xx/wpan/Android.mk @@ -15,6 +15,32 @@ LOCAL_PATH := $(call my-dir) -WPAN_TGZ := device/ti/proprietary-open/wl12xx/wpan/wpan.tgz +ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_TI)),true) -include $(call all-makefiles-under, $(LOCAL_PATH)) +TI_WILINK_BT_FW_PATH := $(TARGET_OUT_ETC)/firmware + +ti-wl12xx-wpan.untarred_intermediates := $(call intermediates-dir-for, FAKE, ti-wl12xx-wpan.untarred) +ti-wl12xx-wpan.untarred_timestamp := $(ti-wl12xx-wpan.untarred_intermediates)/stamp + +$(ti-wl12xx-wpan.untarred_timestamp) : $(WPAN_TGZ) + @echo "Unzip $(dir $@) <- $<)" + $(hide) rm -rf $(dir $@) && mkdir -p $(dir $@) + $(hide) tar -C $(dir $@) -zxf $< + $(hide) touch $@ + +include $(CLEAR_VARS) +LOCAL_MODULE := TIInit_12.10.28.bts +LOCAL_SRC_FILES := TIInit_12.10.28.bts +LOCAL_MODULE_CLASS := FAKE +LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) +LOCAL_MODULE_TAGS := optional + +include $(BUILD_SYSTEM)/base_rules.mk + +$(LOCAL_BUILT_MODULE) : PRIVATE_SRC := $(ti-wl12xx-wpan.untarred_intermediates)/wpan/bluetooth/TIInit_12.10.28.bts +$(LOCAL_BUILT_MODULE) : $(ti-wl12xx-wpan.untarred_timestamp) | $(ACP) + @echo "Copy $@ <- $(PRIVATE_SRC)" + @mkdir -p $(dir $@) + $(hide) $(ACP) -fp $(PRIVATE_SRC) $@ + +endif diff --git a/wl12xx/wpan/bluetooth/Android.mk b/wl12xx/wpan/bluetooth/Android.mk deleted file mode 100644 index c991578..0000000 --- a/wl12xx/wpan/bluetooth/Android.mk +++ /dev/null @@ -1,107 +0,0 @@ -# Copyright (C) 2013 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -LOCAL_PATH := $(call my-dir) - -ifeq ($(strip $(BOARD_HAVE_BLUETOOTH_TI)),true) - -TI_WILINK_BT_FW_PATH := $(TARGET_OUT_ETC)/firmware - -WPAN_BT_FW_BINS := \ - TIInit_7.2.31.bts \ - TIInit_7.6.15.bts \ - TIInit_10.6.15.bts \ - TIInit_11.8.32.bts \ - TIInit_12.7.27.bts \ - TIInit_12.8.32.bts \ - TIInit_12.10.28.bts - -# path to BT fws (related to top dir) -FW_BT_PATH := $(TARGET_EXTRACTED_FW)/bt - -# path related to current location -FW_BT_FULL_PATH := ../../../../../../$(FW_BT_PATH) - -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_7.2.31.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_7.2.31.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_7.6.15.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_7.6.15.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_10.6.15.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_10.6.15.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_11.8.32.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_11.8.32.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_12.7.27.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_12.7.27.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_12.8.32.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_12.8.32.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) - -include $(CLEAR_VARS) -LOCAL_MODULE := TIInit_12.10.28.bts -LOCAL_SRC_FILES := $(FW_BT_FULL_PATH)/TIInit_12.10.28.bts -LOCAL_MODULE_CLASS := FIRMWARE -LOCAL_MODULE_PATH := $(TI_WILINK_BT_FW_PATH) -LOCAL_MODULE_TAGS := optional -LOCAL_MODULE_OWNER := ti -include $(BUILD_PREBUILT) - -WPAN_BT_FW_FILES := $(addprefix $(LOCAL_PATH)/$(FW_BT_FULL_PATH)/, $(WPAN_BT_FW_BINS)) -.PHONY: $(WPAN_BT_FW_FILES) -$(WPAN_BT_FW_FILES): $(FW_BT_FULL_PATH) - $(hide) tar -C $(FW_BT_PATH) --strip-components=2 \ - -f $(WPAN_TGZ) -xzp wpan/bluetooth/$(notdir $@) - -$(FW_BT_FULL_PATH): - $(hide) mkdir -p $(FW_BT_PATH) - -endif diff --git a/wl12xx/wpan/bluetooth/NOTICE b/wl12xx/wpan/bluetooth/NOTICE deleted file mode 120000 index 8df64fe..0000000 --- a/wl12xx/wpan/bluetooth/NOTICE +++ /dev/null @@ -1 +0,0 @@ -../License_for_WPAN_Binary_Images.txt \ No newline at end of file diff --git a/wl12xx/wpan/bluetooth/wl12xx-wpan-bt-fw-products.mk b/wl12xx/wpan/bluetooth/wl12xx-wpan-bt-fw-products.mk deleted file mode 100644 index 56e62e8..0000000 --- a/wl12xx/wpan/bluetooth/wl12xx-wpan-bt-fw-products.mk +++ /dev/null @@ -1,26 +0,0 @@ -# Copyright (C) 2013 The Android Open Source Project -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. -# - -# Add Bluetooth firmware - -PRODUCT_PACKAGES += \ - TIInit_7.2.31.bts \ - TIInit_7.6.15.bts \ - TIInit_10.6.15.bts \ - TIInit_11.8.32.bts \ - TIInit_12.7.27.bts \ - TIInit_12.8.32.bts \ - TIInit_12.10.28.bts - diff --git a/wl12xx/wpan/wl12xx-wpan-fw-products.mk b/wl12xx/wpan/wl12xx-wpan-fw-products.mk index 6009392..a04600c 100644 --- a/wl12xx/wpan/wl12xx-wpan-fw-products.mk +++ b/wl12xx/wpan/wl12xx-wpan-fw-products.mk @@ -13,6 +13,7 @@ # limitations under the License. # -WPAN_FW_TOP := device/ti/proprietary-open/wl12xx/wpan +WPAN_TGZ := device/ti/proprietary-open/wl12xx/wpan/wpan.tgz -$(call inherit-product, $(WPAN_FW_TOP)/bluetooth/wl12xx-wpan-bt-fw-products.mk) +PRODUCT_PACKAGES += \ + TIInit_12.10.28.bts diff --git a/wl12xx/wpan/wpan.tgz b/wl12xx/wpan/wpan.tgz index 0baa29c..632e28a 100644 Binary files a/wl12xx/wpan/wpan.tgz and b/wl12xx/wpan/wpan.tgz differ -- cgit v1.2.3