cgpt: add support for managing the legacy boot gpt bit

Bit 2 in the GPT partition attributes has been allocated as the legacy
bios boot (equivalent to the "active" or "boot" flag in MBR).  If we
try to boot images on newer x86 systems, syslinux dies because it can't
find any GPT partition marked bootable.

Update the various parts of cgpt add & show to manage this bit.  Now we
can run:
	cgpt add -i 12 -B 1 chromiumos_image.bin
And the EFI partition will be marked bootable.

TEST=vboot_reference unittests pass
TEST=booted an amd64-generic disk image via USB on a generic laptop

Change-Id: I78e17b8df5b0c61e9e2d8a3c703e6d5ad230fe92
Commit-Ready: Mike Frysinger <>
Tested-by: Mike Frysinger <>
Reviewed-by: Randall Spangler <>
12 files changed