]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
uuid: Add ChromiumOS partition types
authorSimon Glass <sjg@chromium.org>
Thu, 24 Aug 2023 19:55:44 +0000 (13:55 -0600)
committerTom Rini <trini@konsulko.com>
Fri, 25 Aug 2023 21:55:19 +0000 (17:55 -0400)
Add some GUIDs for ChromiumOS so we can detect the partitions.

Signed-off-by: Simon Glass <sjg@chromium.org>
include/part_efi.h
lib/uuid.c

index c68529b4dafe9a83a44100de76392551a5f8c4eb..59b7895b8a2398a822b652ca8f4ac51b8a2a0716 100644 (file)
        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;
 
index 3bdb20b0e5b6ac669cc501e77634fd692a3348ed..afb40bff507af4bb5adeed6be8934fc38b5e226f 100644 (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;