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

Commit c001fcb8 authored by Tom Marshall's avatar Tom Marshall
Browse files

build: recovery: Support target specific resource selection

 * Allow resources matching the target screen width to override the
   default resources.
 * Allow overriding screen width for recovery.

Change-Id: I979b6e74cfd1fe66c798de02bcd908d22731494a
parent d8bcd441
Loading
Loading
Loading
Loading
+10 −1
Original line number Diff line number Diff line
@@ -680,14 +680,22 @@ ifneq ($(TARGET_PREBUILT_RECOVERY_KERNEL),)
else
  recovery_kernel := $(INSTALLED_KERNEL_TARGET) # same as a non-recovery system
endif
ifeq ($(TARGET_RECOVERY_SCREEN_WIDTH),)
ifeq ($(TARGET_SCREEN_WIDTH),)
TARGET_RECOVERY_SCREEN_WIDTH := 720
else
TARGET_RECOVERY_SCREEN_WIDTH := $(TARGET_SCREEN_WIDTH)
endif
endif
recovery_uncompressed_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.cpio
recovery_ramdisk := $(PRODUCT_OUT)/ramdisk-recovery.img
recovery_build_prop := $(INSTALLED_BUILD_PROP_TARGET)
recovery_binary := $(call intermediates-dir-for,EXECUTABLES,recovery)/recovery
recovery_resources_common := $(call project-path-for,recovery)/res
recovery_resources_extra := $(call project-path-for,recovery)/res-$(TARGET_RECOVERY_SCREEN_WIDTH)
recovery_resources_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/res))
recovery_root_private := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery/root))
recovery_resource_deps := $(shell find $(recovery_resources_common) \
recovery_resource_deps := $(shell find $(recovery_resources_common) $(recovery_resources_extra) \
  $(recovery_resources_private) $(recovery_root_private) -type f)
ifneq ($(TARGET_RECOVERY_FSTAB),)
  recovery_fstab := $(strip $(wildcard $(TARGET_RECOVERY_FSTAB)))
@@ -776,6 +784,7 @@ $(TARGET_RECOVERY_ROOT_TIMESTAMP): \
	$(hide) cp -f $(recovery_binary) $(TARGET_RECOVERY_ROOT_OUT)/sbin/
	mkdir -p $(TARGET_RECOVERY_ROOT_OUT)/system/bin
	$(hide) cp -rf $(recovery_resources_common) $(TARGET_RECOVERY_ROOT_OUT)/
	if test -d $(recovery_resources_extra); then cp -rf $(recovery_resources_extra)/* $(TARGET_RECOVERY_ROOT_OUT)/res; fi
	$(hide) $(foreach item,$(recovery_resources_private), \
	  cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/)
	$(foreach item,$(recovery_root_private), \