vboot: Fix compilation issues for integrating VbExOverrideGptEntryPriority

CQ-DEPEND=CL:274558
BUG=None
BRANCH=None
TEST=Compiles successfully for daisy_spring

Change-Id: I8147270f08725cd4ad52dea1a8886961e3087653
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://chromium-review.googlesource.com/274932
Reviewed-by: Furquan Shaikh <furquan@chromium.org>
Tested-by: Furquan Shaikh <furquan@chromium.org>
Reviewed-by: Randall Spangler <rspangler@chromium.org>
Commit-Queue: Nicolas Boichat <drinkcat@chromium.org>
Trybot-Ready: Nicolas Boichat <drinkcat@chromium.org>
diff --git a/cros/vboot/Makefile b/cros/vboot/Makefile
index 2801d39..5d87e79 100644
--- a/cros/vboot/Makefile
+++ b/cros/vboot/Makefile
@@ -18,6 +18,7 @@
 COBJS-$(CONFIG_MMC) += boot_device_mmc.o
 COBJS-$(CONFIG_CHROMEOS_USB) += boot_device_usb.o
 COBJS-$(CONFIG_SCSI_AHCI) += boot_device_scsi.o
+COBJS-$(CONFIG_CHROMEOS) += cgptlib.o
 COBJS-$(CONFIG_CHROMEOS) += display.o
 COBJS-$(CONFIG_CHROMEOS) += ec.o
 COBJS-$(CONFIG_CHROMEOS) += keyboard.o
diff --git a/cros/vboot/cgptlib.c b/cros/vboot/cgptlib.c
new file mode 100644
index 0000000..3551cce
--- /dev/null
+++ b/cros/vboot/cgptlib.c
@@ -0,0 +1,20 @@
+/*
+ * Copyright (c) 2015 The Chromium OS Authors. All rights reserved.
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ */
+
+#include <common.h>
+#include <cros/common.h>
+#include <cros/vboot_flag.h>
+#include <vboot_api.h>
+
+uint8_t VbExOverrideGptEntryPriority(const GptEntry *e)
+{
+	/* Dummy function. */
+	return 0;
+}
diff --git a/disk/part_efi.c b/disk/part_efi.c
index b083e34..8f951b7 100644
--- a/disk/part_efi.c
+++ b/disk/part_efi.c
@@ -440,7 +440,7 @@
 int gpt_fill_header(block_dev_desc_t *dev_desc, gpt_header *gpt_h,
 		char *str_guid, int parts_count)
 {
-	gpt_h->signature = cpu_to_le64(GPT_HEADER_SIGNATURE);
+	gpt_h->signature = cpu_to_le64(GPT_HEADER_SIGNATURE_VALUE);
 	gpt_h->revision = cpu_to_le32(GPT_HEADER_REVISION_V1);
 	gpt_h->header_size = cpu_to_le32(sizeof(gpt_header));
 	gpt_h->my_lba = cpu_to_le64(1);
@@ -572,11 +572,11 @@
 	}
 
 	/* Check the GPT header signature */
-	if (le64_to_cpu(pgpt_head->signature) != GPT_HEADER_SIGNATURE) {
+	if (le64_to_cpu(pgpt_head->signature) != GPT_HEADER_SIGNATURE_VALUE) {
 		printf("GUID Partition Table Header signature is wrong:"
 			"0x%llX != 0x%llX\n",
 			le64_to_cpu(pgpt_head->signature),
-			GPT_HEADER_SIGNATURE);
+			GPT_HEADER_SIGNATURE_VALUE);
 		return 0;
 	}
 
diff --git a/include/part_efi.h b/include/part_efi.h
index 95e4c8f..d14a6f3 100644
--- a/include/part_efi.h
+++ b/include/part_efi.h
@@ -38,7 +38,7 @@
 #define EFI_PMBR_OSTYPE_EFI 0xEF
 #define EFI_PMBR_OSTYPE_EFI_GPT 0xEE
 
-#define GPT_HEADER_SIGNATURE 0x5452415020494645ULL
+#define GPT_HEADER_SIGNATURE_VALUE 0x5452415020494645ULL
 #define GPT_HEADER_REVISION_V1 0x00010000
 #define GPT_PRIMARY_PARTITION_TABLE_LBA 1ULL
 #define GPT_ENTRY_NAME "gpt"