diff options
author | Gabe Black <gabeblack@chromium.org> | 2011-07-07 16:00:00 -0700 |
---|---|---|
committer | Gabe Black <gabeblack@chromium.org> | 2011-07-07 16:33:47 -0700 |
commit | 93cf15e9a1c29962d6f08be6102d2ea7876d969f (patch) | |
tree | 4bca934c5c4bc91f70de2bcb2aec6a50077e9300 | |
parent | ebb1eda9bb4832c380a05e98eb2a7a98535afe5b (diff) | |
download | vboot-93cf15e9a1c29962d6f08be6102d2ea7876d969f.tar.gz |
Introduce GUID type for Chrome OS read/write firmware.
This change teaches cgpt a new GUID type to be used for the Chrome OS
read/write firmware. The GUID is CAB6E88E-ABF3-4102-A07A-D4BB9BE3C1D3.
BUG=chrome-os-partner:4843
TEST=Built and installed on my host, used a separate change to repurpose
partition 11 for the R/W firmware using cgpt and the "firmware" type, inspected
the image using cgpt. Built and installed an image and used cgpt on the device
to inspect it's GPT.
Signed-off-by: Gabe Black <gabeblack@google.com>
Change-Id: I3b2801b2e1f71b3275bbddbc45fb63bde5bce5a7
Reviewed-on: http://gerrit.chromium.org/gerrit/3763
Reviewed-by: Bill Richardson <wfrichar@chromium.org>
Tested-by: Gabe Black <gabeblack@chromium.org>
-rw-r--r-- | cgpt/cgpt.h | 1 | ||||
-rw-r--r-- | cgpt/cgpt_common.c | 2 | ||||
-rw-r--r-- | firmware/lib/cgptlib/include/gpt.h | 2 |
3 files changed, 5 insertions, 0 deletions
diff --git a/cgpt/cgpt.h b/cgpt/cgpt.h index 3f117bba..322f1e26 100644 --- a/cgpt/cgpt.h +++ b/cgpt/cgpt.h @@ -76,6 +76,7 @@ int GuidEqual(const Guid *guid1, const Guid *guid2); int IsZero(const Guid *guid); /* Constant global type values to compare against */ +extern const Guid guid_chromeos_firmware; extern const Guid guid_chromeos_kernel; extern const Guid guid_chromeos_rootfs; extern const Guid guid_linux_data; diff --git a/cgpt/cgpt_common.c b/cgpt/cgpt_common.c index 90cd8b60..a5a509b1 100644 --- a/cgpt/cgpt_common.c +++ b/cgpt/cgpt_common.c @@ -558,6 +558,7 @@ int UTF8ToUTF16(const uint8_t *utf8, uint16_t *utf16, unsigned int maxoutput) } /* global types to compare against */ +const Guid guid_chromeos_firmware = GPT_ENT_TYPE_CHROMEOS_FIRMWARE; const Guid guid_chromeos_kernel = GPT_ENT_TYPE_CHROMEOS_KERNEL; const Guid guid_chromeos_rootfs = GPT_ENT_TYPE_CHROMEOS_ROOTFS; const Guid guid_linux_data = GPT_ENT_TYPE_LINUX_DATA; @@ -570,6 +571,7 @@ static struct { char *name; char *description; } supported_types[] = { + {&guid_chromeos_firmware, "firmware", "ChromeOS firmware"}, {&guid_chromeos_kernel, "kernel", "ChromeOS kernel"}, {&guid_chromeos_rootfs, "rootfs", "ChromeOS rootfs"}, {&guid_linux_data, "data", "Linux data"}, diff --git a/firmware/lib/cgptlib/include/gpt.h b/firmware/lib/cgptlib/include/gpt.h index 14a79852..69d89d94 100644 --- a/firmware/lib/cgptlib/include/gpt.h +++ b/firmware/lib/cgptlib/include/gpt.h @@ -30,6 +30,8 @@ __pragma(pack(push,1)) /* Support packing for MSVC. */ {{{0x00000000,0x0000,0x0000,0x00,0x00,{0x00,0x00,0x00,0x00,0x00,0x00}}}} #define GPT_ENT_TYPE_EFI \ {{{0xc12a7328,0xf81f,0x11d2,0xba,0x4b,{0x00,0xa0,0xc9,0x3e,0xc9,0x3b}}}} +#define GPT_ENT_TYPE_CHROMEOS_FIRMWARE \ + {{{0xcab6e88e,0xabf3,0x4102,0xa0,0x7a,{0xd4,0xbb,0x9b,0xe3,0xc1,0xd3}}}} #define GPT_ENT_TYPE_CHROMEOS_KERNEL \ {{{0xfe3a2a5d,0x4f32,0x41a7,0xb7,0x25,{0xac,0xcc,0x32,0x85,0xa3,0x09}}}} #define GPT_ENT_TYPE_CHROMEOS_ROOTFS \ |