summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJae Hoon Kim <kimjae@chromium.org>2021-07-08 17:18:40 -0700
committerCommit Bot <commit-bot@chromium.org>2021-07-09 08:12:11 +0000
commit7b74b47be87cb51ac2e413f898a7496945458232 (patch)
treefca2db8373ad4408251de6785443a02fccdb5550
parent5d590145f0b0e40f64cacc2acfa1d3b0a7b595f8 (diff)
downloadvboot-7b74b47be87cb51ac2e413f898a7496945458232.tar.gz
vboot_reference: Add GUID type for miniOS
MiniOS partitions should not be using the same GUID as the kernel. Refer to bug as to reasons on why. ``` Using disk_layout_v3.json w/ types as "minios" instead of "kernel" and checking the GUID uses the new type. $ /build/zork-minios/usr/bin/cgpt show testimage start size part contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 40 1 1 Label: "" Type: ChromeOS miniOS UUID: 8A23CFDA-316E-B847-ADF2-80C4D1DF6F93 67 32 Sec GPT table 99 1 Sec GPT header $ /build/zork-minios/usr/bin/cgpt show -n testimage start size part contents 0 1 PMBR 1 1 Pri GPT header 2 32 Pri GPT table 40 1 1 Label: "" Type: 09845860-705F-4BB5-B16C-8A8A099CAF52 UUID: 8A23CFDA-316E-B847-ADF2-80C4D1DF6F93 Attr: [0] 67 32 Sec GPT table 99 1 Sec GPT header ``` BUG=b:193182769 TEST=# comment above BRANCH=none Signed-off-by: Jae Hoon Kim <kimjae@google.com> Change-Id: I18beb0c79762d838e580f6af7f4a2601e2980de6 Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/3017301 Tested-by: Jae Hoon Kim <kimjae@chromium.org> Reviewed-by: Mike Frysinger <vapier@chromium.org> Reviewed-by: Julius Werner <jwerner@chromium.org> Commit-Queue: Jae Hoon Kim <kimjae@chromium.org>
-rw-r--r--cgpt/cgpt_common.c2
-rw-r--r--firmware/include/gpt.h2
2 files changed, 4 insertions, 0 deletions
diff --git a/cgpt/cgpt_common.c b/cgpt/cgpt_common.c
index c3edd0fc..932e81f1 100644
--- a/cgpt/cgpt_common.c
+++ b/cgpt/cgpt_common.c
@@ -672,6 +672,7 @@ const Guid guid_linux_data = GPT_ENT_TYPE_LINUX_FS;
const Guid guid_chromeos_reserved = GPT_ENT_TYPE_CHROMEOS_RESERVED;
const Guid guid_efi = GPT_ENT_TYPE_EFI;
const Guid guid_unused = GPT_ENT_TYPE_UNUSED;
+const Guid guid_chromeos_minios = GPT_ENT_TYPE_CHROMEOS_MINIOS;
const static struct {
const Guid *type;
@@ -686,6 +687,7 @@ const static struct {
{&guid_chromeos_reserved, "reserved", "ChromeOS reserved"},
{&guid_efi, "efi", "EFI System Partition"},
{&guid_unused, "unused", "Unused (nonexistent) partition"},
+ {&guid_chromeos_minios, "minios", "ChromeOS miniOS"},
};
/* Resolves human-readable GPT type.
diff --git a/firmware/include/gpt.h b/firmware/include/gpt.h
index ff6ee322..133a9087 100644
--- a/firmware/include/gpt.h
+++ b/firmware/include/gpt.h
@@ -53,6 +53,8 @@ extern "C" {
{{{0xebd0a0a2,0xb9e5,0x4433,0x87,0xc0,{0x68,0xb6,0xb7,0x26,0x99,0xc7}}}}
#define GPT_ENT_TYPE_LINUX_FS \
{{{0x0fc63daf,0x8483,0x4772,0x8e,0x79,{0x3d,0x69,0xd8,0x47,0x7d,0xe4}}}}
+#define GPT_ENT_TYPE_CHROMEOS_MINIOS \
+ {{{0x09845860,0x705f,0x4bb5,0xb1,0x6c,{0x8a,0x8a,0x09,0x9c,0xaf,0x52}}}}
#define UUID_NODE_LEN 6
#define GUID_SIZE 16