summaryrefslogtreecommitdiffstats
path: root/core/Makefile
diff options
context:
space:
mode:
authorTom Marshall <tdm@cyngn.com>2015-12-02 11:23:53 -0800
committerTom Marshall <tdm@cyngn.com>2015-12-02 11:28:38 -0800
commit2562446eceed99ee48de2e96468a100499066678 (patch)
tree431ef4d37d69a5114443123722b36eac28d738f0 /core/Makefile
parentba2f19309d6a7473b67188294b6371bec0a6f4c0 (diff)
downloadbuild-2562446eceed99ee48de2e96468a100499066678.zip
build-2562446eceed99ee48de2e96468a100499066678.tar.gz
build-2562446eceed99ee48de2e96468a100499066678.tar.bz2
build: recovery: Support extra recovery resources
If set, RECOVERY_EXTRA_RESOURCE_DIR will override default resources. Device specific private directories in TARGET_DEVICE_DIR and TARGET_RECOVERY_DEVICE_DIRS will continue to override both of these. Change-Id: I9e5a2210ffe53483173056f3dc4b17fe669509e7
Diffstat (limited to 'core/Makefile')
-rw-r--r--core/Makefile11
1 files changed, 10 insertions, 1 deletions
diff --git a/core/Makefile b/core/Makefile
index 61ab5bb..03c3be3 100644
--- a/core/Makefile
+++ b/core/Makefile
@@ -864,6 +864,11 @@ else
recovery_resources_common := $(recovery_resources_common)-xhdpi
endif
+ifneq (,$(RECOVERY_EXTRA_RESOURCE_DIR))
+recovery_resources_extra := $(strip \
+ $(wildcard $(RECOVERY_EXTRA_RESOURCE_DIR)/res-$(recovery_density)))
+endif
+
# Select the 18x32 font on high-density devices (xhdpi and up); and
# the 12x22 font on other devices. Note that the font selected here
# can be overridden for a particular device by putting a font.png in
@@ -887,7 +892,9 @@ endif
recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
- $(recovery_resources_private) -type f)
+ $(recovery_resources_extra) $(recovery_resources_private) -type f)
+
+
ifdef TARGET_RECOVERY_FSTAB
recovery_fstab := $(TARGET_RECOVERY_FSTAB)
else
@@ -975,6 +982,8 @@ define build-recoveryimage-target
$(hide) mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/res
$(hide) rm -rf $(TARGET_RECOVERY_ROOT_OUT)/res/*
$(hide) cp -rf $(recovery_resources_common)/* $(TARGET_RECOVERY_ROOT_OUT)/res
+ $(hide) $(foreach item,$(recovery_resources_extra), \
+ cp -rf $(item)/* $(TARGET_RECOVERY_ROOT_OUT)/res;)
$(hide) cp -f $(recovery_font) $(TARGET_RECOVERY_ROOT_OUT)/res/images/font.png
$(hide) $(foreach item,$(recovery_root_private), \
cp -rf $(item) $(TARGET_RECOVERY_OUT)/;)