RMX3031: Remove oplus logical partitions when necessary

Usually when building full OTAs for dynamic partition devices the whole partition table is removed and recreated, but in vendorless cases lineageos (and basically any other custom rom) has a patch to disable that functionality and
instead just resize the partitions. This, however, breaks the flashing if a new partition is added, because that partition is tried to be resized and, since it doesn't exist, the assert fails. This patch adds another dynamic patch
list to remove Oplus partitions or gracefully fail if it already removed (no assert).

Signed-off-by: Kuba Wojciechowski <nullbytepl@gmail.com>
Signed-off-by: Himanshu Tyagi <himanshut567@gmail.com>
Change-Id: If7051a6b3650d014625c1a4996f14889a7d0aac7
This commit is contained in:
Kuba Wojciechowski
2022-12-21 10:01:26 +05:30
committed by Himanshu Tyagi
parent 020d343e2e
commit dda4d679cf
3 changed files with 34 additions and 0 deletions

View File

@@ -18,6 +18,8 @@ LOCAL_PATH := $(call my-dir)
ifeq ($(TARGET_DEVICE),RMX3031)
$(call add-radio-file,configs/dynamic-remove-oplus)
subdir_makefiles=$(call first-makefiles-under,$(LOCAL_PATH))
$(foreach mk,$(subdir_makefiles),$(info including $(mk) ...)$(eval include $(mk)))