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

Unverified Commit 5dd69711 authored by Tom Marshall's avatar Tom Marshall Committed by Michael Bestas
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 59155ba6
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -901,6 +901,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

ifndef TARGET_PRIVATE_RES_DIRS
TARGET_PRIVATE_RES_DIRS := $(wildcard $(TARGET_DEVICE_DIR)/recovery/res)
endif
@@ -1002,6 +1012,8 @@ define build-recoveryimage-target
  $(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,$(TARGET_PRIVATE_RES_DIRS), \
    cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/$(newline))
  $(hide) $(foreach item,$(recovery_fstab), \
@@ -1059,7 +1071,7 @@ $(INSTALLED_RECOVERYIMAGE_TARGET): $(MKBOOTFS) $(MKBOOTIMG) $(MINIGZIP) \
		$(INTERNAL_RECOVERYIMAGE_FILES) \
		$(recovery_initrc) $(recovery_sepolicy) $(recovery_kernel) \
		$(INSTALLED_2NDBOOTLOADER_TARGET) \
		$(recovery_build_prop) $(recovery_resource_deps) \
		$(recovery_build_prop) $(recovery_resource_deps) $(recovery_root_deps) \
		$(recovery_fstab) \
		$(RECOVERY_INSTALL_OTA_KEYS)
		$(call build-recoveryimage-target, $@)