storage: Fix expanding partitions on GPT partition tables
GPT scheme has two mostly identical partition table headers. One at the beginning of the disk and one at the end. When an image is written to larger disk, the second header is not at the end of the disk. Fix that by moving second partition to end of the disk before attempting partition
Tests:
-
Unit tests run as root work.
-
On A64-OLinuXino board, boot with eMMC and UEFI image. The partition does not expand on initial setup. Trying to manually expand in storage app fails. Apply patch. Manual expansion works.
Signed-off-by: Sunil Mohan Adapa sunil@medhas.org