[PATCH 0/6] cmd: gpt: GPT manipulation improvements

Joshua Watt jpewhacker at gmail.com
Tue Aug 15 18:26:54 CEST 2023


Adds several improvements and additions to the gpt command processing,
specifically (although not exclusively) for the purpose of supporting
"ping-pong" booting when doing A/B boot partitions with u-boot itself.

In this mechanism, u-boot must boot up, and then check if the correct
boot partition is active, and if not switch the GPT partition table to
the other boot partition and reboot to activate the other u-boot.

In order to facilitate this, the gpt command needs to be better at
preserving entry attributes when manipulating the partition table. It
also learns two new commands, one which can swap the order of partitions
in the table, and another that lets it change which partitions have the
bootable flag.

Joshua Watt (6):
  cmd: gpt: Remove confusing help text
  cmd: gpt: Add command to set bootable flags
  cmd: gpt: Add gpt_partition_bootable variable
  cmd: gpt: Preserve type GUID if enabled
  cmd: gpt: Preserve bootable flag
  cmd: gpt: Add command to swap partition order

 cmd/gpt.c | 160 ++++++++++++++++++++++++++++++++++++++++++++++++++++--
 1 file changed, 154 insertions(+), 6 deletions(-)

-- 
2.33.0



More information about the U-Boot mailing list