uuid: Add ChromiumOS partition types

Add some GUIDs for ChromiumOS so we can detect the partitions.

Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
Simon Glass 2023-08-24 13:55:44 -06:00 committed by Tom Rini
parent 831405f41d
commit 966b16c59a
2 changed files with 21 additions and 0 deletions

View File

@ -60,6 +60,20 @@
EFI_GUID( 0x3de21764, 0x95bd, 0x54bd, \
0xa5, 0xc3, 0x4a, 0xbe, 0x78, 0x6f, 0x38, 0xa8)
/* Special ChromiumOS things */
#define PARTITION_CROS_KERNEL \
EFI_GUID(0xfe3a2a5d, 0x4f32, 0x41a7, \
0xb7, 0x25, 0xac, 0xcc, 0x32, 0x85, 0xa3, 0x09)
#define PARTITION_CROS_ROOT \
EFI_GUID(0x3cb8e202, 0x3b7e, 0x47dd, \
0x8a, 0x3c, 0x7f, 0xf2, 0xa1, 0x3c, 0xfc, 0xec)
#define PARTITION_CROS_FIRMWARE \
EFI_GUID(0xcab6e88e, 0xabf3, 0x4102, \
0xa0, 0x7a, 0xd4, 0xbb, 0x9b, 0xe3, 0xc1, 0xd3)
#define PARTITION_CROS_RESERVED \
EFI_GUID(0x2e0a753d, 0x9e48, 0x43b0, \
0x83, 0x37, 0xb1, 0x51, 0x92, 0xcb, 0x1b, 0x5e)
/* linux/include/efi.h */
typedef u16 efi_char16_t;

View File

@ -7,6 +7,8 @@
* Abdellatif El Khlifi <abdellatif.elkhlifi@arm.com>
*/
#define LOG_CATEGOT LOGC_CORE
#include <common.h>
#include <command.h>
#include <efi_api.h>
@ -61,6 +63,10 @@ static const struct {
{"swap", PARTITION_LINUX_SWAP_GUID},
{"lvm", PARTITION_LINUX_LVM_GUID},
{"u-boot-env", PARTITION_U_BOOT_ENVIRONMENT},
{"cros-kern", PARTITION_CROS_KERNEL},
{"cros-root", PARTITION_CROS_ROOT},
{"cros-fw", PARTITION_CROS_FIRMWARE},
{"cros-rsrv", PARTITION_CROS_RESERVED},
#endif
#if defined(CONFIG_CMD_EFIDEBUG) || defined(CONFIG_EFI)
{
@ -258,6 +264,7 @@ int uuid_str_to_bin(const char *uuid_str, unsigned char *uuid_bin,
uint64_t tmp64;
if (!uuid_str_valid(uuid_str)) {
log_debug("not valid\n");
#ifdef CONFIG_PARTITION_TYPE_GUID
if (!uuid_guid_get_bin(uuid_str, uuid_bin))
return 0;