MA-18422 Locate the misc partition by name
authorJi Luo <ji.luo@nxp.com>
Wed, 16 Dec 2020 13:07:13 +0000 (21:07 +0800)
committerJi Luo <ji.luo@nxp.com>
Thu, 13 May 2021 01:49:19 +0000 (09:49 +0800)
commit945bde8da972c30b87027b43a42b21035707fea7
treed9226c1feb2bf266be28ba60d037a8f365776fe8
parent9cef720d338cd24edcf59d957543a5ff82eef4ac
MA-18422 Locate the misc partition by name

Locating the misc partition by ID can help reduce the boot
time but error may happen if the ID of the misc partition
is changed. Moving the misc partition to the start of the
GPT and locate the partition by name is another option but
it will break the backward compatibility as the GPT is
changed.

part_get_info_by_name() will loop the PTE and return the
matched partition info, but it will cost much time as it
will reload the whole PTE from storage in each loop.

This commit provides part_get_info_efi_by_name() to support
return the partition info by name without reloading the whole
PTE.

Test: A/B slot switch in dual bootloader.

Change-Id: I13cb2a7b3217f73aecc2aec6e06abc0d6e8abcdd
Signed-off-by: Ji Luo <ji.luo@nxp.com>
(cherry picked from commit cd8f603f0d977ed73f0d0b44437c5c68fcebde25)
(cherry picked from commit d9972736dc0272377f89ccf528e8a873199c7903)
disk/part_efi.c
include/part.h
lib/avb/fsl/fsl_bootctrl.c