From a062c7e62dbd6d5f9b5e87cb0497a7be29b14d45 Mon Sep 17 00:00:00 2001 From: Tao Bao Date: Tue, 31 May 2016 23:56:23 -0700 Subject: [PATCH] Add support for TARGET_RECOVERY_BRICK. TARGET_RECOVERY_BRICK specifies the file that lists all the partitions to be bricked under recovery. The file, if present, will be copied to '$(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick'. Bug: 27253717 Change-Id: Id84195b5ee1031a83bf7a077be070a3728416580 (cherry picked from commit 3051f4f11aef75af1d7cf623506ad6b4b648f3bd) --- core/Makefile | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/core/Makefile b/core/Makefile index 83a008c30..79a0dc364 100644 --- a/core/Makefile +++ b/core/Makefile @@ -921,6 +921,11 @@ recovery_fstab := $(TARGET_RECOVERY_FSTAB) else recovery_fstab := $(strip $(wildcard $(TARGET_DEVICE_DIR)/recovery.fstab)) endif +ifdef TARGET_RECOVERY_BRICK +recovery_brick := $(TARGET_RECOVERY_BRICK) +else +recovery_brick := +endif # Prior to A/B update, we used to have: # boot.img + recovery-from-boot.p + recovery-resource.dat = recovery.img. @@ -1006,6 +1011,8 @@ define build-recoveryimage-target cp -rf $(item) $(TARGET_RECOVERY_ROOT_OUT)/$(newline)) $(hide) $(foreach item,$(recovery_fstab), \ cp -f $(item) $(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.fstab) + $(if $(strip $(recovery_brick)), \ + $(hide) cp -f $(recovery_brick) $(TARGET_RECOVERY_ROOT_OUT)/etc/recovery.brick) $(hide) cp $(RECOVERY_INSTALL_OTA_KEYS) $(TARGET_RECOVERY_ROOT_OUT)/res/keys $(hide) cat $(INSTALLED_DEFAULT_PROP_TARGET) $(recovery_build_prop) \ > $(TARGET_RECOVERY_ROOT_OUT)/default.prop -- 2.11.0