Skip to content

Commit

Permalink
z2_plus: Rewrite build-time symlinks creation
Browse files Browse the repository at this point in the history
  • Loading branch information
bgcngm authored and dmd79 committed Jan 14, 2017
1 parent 10c269b commit 5455825
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 98 deletions.
72 changes: 40 additions & 32 deletions Android.mk
Original file line number Diff line number Diff line change
Expand Up @@ -27,42 +27,12 @@
LOCAL_PATH := $(call my-dir)

ifeq ($(TARGET_DEVICE),z2_plus)

include $(call all-makefiles-under,$(LOCAL_PATH))

include $(CLEAR_VARS)

LOCAL_MODULE := wifi_symlinks
LOCAL_MODULE_TAGS := optional
LOCAL_MODULE_CLASS := FAKE
LOCAL_MODULE_SUFFIX := -timestamp

include $(BUILD_SYSTEM)/base_rules.mk

$(LOCAL_BUILT_MODULE): ACTUAL_INI_FILE := /system/etc/wifi/WCNSS_qcom_cfg.ini
$(LOCAL_BUILT_MODULE): WCNSS_INI_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini

$(LOCAL_BUILT_MODULE): ACTUAL_MAC_FILE := /persist/wlan_mac.bin
$(LOCAL_BUILT_MODULE): WCNSS_MAC_SYMLINK := $(TARGET_OUT)/etc/firmware/wlan/qca_cld/wlan_mac.bin


$(LOCAL_BUILT_MODULE): $(LOCAL_PATH)/Android.mk
$(LOCAL_BUILT_MODULE):
$(hide) echo "Making symlinks for wifi"
$(hide) mkdir -p $(dir $@)
$(hide) mkdir -p $(dir $(WCNSS_INI_SYMLINK))
$(hide) rm -rf $@
$(hide) rm -rf $(WCNSS_INI_SYMLINK)
$(hide) ln -sf $(ACTUAL_INI_FILE) $(WCNSS_INI_SYMLINK)
$(hide) rm -rf $(WCNSS_MAC_SYMLINK)
$(hide) ln -sf $(ACTUAL_MAC_FILE) $(WCNSS_MAC_SYMLINK)
$(hide) touch $@

include $(call all-makefiles-under,$(LOCAL_PATH))

IMS_LIBS := libimscamera_jni.so libimsmedia_jni.so

IMS_SYMLINKS := $(addprefix $(TARGET_OUT)/app/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
IMS_SYMLINKS := $(addprefix $(TARGET_OUT_VENDOR_APPS)/ims/lib/arm64/,$(notdir $(IMS_LIBS)))
$(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "IMS lib link: $@"
@mkdir -p $(dir $@)
Expand All @@ -71,6 +41,44 @@ $(IMS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)

ALL_DEFAULT_INSTALLED_MODULES += $(IMS_SYMLINKS)

include device/zuk/z2_plus/tftp.mk
RFS_MSM_ADSP_SYMLINKS := $(TARGET_OUT)/rfs/msm/adsp/
$(RFS_MSM_ADSP_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM ADSP folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly
$(hide) ln -sf /data/tombstones/lpass $@/ramdumps
$(hide) ln -sf /persist/rfs/msm/adsp $@/readwrite
$(hide) ln -sf /persist/rfs/shared $@/shared
$(hide) ln -sf /persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /firmware $@/readonly/firmware

RFS_MSM_MPSS_SYMLINKS := $(TARGET_OUT)/rfs/msm/mpss/
$(RFS_MSM_MPSS_SYMLINKS): $(LOCAL_INSTALLED_MODULE)
@echo "Creating RFS MSM MPSS folder structure: $@"
@rm -rf $@/*
@mkdir -p $(dir $@)/readonly
$(hide) ln -sf /data/tombstones/modem $@/ramdumps
$(hide) ln -sf /persist/rfs/msm/mpss $@/readwrite
$(hide) ln -sf /persist/rfs/shared $@/shared
$(hide) ln -sf /persist/hlos_rfs/shared $@/hlos
$(hide) ln -sf /firmware $@/readonly/firmware

ALL_DEFAULT_INSTALLED_MODULES += $(RFS_MSM_ADSP_SYMLINKS) $(RFS_MSM_MPSS_SYMLINKS)

WCNSS_INI_SYMLINK := $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/WCNSS_qcom_cfg.ini
$(WCNSS_INI_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS config ini link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /system/etc/wifi/$(notdir $@) $@

WCNSS_MAC_SYMLINK := $(TARGET_OUT_ETC)/firmware/wlan/qca_cld/wlan_mac.bin
$(WCNSS_MAC_SYMLINK): $(LOCAL_INSTALLED_MODULE)
@echo "WCNSS MAC bin link: $@"
@mkdir -p $(dir $@)
@rm -rf $@
$(hide) ln -sf /persist/$(notdir $@) $@

ALL_DEFAULT_INSTALLED_MODULES += $(WCNSS_INI_SYMLINK) $(WCNSS_MAC_SYMLINK)

endif
66 changes: 0 additions & 66 deletions tftp.mk

This file was deleted.

0 comments on commit 5455825

Please sign in to comment.