Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 71e386e2 authored by Tom Marshall's avatar Tom Marshall Committed by Steve Kondik
Browse files

build: recovery: Support adding device-specific items

(cdesai): Also add the relevant parts from koush's
commit 7fd5a89d
"Add initial support for charge mode. also support recovery/root in the device tree to easily copy props into recovery images."

Change-Id: I25205e68282680932917016646dabd1abadbfce6
parent 0a52520c
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -818,6 +818,16 @@ else
recovery_font := $(call include-path-for, recovery)/fonts/12x22.png
endif

ifneq ($(TARGET_RECOVERY_DEVICE_DIRS),)
recovery_root_private := $(strip \
  $(foreach d,$(TARGET_RECOVERY_DEVICE_DIRS), $(wildcard $(d)/recovery/root)))
else
recovery_root_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/root))
endif
ifneq ($(recovery_root_private),)
recovery_root_deps := $(shell find $(recovery_root_private) -type f)
endif

recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
  $(recovery_resources_private) -type f)
@@ -892,7 +902,7 @@ $(recovery_ramdisk): $(MKBOOTFS) $(MINIGZIP) $(RECOVERYIMAGE_EXTRA_DEPS) \
		$(recovery_binary) \
		$(recovery_initrc) $(recovery_sepolicy) \
		$(INSTALLED_2NDBOOTLOADER_TARGET) \
		$(recovery_build_prop) $(recovery_resource_deps) \
		$(recovery_build_prop) $(recovery_resource_deps) $(recovery_root_deps) \
		$(recovery_fstab) \
		$(RECOVERY_INSTALL_OTA_KEYS)
	@echo -e ${CL_CYN}"----- Making recovery image ------"${CL_RST}
@@ -911,6 +921,8 @@ $(recovery_ramdisk): $(MKBOOTFS) $(MINIGZIP) $(RECOVERYIMAGE_EXTRA_DEPS) \
	$(hide) rm -rf $(TARGET_RECOVERY_ROOT_OUT)/res/*
	$(hide) cp -rf $(recovery_resources_common)/* $(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)/)
	$(hide) $(foreach item,$(recovery_resources_private), \
	  cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
	$(hide) $(foreach item,$(recovery_fstab), \