diff options
author | Mike Frysinger <vapier@chromium.org> | 2016-09-07 16:45:48 -0400 |
---|---|---|
committer | chrome-bot <chrome-bot@chromium.org> | 2016-09-08 15:36:23 -0700 |
commit | 6c18af501798c9b597839a3628c8374a2f8d7483 (patch) | |
tree | e846d7253980759aed453ba8649653cc7a4b60b9 /firmware/include/gpt.h | |
parent | 6764405c93664efcf9742bf4973225099f65b6ec (diff) | |
download | vboot-6c18af501798c9b597839a3628c8374a2f8d7483.tar.gz |
cgpt: add support for managing the legacy boot gpt bitstabilize-kevin-8785.94.B
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.
BUG=chromium:644845
TEST=vboot_reference unittests pass
TEST=booted an amd64-generic disk image via USB on a generic laptop
BRANCH=None
Change-Id: I78e17b8df5b0c61e9e2d8a3c703e6d5ad230fe92
Reviewed-on: https://chromium-review.googlesource.com/382411
Commit-Ready: Mike Frysinger <vapier@chromium.org>
Tested-by: Mike Frysinger <vapier@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Diffstat (limited to 'firmware/include/gpt.h')
-rw-r--r-- | firmware/include/gpt.h | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h index 275b3ae8..ae957cf7 100644 --- a/firmware/include/gpt.h +++ b/firmware/include/gpt.h @@ -108,7 +108,12 @@ typedef struct { uint64_t ending_lba; union { struct { - uint16_t reserved[3]; + uint8_t system:1; + uint8_t efi_ignore:1; + uint8_t legacy_boot:1; + uint8_t reserved1:5; + uint8_t reserved2; + uint16_t reserved[2]; uint16_t gpt_att; } __attribute__((packed)) fields; uint64_t whole; |