Browse Source

Rename GPT_HEADER_SIGNATURE to avoid conflict

The current name conflicts with the Chrome OS verified boot library, which
prevents it being built. That library uses a string whereas U-Boot uses a
64-bit hex value. Rename this in U-Boot.

Signed-off-by: Simon Glass <sjg@chromium.org>
Simon Glass 3 years ago
parent
commit
67b9052264
2 changed files with 4 additions and 4 deletions
  1. 3 3
      disk/part_efi.c
  2. 1 1
      include/part_efi.h

+ 3 - 3
disk/part_efi.c

@@ -82,11 +82,11 @@ static int validate_gpt_header(gpt_header *gpt_h, lbaint_t lba,
82 82
 	uint32_t calc_crc32;
83 83
 
84 84
 	/* Check the GPT header signature */
85
-	if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE) {
85
+	if (le64_to_cpu(gpt_h->signature) != GPT_HEADER_SIGNATURE_UBOOT) {
86 86
 		printf("%s signature is wrong: 0x%llX != 0x%llX\n",
87 87
 		       "GUID Partition Table Header",
88 88
 		       le64_to_cpu(gpt_h->signature),
89
-		       GPT_HEADER_SIGNATURE);
89
+		       GPT_HEADER_SIGNATURE_UBOOT);
90 90
 		return -1;
91 91
 	}
92 92
 
@@ -603,7 +603,7 @@ static uint32_t partition_entries_offset(struct blk_desc *dev_desc)
603 603
 int gpt_fill_header(struct blk_desc *dev_desc, gpt_header *gpt_h,
604 604
 		char *str_guid, int parts_count)
605 605
 {
606
-	gpt_h->signature = cpu_to_le64(GPT_HEADER_SIGNATURE);
606
+	gpt_h->signature = cpu_to_le64(GPT_HEADER_SIGNATURE_UBOOT);
607 607
 	gpt_h->revision = cpu_to_le32(GPT_HEADER_REVISION_V1);
608 608
 	gpt_h->header_size = cpu_to_le32(sizeof(gpt_header));
609 609
 	gpt_h->my_lba = cpu_to_le64(1);

+ 1 - 1
include/part_efi.h

@@ -24,7 +24,7 @@
24 24
 #define EFI_PMBR_OSTYPE_EFI 0xEF
25 25
 #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
26 26
 
27
-#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
27
+#define GPT_HEADER_SIGNATURE_UBOOT 0x5452415020494645ULL
28 28
 #define GPT_HEADER_REVISION_V1 0x00010000
29 29
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1ULL
30 30
 #define GPT_ENTRY_NUMBERS		CONFIG_EFI_PARTITION_ENTRIES_NUMBERS