summaryrefslogtreecommitdiff
path: root/utility
diff options
context:
space:
mode:
Diffstat (limited to 'utility')
-rw-r--r--utility/include/gbb_utility.h7
-rw-r--r--utility/load_kernel_test.c15
2 files changed, 10 insertions, 12 deletions
diff --git a/utility/include/gbb_utility.h b/utility/include/gbb_utility.h
index 49d6d43a..f1c850fe 100644
--- a/utility/include/gbb_utility.h
+++ b/utility/include/gbb_utility.h
@@ -8,7 +8,6 @@
#include <string>
#include <vector>
-#include "gbb_header.h"
namespace vboot_reference {
@@ -36,7 +35,7 @@ class GoogleBinaryBlockUtil {
bool save_to_file(const char *filename);
// create a new GBB blob by providing a list of reserved data size for each
- // properties, following the order described in GoogleBinaryBlockHeader.
+ // properties, following the order described in vb2_gbb_header.
// return true on success.
bool create_new(const std::vector<uint32_t> &create_param);
@@ -81,7 +80,7 @@ class GoogleBinaryBlockUtil {
// load and check header structure from image by given offset.
// return true if a valid GBB header is loaded into *phdr.
bool load_gbb_header(const std::string &image, long offset,
- GoogleBinaryBlockHeader *phdr) const;
+ struct vb2_gbb_header *phdr) const;
// find the size, offset, and name information for given property.
// return true if the offset and size are assign to *poffset and *psize;
@@ -90,7 +89,7 @@ class GoogleBinaryBlockUtil {
bool find_property(PROPINDEX i, uint32_t *poffset, uint32_t *psize,
const char **pname) const;
- GoogleBinaryBlockHeader header_; // copy of GBB header from image
+ struct vb2_gbb_header header_; // copy of GBB header from image
std::string file_content_; // complete image file content
long header_offset_; // offset to GBB header in file_content_
bool is_valid_gbb; // if we are holding a valid GBB
diff --git a/utility/load_kernel_test.c b/utility/load_kernel_test.c
index 6606c425..331e57ad 100644
--- a/utility/load_kernel_test.c
+++ b/utility/load_kernel_test.c
@@ -17,7 +17,6 @@
#include "2sysincludes.h"
#include "2api.h"
#include "2misc.h"
-#include "gbb_header.h"
#include "host_common.h"
#include "load_kernel_fw.h"
#include "rollback_index.h"
@@ -86,7 +85,7 @@ int main(int argc, char* argv[]) {
uint64_t key_size;
uint8_t* key_blob = NULL;
VbSharedDataHeader* shared;
- GoogleBinaryBlockHeader* gbb;
+ struct vb2_gbb_header* gbb;
VbError_t rv;
int c, argsleft;
int errorcnt = 0;
@@ -160,13 +159,13 @@ int main(int argc, char* argv[]) {
}
/* Initialize the GBB */
- uint32_t gbb_size = sizeof(GoogleBinaryBlockHeader) + key_size;
- gbb = (GoogleBinaryBlockHeader*)malloc(gbb_size);
+ uint32_t gbb_size = sizeof(struct vb2_gbb_header) + key_size;
+ gbb = (struct vb2_gbb_header*)malloc(gbb_size);
memset(gbb, 0, gbb_size);
- memcpy(gbb->signature, GBB_SIGNATURE, GBB_SIGNATURE_SIZE);
- gbb->major_version = GBB_MAJOR_VER;
- gbb->minor_version = GBB_MINOR_VER;
- gbb->header_size = sizeof(GoogleBinaryBlockHeader);
+ memcpy(gbb->signature, VB2_GBB_SIGNATURE, VB2_GBB_SIGNATURE_SIZE);
+ gbb->major_version = VB2_GBB_MAJOR_VER;
+ gbb->minor_version = VB2_GBB_MINOR_VER;
+ gbb->header_size = sizeof(struct vb2_gbb_header);
/* Fill in the given key, if any, for both root and recovery */
if (key_blob) {
gbb->rootkey_offset = gbb->header_size;