sm8250-common: gpt-utils: Update PTN_SWAP_LIST and handle multiimg(oem/qti)

* Update PTN_SWAP_LIST to reflect partition entry changes
   to BOOT LUN and handle "multiimgoem", "multiimgqti"
   partitions, similar to other BOOT LUN partitions.

Change-Id: I3fb2934c44f3c2555ef36437ae97c9a47bb874ed
Signed-off-by: Sandeep-FED <sandymankara11@gmail.com>
This commit is contained in:
Siddeswar Aluganti
2021-04-14 12:04:04 -07:00
committed by Sandeep P S
parent 53550a2c1b
commit 0b6bc1943b
2 changed files with 11 additions and 9 deletions

View File

@@ -244,11 +244,11 @@ static int gpt_boot_chain_swap(const uint8_t *pentries_start,
uint8_t *ptn_entry;
uint8_t *ptn_bak_entry;
uint8_t ptn_swap[PTN_ENTRY_SIZE];
//Skip the xbl partition on UFS devices. That is handled
//Skip the xbl, multiimgoem, multiimgqti partitions on UFS devices. That is handled
//seperately.
if (gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i],
PTN_XBL,
strlen(PTN_XBL)))
if ((gpt_utils_is_ufs_device() && !strncmp(ptn_swap_list[i],PTN_XBL,strlen(PTN_XBL)))
|| !strncmp(ptn_swap_list[i],PTN_MULTIIMGOEM,strlen(PTN_MULTIIMGOEM))
|| !strncmp(ptn_swap_list[i],PTN_MULTIIMGQTI,strlen(PTN_MULTIIMGQTI)))
continue;
ptn_entry = gpt_pentry_seek(ptn_swap_list[i], pentries_start,
@@ -1020,9 +1020,9 @@ int prepare_boot_update(enum boot_update_stage stage)
//of being loaded based on well known GUID'S.
//We take care of switching the UFS boot LUN
//explicitly later on.
if (!strncmp(ptn_swap_list[i],
PTN_XBL,
strlen(PTN_XBL)))
if (!strncmp(ptn_swap_list[i],PTN_XBL,strlen(PTN_XBL))
|| !strncmp(ptn_swap_list[i],PTN_MULTIIMGOEM,strlen(PTN_MULTIIMGOEM))
|| !strncmp(ptn_swap_list[i],PTN_MULTIIMGQTI,strlen(PTN_MULTIIMGQTI)))
continue;
snprintf(buf, sizeof(buf),
"%s/%sbak",