Stop using to create the wlan_mac.bin symlink
am: 2991d63044
* commit '2991d630441f30229f1993686ce9927ea85f083d':
Stop using $(shell) to create the wlan_mac.bin symlink
diff --git a/Android.mk b/Android.mk
index 616b54d..9e3b3e8 100644
--- a/Android.mk
+++ b/Android.mk
@@ -23,14 +23,17 @@
# *not* include it on all devices, so it is safe even with hardware-specific
# components.
-ifneq ($(filter bullhead, $(TARGET_DEVICE)),)
-
LOCAL_PATH := $(call my-dir)
-include $(call all-makefiles-under,$(LOCAL_PATH))
+include $(CLEAR_VARS)
+LOCAL_MODULE := bullhead_wlan_mac
+wlan_mac_path := $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin
+LOCAL_POST_INSTALL_CMD := $(hide) mkdir -p $(dir $(wlan_mac_path)) && ln -sf /persist/wlan_mac.bin $(wlan_mac_path)
+wlan_mac_path :=
+include $(BUILD_PHONY_PACKAGE)
-# Read WiFi MAC Address from persist partition
-$(shell mkdir -p $(TARGET_OUT_ETC)/firmware/wlan/qca_cld ; \
- ln -sf /persist/wlan_mac.bin $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin)
+ifneq ($(filter bullhead, $(TARGET_DEVICE)),)
+
+include $(call all-makefiles-under,$(LOCAL_PATH))
endif
diff --git a/device.mk b/device.mk
index c2e9e7c..91541f9 100644
--- a/device.mk
+++ b/device.mk
@@ -232,6 +232,10 @@
PRODUCT_PACKAGES += \
fs_config_files
+# For wlan_mac.bin symlink
+PRODUCT_PACKAGES += \
+ bullhead_wlan_mac
+
DEVICE_PACKAGE_OVERLAYS := \
device/lge/bullhead/overlay