firmware-utils: ptgen: add GPT support
author李国 <uxgood.org@gmail.com>
Thu, 26 Mar 2020 05:47:40 +0000 (13:47 +0800)
committerPetr Štetiar <ynezz@true.cz>
Tue, 31 Mar 2020 14:20:47 +0000 (16:20 +0200)
commit1963bbaa8f035c0a3c71233a049a7a4d7cd32711
tree8671e7ecdf70c11e30286485b3a222b46c4fb859
parent332ed4a8354416ab64a9b510e5b2768c7fbb8c46
firmware-utils: ptgen: add GPT support

Add GPT support to ptgen, so we can generate EFI bootable images.

Introduced two options:
    -g        generate GPT partition table
    -G GUID   use GUID for disk and increase last bit for all partitions

We drop The alternate partition table to reduce size, This may cause
problems when generate vmdk images or vdi images. We have to pad enough
sectors when generate these images.

Signed-off-by: 李国 <uxgood.org@gmail.com>
[fixed compilation on macOS]
Signed-off-by: Petr Štetiar <ynezz@true.cz>
tools/firmware-utils/Makefile
tools/firmware-utils/src/ptgen.c